in reply to Thoughts on Exegesis 7
Now, I'm not so certain about the usefulness of :some_option[1, 2, 3] or the almost impenetrable :some_option«Some Text» (How on earth are you supposed to make those characters in vi, anyways?!?If you don't like vim's ^K<< approach, Perl 6 will support ASCII lookalikes for anything non-ASCII. Though really, we're intentionally restricting ourselves to Latin-1 characters for builtins, so it shouldn't be that hard to get used to. Anyway, you can always write :some_option<<Some Text>> if you're an ASCII supremacist.
When was this decided, and by who?)The idea of variable option brackets first occurred to me on Feb 16, and Damian extended it to include the qw-ish «» quotes. I decided on it very shortly before E7 was sent off to O'Reilly, because Damian was hankering to use them. As you may have noticed...
I know I'll like them after the first few months, but I'm just not seeing it right now ...That's my job in a nutshell: to foresee what people will like after their initial period of disgust... :-)
Part of what causes the initial distress is that one doesn't know how the new feature fits in as a whole. It's certain that :some_option«Some Text» would not be in there if there wasn't already a meaning for «Some Text» by itself. And by itself, even that wouldn't be enough to justify the new :some_option syntax. However, it's also going to let us toss out the special exception for autoquoting hash subscripts that frequently confuses Perl 5 programmers.
In Perl 6, %hash{shift} will always be a call to the shift function, and if you want a constant string as a subscript, you can use, guess what, %hash«shift». (As long as your constant string doesn't contain whitespace, of course.) Plus it generalizes to a slice of constant strings, which Perl 5 can't do at all without a bazillion quotes. So we fix a special case, introduce a pretty syntax for qw//, and get constant slices for free, in addition to omitting the parens from :some_option(«Some Text»), along with the other bracketing composers.
And, over the long term, it will turn out to be much more readable, I think.
Edited by theorbtwo: Fixed HTML mis-nesting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Thoughts on Exegesis 7
by dragonchild (Archbishop) on Feb 29, 2004 at 00:46 UTC | |
by TimToady (Parson) on Feb 29, 2004 at 02:09 UTC | |
|
Re: Re: Thoughts on Exegesis 7
by BUU (Prior) on Feb 29, 2004 at 01:53 UTC | |
by TimToady (Parson) on Feb 29, 2004 at 02:26 UTC | |
by dragonchild (Archbishop) on Feb 29, 2004 at 04:18 UTC |