Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^10: A short whishlist of Perl5 improvements leaping to Perl7

by LanX (Saint)
on Nov 28, 2020 at 23:36 UTC ( [id://11124339]=note: print w/replies, xml ) Need Help??


in reply to Re^9: A short whishlist of Perl5 improvements leaping to Perl7
in thread A short whishlist of Perl5 improvements leaping to Perl7

yeah, I understand your aspiration for 100% solutions.

But it's a Rosetta Stone fire-and-forget demo script and I doubt we'd see any other function added.

Or do you expect a need for sumerian_to_maya() soon? ;-)

> (BTW, I miss C++'s const keyword when coding in Perl).

why not ...

use Readonly; Readonly my %has => (key => value, key => value, ...);

If that's too ugly, we could try to define an attribute to do so.

my %has :ro = (key => value, key => value, ...);

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

Replies are listed 'Best First'.
Re^11: A short whishlist of Perl5 improvements leaping to Perl7
by eyepopslikeamosquito (Archbishop) on Nov 29, 2020 at 01:22 UTC

    But it's a Rosetta Stone fire-and-forget demo script and I doubt we'd see any other function added.
    True, but I write Rosetta code snippets to give me insights into real world production code ... so though the examples may be small, I pretend they're serious real-world production code, so as to gain clearer insights into language features.

    Thanks for the tip about Readonly ... which I confess I've never used. Found this good-looking link CPAN modules for defining constants by Neil Bowers (neilb) ... which just made me pine for the simplicity of C++ built-in const keyword. :)

Log In?
Username:
Password:

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

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

    No recent polls found