Doug Coleman wrote: > How about just escaping class names all the time? > > TUPLE: foo a b ; > \ foo new > > That way it's clear that foo will not execute as a word and we won't > have to generate any new sytnax like Foo or foo%. > > : foo "lol" throw ; > > Now we original usage of foo will still work. > > In general, I prefer this kind of preventative coding. You could do > the same for symbols -- I know it's redundant, but I love that the > code is robust if the symbol name is ever used as a word name and I > don't mind reading an extra backslash if it makes code easier to > change in the future.
I agree with your analysis. I.e. given the current situation, it's good to be consistent and always quote your class. However, always using '\' isn't a substitute for a real convention. Seeing a backslash doesn't necessarily signify a class name, which is the point of a naming convention. > I don't want to have "syntax creep" because it would take away from Factor's > simplicity. I wouldn't call a naming convention syntax, because it isn't enforced. An example of syntax creep is when '<' became an invalid slot name. Syntax is like authority, it's sometimes necessary but it should be justified. The latter example was justified. As far as a naming convention affecting the simplicity of the language itself, I have to defer to Perlis: Symmetry is a complexity-reducing concept; seek it everywhere I've always considered consistency to be a form of symmetry. Ed ------------------------------------------------------------------------- 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 Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk