Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^6: Modernizing the Postmodern Language? (Autobox)

by LanX (Saint)
on Jun 30, 2020 at 17:51 UTC ( [id://11118731]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Modernizing the Postmodern Language?
in thread Modernizing the Postmodern Language?

I never understood why people prefer this ugly postfix syntax over autoboxing methods

${nested}{arrayref}->push(4)

is certainly more readable and shorter than

push @{ ${nested}{arrayref} }, 4

or

push ${nested}{arrayref}->@*, 4

And ->@* should be aliased to ->list or ->arr

Perl 4 started as "bash on steroids", it immediately convinced Sysops to have a better designed language with sed and awk semantics included.

But today's ubiquitous language is JavaScript.

The strategy should be to aim at a "JS on steroids".

And JS has autoboxing.

See also autobox on CPAN.

Autoboxing could be a killer feature when marketing v7 or v8 as more readable advancements.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Update

And please don't tell me it's not possible to fix the speed penalty with special opcodes for a handful of built in methods.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11118731]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2024-04-25 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found