Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^6: what would you like to see in perl5.12?

by blazar (Canon)
on Aug 20, 2007 at 20:06 UTC ( [id://633929]=note: print w/replies, xml ) Need Help??


in reply to Re^5: what would you like to see in perl5.12?
in thread what would you like to see in perl5.12?

But Perl, either in its 5 or 6 incarnation is not going to have pointers anyway. Also, in 6 the static type system is optional, and in 5, should it ever be brought to it, it would too.

  • Comment on Re^6: what would you like to see in perl5.12?

Replies are listed 'Best First'.
Re^7: what would you like to see in perl5.12?
by Jenda (Abbot) on Aug 20, 2007 at 23:06 UTC
      Yeah, it doesn't have pointers, it has references. Is the difference between the two relevant? I think not!

      In this context, it is. Because nobody is proposing to (to paraphrase your previous example) have function signatures for e.g. references of references of arrays of Int. That model just doesn't fit in Perl because you don't use references for the same purposes that you do in C. FWIW they will even be more transparent in Perl 6.

      sub neuter (Dog $bobby is rw) { ... }

        Nobody proposed (or expected!) to ever have function signatures for references of references of arrays of int in C either. Y'know it all looked so neat an simple with int foo; and char* bar and real baz[10], except that, well, life was not so simple. Even in the horribly restricted "type system" of C.

        What is the difference between a pointer and a reference again? Not much really. A reference must point to something. You can't "typecast" a reference to look at the same memory as if it was a totally different thing. You can't increment a reference to get "the next thing of the same type in memory". And you can't construct a reference out of an integer, an address. None of this is in any way related to function signatures (I don't like that term at all.) or variable types. The optionality of type specifications would make it possible to stop trying to circumvent the misdesigned notation and just leave it untyped. Which would IMHO be a shame.

Log In?
Username:
Password:

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

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

    No recent polls found