gracelang / language

Design of the Grace language and its libraries
GNU General Public License v2.0
6 stars 1 forks source link

Capitalization conventions #11

Open apblack opened 9 years ago

apblack commented 9 years ago

We have established the convention that constants, variables and methods all start with a lower letter, and that types start with an upper case letter.

For some reason, Singleton and the various Exception objects are exceptions to this rule. Why? Should we make them conform?

Should these conventions actually become part of the language, so that hey can be enforced by the compiler? Or Part of a "beginningStudent" dialect?

KimBruce commented 9 years ago

I believe the convention implemented in minigrace is that patterns are capitalized and types are an example of patterns. I have very mixed feelings about this. I'm tempted to say capitals for only types, but the use of exceptions in case clauses is a place where starting with capitals does seem consistent. Thus, I'm not sure which way to go pending further justifications one way or the other.