Hi
> The anti-autobox folks (myself among them) are trying to push you into defending the position that everything should be objects, when you've not stated that this should be the case.
Thx finally my message got thru. :)
To be clear: After use autobox you are still free to write push @fruits, 'kiwi', that's perfect TIMTOWTDI! (UPDATE: And it's not turning the primitives into objects!)
> what would read most naturally to me would be "push 'kiwi', @fruits", to mirror English "push kiwi onto fruits"
Thx again, you brought an example I had in mind about how absurd this argument about Perl reflecting natural language is.
For technical reasons the direct object is NOT in first position in Perl's push()¹
BUT with method chaining $fruits_ref->push('kiwi')->push('banana') reflects naturally:
"Take fruitbasket! Push kiwi! Push banana! ..."
In natural grammar: The indirect object becomes a matter of context!
(Nota bene: I'm not saying this example is better than push @fruits,'kiwi','banana', it's just a fucking example about the analogies of natural and computer languages)
> I don't see it as a strong benefit in general,
- One of my vision is to code in Perl and to run it on JS Engines. Contrary to other languages Perl has the flexibility to allow this. And JS is very flexible in extending the core functionality.
(My example should show a way to achieve this.)
And JS Engines are universally available in Browsers , in Flash (Action Script) in .NET and Java (Rhino) and the JIT compiler of Chrome and and ...
OTOH Perl has nothing to cope with IronPython or JRuby, which ARE important in marketing these languages. Code-reuse is alway an issue!
"Then there's JavaScript, a nice clean design. It has some issues, but in the long run JavaScript might actually turn out to be a decent platform for running Perl 6 on."
-- Larry Wall
- Another vision is to show to the hype folks running to Ruby that all there OO concepts from Smalltalk can be easily backported one-by-one to Perl.
¹) you can't turn the prototype push(\@;@) around, without limiting the list of pushed elements!
UPDATE: added links.