in reply to Re^2: What's wrong with Perl 6?
in thread What's wrong with Perl 6?
what makes Perl Perl?In no particular order:
- Perl is context-based, or context-sensitive, or it decides what to do on code depending on in what context I expect my code to be treated (well, in the set of contexts Perl understands)
- Perl allows me to code in the *first way* that comes to mind to solve a problem, yet allows me later to improve the solution in *another way*.
- Perl makes it easy for me to visually distinguish variable types and interpolate them in string. This is one of things that made me fell in love in my early Perl days.
- Perl allows me to have as many namespaces as I like (or need) and arrange them in a nested fashion. I can have them in one file, or in their own files. (I just can't stand to say CGI_Application_Plugin_Authentication_Driver_DBI).
- Memory management. Well, this one was actually less relevant for me until I know (by literature) the pain in manually allocating and deallocating memory. So my praise to those who implement Perl in C but can stand the pain :-) (They can, can't they?)
- Garbage collection, see also note about MM. I don't care whether it's implemented with reference counting or mark & sweep, or other techniques, as long as Perl provides GC.
- CPAN, enough said :-)
- Unimitable Regular expression
- Optional parentheses, semicolons, and commas as long as they're not required
- I love one-liners
- Optional return in subs (TheDamian advices againsts it (PBP 9.11), though.)
- POD!
- Free-form syntax structure
- Short-circuit in logical operators
(I don't know how to name this)EXPR if STATEMENT and other statement modifiersfriends(Updated per blazar below)- Closure, anyone?
- Arbitrary (bare or named) block usage
- Nested scoping
(Well, I can go on but that's what I can think of now. I could add TimToady's onion speaks but I'm afraid it's too much personal)
If Perl 6 preserves those characteristics, there's no reason to say Perl 6 is not Perl despite the change on the syntax. For example, I don't mind to write @array[1] instead of $array[1]. It's still Perl. And of course I can't mind to write:
In the mean time, the only thing I can do now is stay with Perl (5) until the day when we do have that better Perl than Perl 5. In the future, we won't call it Perl 6 anymore, just Perl.given ($some) { when 'body' { 'has to fight' } when 'thing' { 'has to give' } when 'day' { 'they will know the truth } when 'where' { 'in a very near place to their mind' } when 'time' { 'can only tell' } default { 'yes, there is always a space for default' } }
Update: now that I remember more, I added number 13 onward.
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: What's wrong with Perl 6?
by blazar (Canon) on May 14, 2007 at 20:59 UTC | |
by naikonta (Curate) on May 15, 2007 at 16:19 UTC | |
by blazar (Canon) on May 15, 2007 at 18:54 UTC | |
by jonnyfolk (Vicar) on Sep 19, 2007 at 21:42 UTC |
In Section
Meditations