[REBOL] Dialecting Re:
[EMAIL PROTECTED] wrote: How is dialecting different from defining a new word in Forth? How does this make REBOL better than any language which allows you to define new words? You will appreciate the difference when REBOL/Core 2.3 will be released. You not only can redefine words, you can create your own language. Regards, Gabriele. -- Gabriele Santilli [EMAIL PROTECTED] - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
[REBOL] Dialecting Re:(2)
[EMAIL PROTECTED] wrote: How is dialecting different from defining a new word in Forth? How does this make REBOL better than any language which allows you to define new words? And Elan replied: Dialecting goes beyond just extending REBOL's vocabulary. It permits you to also define your own syntactic structures (i.e. language grammar). How does this make REBOL better than any language which allows you to define new words? Some differences between REBOL and languages that allow you to define new words: 1. There are now holy cows, i.e. keywords. REBOL allows you to define new words as well as any word from REBOL's existing vocabulary to be anything you want. For example, I can (and do) define 'head to mean the head section of a HTML dialect, whereas in REBOL it normally means return the head of a series. 2. Using REBOL's dialecting support, you can also define new syntactic structures. For example, replacing loop constructs which normally return the results of a block as an item to instead return items in a block ready to be joined. Very handy for making tables in HTML. 3. Using contexts you can precisely control under what circumstances your new word definitions/syntactic structures become affective, without impacting REBOL's default vocabulary and behaviour. For example: print HTML/Dialect [ ; dialect code here head [Title "My title"] body [] [H1 Title] ] print head "123" Note different uses of 'Title and 'head, in above REBOL code. 4. Based on contexts you can freely mix REBOL's default behaviour and any number of dialects. Or even embed many dialects in one all encompassing dialect. Example: See the CID dialect that is shipping REBOL/View beta. Hope this helps, I hope this helps! :-) Andrew Martin Inventing the future... ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --
[REBOL] Dialecting Re:
Hi, if you don't have /View, you can look at some dialects even in /Core. REBOL's default "dialect" is a functional language, but there are: 1) parse dialect 2) secure dialect 3) function arguments block dialect You can see that in these contexts words have different meaning and different order than functions and their arguments. [EMAIL PROTECTED] wrote: How is dialecting different from defining a new word in Forth? How does this make REBOL better than any language which allows you to define new words? __ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup -- Michal Kracik
[REBOL] Dialecting Re:
Hi, you wrote: How is dialecting different from defining a new word in Forth? Dialecting goes beyond just extending REBOL's vocabular. It permits you to also define your own syntactic structures (i.e. language grammar). How does this make REBOL better than any language which allows you to define new words? Some differences between REBOL and languages that allow you to define new words: 1. There are now holy cows, i.e. keywords. REBOL allows you to define new words as well as any word from REBOL's existing vocabulary to be anything you want. 2. Using REBOL's dialecting support, you can also define new syntactic structures. 3. Using contexts you can precisely control under what circumstances your new word definitions/syntactic structures become affective, without impacting REBOL's default vocabulary and behavior. 4. Based on contexts you can freely mix REBOL's default behavior and any number of dialects. Example: See the CID dialect that is shipping REBOL/View beta Hope this helps, ;- Elan [: - )]