Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

perl6doc (9249)

  (email not shown publicly)

Journal of perl6doc (9249)

Wednesday June 24, 2009
06:26 PM

Natural Elegance

[ #39171 ]
I like the elegance, consistency and similarity with natural language of Perl 6. E.g. the colon, with which we express a relation. Cups in the basket: 5.

And indeed a pair as a data type, which describes a simple relation, you declare in Perl 6 :key(value). Also hashes (which are build with pairs), named parameters in signatures (which too descibe a relation between a name(ID) and a value) autogenerated named parameter (have colon as twigil) use the colon. And not only the reuse of pairs everywhere as quote or regex adverbs or filetest operators, also in macro defenitions, if you specify what you like to create with this macro (because unlike LISP there is more than lists and brackets), you write macro category: { ... }. Again colons are used almost like in text. and you have it again when you use objects with a special syntax that doesnt look in that way. feed $author: 'cake and herbal tee'; is nothing else then $author.feed('cake and herbal tee'); All that you can understand intuitively and behind all that are very very few rules. So yes Perl 6 is complex, but only where we adress complexity of life. And to be practical was always the goal of Perl.

thanks jesse++ for adding me.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.