I keep running into all sorts of ugliness with the grammar and it all revolves around not know what is a type name vs a slot/variable until after everything has been parsed in.
One of the things I've been pondering is to codify the convention that types start with an upper case letter and everything else with a lower case letter (like Ruby). That seems really strict, but provides the awesome ability to distinguish b/w a type and other identifiers at the lexer/parser.
Since we do it anyways it isn't really a big inconvenience for us. We did talk about using upper-case camel for constants, but I'm not sure it is that a big a deal to use lower-case - especially given the fuzzy nature of fields, readonly fields, final fields, and true inlined constants. But it would prevent someone from using C# or Java naming conventions like screaming caps.
What do you guys say?
andyFri 10 Mar 2006
I'm not crazy about that idea - but you may be able to get away with it. I am, however, against lower camel for constants though - I think we should have a set convention for all non-writable fields - which would have been upper camel (but we could use something else).
johnSun 12 Mar 2006
I vote no on that. I'd rather things like that remain as conventions and not grammer rules.
brian Fri 10 Mar 2006
I keep running into all sorts of ugliness with the grammar and it all revolves around not know what is a type name vs a slot/variable until after everything has been parsed in.
One of the things I've been pondering is to codify the convention that types start with an upper case letter and everything else with a lower case letter (like Ruby). That seems really strict, but provides the awesome ability to distinguish b/w a type and other identifiers at the lexer/parser.
Since we do it anyways it isn't really a big inconvenience for us. We did talk about using upper-case camel for constants, but I'm not sure it is that a big a deal to use lower-case - especially given the fuzzy nature of fields, readonly fields, final fields, and true inlined constants. But it would prevent someone from using C# or Java naming conventions like screaming caps.
What do you guys say?
andy Fri 10 Mar 2006
I'm not crazy about that idea - but you may be able to get away with it. I am, however, against lower camel for constants though - I think we should have a set convention for all non-writable fields - which would have been upper camel (but we could use something else).
john Sun 12 Mar 2006
I vote no on that. I'd rather things like that remain as conventions and not grammer rules.