Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: RFC: Simulating Signatures

by LanX (Saint)
on Apr 23, 2013 at 15:10 UTC ( [id://1030170]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: Simulating Signatures
in thread RFC: Simulating Ruby's "yield" and "blocks" in Perl

> Besides these don't offer signatures in the true sense.

I suppose with true signatures you mean something like test($x, $y , @opt).

This can only be added by modifying the parser, something far beyond syntactic sugar.

I heard that p5p recently discussed it but with no real outcome (plz prove me wrong).

The essential problem with defining signatures is that the variables (normally) need to be lexicals.

> I understand you add a few extra features to the first thing.

But that's the point. I recently gave a longer workshop for my client about how to do parameter check in Perl. This really results in much code... and many people where either frustrated or bored.

Many extra features within an easy syntax do motivate people! And maybe one day these extra features could be reused by a "true" implementation of signatures.

Cheers Rolf

( addicted to the Perl Programming Language)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-03-28 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found