Hi all, I made two changes to the language today. I updated all of the code in the repository.
1) The make words: make , % have been moved into a new vocabulary named 'make'. They didn't really belong in 'namespaces'. Their behavior did not change. 2) The '_' fry directive is gone, and the ',' fry directive is now named '_', to avoid clashing with 'make'. I didn't like the _ fry directive because it would only work at the top level of a fry, it was hard to explain what it does in the documentation, and the implementation was ugly. It made sense with the old 'fry' code which didn't support directives nested in inner quotations, but now there's no reason to have _ anymore, since you can just use 'dip' in your fried quotation. The , fry directive was renamed to _ because having 'fry' overload namespaces:, and also provide its own fry:, word was just too confusing, for two reasons: - When using fry and make in the same vocabulary, you had to get the using order right: fry first, namespaces second. - There was no way to fry a quotation containing a call to namespaces:,. I've wanted to do this before, and having to use 'curry' just for this case is annoying. One solution would be to eliminate fry:, and have fry always use namespaces:, (now make:,). However this isn't accepable either because vocabularies wishing to use fry still had to depend on namespaces (or make) even if they used no other words from there. make:, is just an ordinary colon definition, and overloading it to have a special meaning in 'fry' is silly. Finally, _ stands out more than , and this is important for something like fry, where a directive buried in a nested quotation totally changes the meaning of the entire form. The _ is easy to spot and does not blend in with other punctuation used in Factor code such as words with names ending in . and , both of which are pretty common. So instead of writing '[ , foo ] you now write '[ _ foo ] And instead of writing '[ , _ foo ] you now write '[ _ swap foo ] or '[ [ _ ] dip foo ] Now that the confusion interaction between fry and make's , word is gone and fry has one less directive to learn, I hope more people consider using fry. "fry" about has the details. Slava ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
