Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Consistency, syntax, and little minds

by Hercynium (Hermit)
on Jan 30, 2013 at 16:39 UTC ( #1016094=note: print w/replies, xml ) Need Help??

in reply to Consistency, syntax, and little minds

Wow, talk about a time warp! (it's just a jump to the left)

I ran across this thread looking for examples of the use of B::Generate (see diotalevi's post, below), for some enlightenment of my own.

When I read through the rest of the thread, I had a little chuckle realizing that few of the other commenters seem to have understood what you were asking for all those years ago - and it seems that none really saw the utility and advantage of it! Well, fast forward 9+ years but your idea is now in core, (more or less, unless I failed to understand it as well :), as of perl 5.14!

Recently I have been able to code on perl 5.14 and I find myself using this feature more and more often. I like that it adds a carefully-considered bit of DWIM in a places where I once added a lot of syntax that always felt tedious and distracting. I myself have wished explicit deref for push/keys/shift/etc. was unnecessary - and now it is! In the code where I am using this feature, other people working on or reviewing that code have expressed that they like the feature quite a bit.

More info here:
Original Patch and rationale from David Golden (xdg++) here:
  • Comment on Re: Consistency, syntax, and little minds

Replies are listed 'Best First'.
Re^2: Consistency, syntax, and little minds
by Arunbear (Prior) on Jan 30, 2013 at 17:46 UTC
    I was looking forward to this feature too, but when 5.14 was released the docs had this to say e.g. from push:
    Starting with Perl 5.14, push can take a scalar EXPR, which must hold a reference to an unblessed array. The argument will be dereferenced automatically. This aspect of push is considered highly experimental. The exact behaviour may change in a future version of Perl.
    ... which has discouraged me from using it :(

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2022-11-29 21:11 GMT
Find Nodes?
    Voting Booth?