2 ms·
Perl 6 makes careful use of letter case to convey useful information. If it's in ALL CAPS then it's drawing some attention to the fact that something VERY UNUS
by raiph 10y ago
Perl 6 makes careful use of letter case to convey useful information.
If it's in ALL CAPS then it's drawing some attention to the fact that something VERY UNUSUAL is going on.
For example, `WHAT`, `HOW` etc. are special compiler macros, not at all ordinary routines. Fortunately there's little or no need to use these in typical Perl 6 programs.
Another example are the "phasers" CATCH, LEAVE, UNDO, etc. These are unusual because they are executed according to execution phases rather than the sequential order of code.
Another convention is use of initial caps. All built in object type names use initial caps. Hence `Int` for the arbitrary size integer type. (Use `int` for the native machine oriented alternative.)
This all may sound weird but I find it works well for me in practice.
- vgy7ujm 10y agoI hope these things are explained well in the upcoming books. Me, a seasoned Perl 5 programmer that doesn't participate much in the Perl 6 community find these things a bit strange and visually a turnoff if you get what I mean. Also angle brackets usage no auto quoting was something I remember not liking too much. Note that this has more to do with familiarity and syntax than the new features etc. I very much hope for a "Java killer" in the Perl family but that means performance must be a first priority. Thanks for explaining, at least I can view examples with a little more understanding of the syntax choices going forward.