3 ms·
I believe the argument here is that since it's currently an experimental language, future versions might include many currently unplanned keywords. By making k
by asdajksah2123 4y ago
I believe the argument here is that since it's currently an experimental language, future versions might include many currently unplanned keywords.
By making keywords all caps, (and presumably no other user defined names are all caps...I'm not sure if this is enforced by the language or not, but it's a simple enough convention that there is a very low likelihood of it being broken) you ensure that you have the entire namespace of words available to you as keywords for future enhancements to the language.
- asdajksah2123 4y agoFrom the "Design Principles" section that points out other rules (that seem to be compiler enforced) and the reasoning behind it: ------------ 5. The next compiler version will add a new feature Once a compiler version is released programs will be written and distributed. The next version must not break the existing programs. Thus it must be possible to add keywords, types, modules, etc. without worrying that this might break someone's carefully crafted code. Keywords are all-caps. No user symbol may be all-caps Builtin type names are all lowercase. User types must start with an uppercase letter. Builtin module names are all-caps. User modules must contain a lowercase letter. Predefined methods start with an uppercase letter. User methods must start with a lowercase letter. This may seem a bit strange at first, but one gets used to it very quickly. And the compiler gives a clear error message when making a mistake.