Re: Sigils by example

2007-05-16 Thread herbert breunung
Larry Wall wrote: Language design is hard. Let's go shopping! :-) Larry daddy daddy i want a pony, oh wait the ponie is dead, i hope i didnt say something wrong :-)

Re: Sigils by example

2007-05-14 Thread Larry Wall
Language design is hard. Let's go shopping! :-) Larry

Re: variable type specific sigils (was Re: Sigils by example)

2007-05-14 Thread Darren Duncan
At 5:00 PM -0700 5/14/07, Darren Duncan wrote: On the other hand, unless this steps on something, I could suggest dropping the @ and % anyway, so we have $array and $hash, and then we could instead use the @ and % sigils as a prefix to indicate in that case that we want them to copy by value.

variable type specific sigils (was Re: Sigils by example)

2007-05-14 Thread Darren Duncan
Speaking just for my own preferences, I very much like having sigils to differentiate variables from routines, that is, a $ prefix versus either & or no prefix. However, I generally do *not* like the @ and % prefixes. They seem somewhat contrived so to cover very specific variable types while

Re: Sigils by example

2007-05-14 Thread Juerd Waalboer
Thomas Wittek skribis 2007-05-15 1:52 (+0200): > Would it be a good idea to call methods on objects, that never thought > of this methods? Absolutely! Roles can be used for that too. -- korajn salutojn, juerd waalboer: perl hacker <[EMAIL PROTECTED]> convolution:

Re: Sigils by example (was: Re: Is Perl 6 too late?)

2007-05-14 Thread Jonathan Lang
Mark J. Reed wrote: Jonathan Lang wrote: > Good examples. Now could you provide some to explain to me why it's > important to distinguish between '$', '@', '%', and '&'? I ask > because I've seen a lot of object-based code that has said stuff like > '$container{$key}'; Well, $container{$key} i

Re: Sigils by example

2007-05-14 Thread Thomas Wittek
Juerd Waalboer schrieb: > Thomas Wittek skribis 2007-05-15 0:48 (+0200): >>> The Perl Way: >>> $object.foo() calls the method called "foo". >>> $object.$foo() calls the method that is in the variable $foo. >> My way: >> someref = &somemethod >> object.someref() >> Of course you could argue that yo

Re: Sigils by example

2007-05-14 Thread Thomas Wittek
chromatic schrieb: > On Monday 14 May 2007 15:48:24 Thomas Wittek wrote: > >> But it should be no problem to put out a warning/error at runtime (or >> maybe even at compile time) when a variable name clashes with a method >> name. > > Do you always know all of the method names in your entire memo

Re: Sigils by example

2007-05-14 Thread chromatic
On Monday 14 May 2007 15:48:24 Thomas Wittek wrote: > But it should be no problem to put out a warning/error at runtime (or > maybe even at compile time) when a variable name clashes with a method > name. Do you always know all of the method names in your entire memory space at compile time? --

Re: Sigils by example (was: Re: Is Perl 6 too late?)

2007-05-14 Thread Juerd Waalboer
Jonathan Lang skribis 2007-05-14 14:52 (-0700): > Good examples. Now could you provide some to explain to me why it's > important to distinguish between '$', '@', '%', and '&'? It's useful code self documentation, but not very important, in my opinion. If you have sigils, it makes sense to have

Re: Sigils by example

2007-05-14 Thread Juerd Waalboer
Thomas Wittek skribis 2007-05-15 0:48 (+0200): > > The Perl Way: > > $object.foo() calls the method called "foo". > > $object.$foo() calls the method that is in the variable $foo. > My way: > someref = &somemethod > object.someref() > Of course you could argue that you don't know in advance, if "o

Re: Sigils by example

2007-05-14 Thread Thomas Wittek
Juerd Waalboer wrote: > Thomas Wittek skribis 2007-05-14 22:20 (+0200): >> But I think that the name of an identifier (noun/verb, single/plural, >> the meaning of the word) already gives enough context to understand what >> type it is. > > [examples] You are right, I should have weakened this sent

Re: Sigils by example (was: Re: Is Perl 6 too late?)

2007-05-14 Thread Mark J. Reed
On 5/14/07, Jonathan Lang <[EMAIL PROTECTED]> wrote: Good examples. Now could you provide some to explain to me why it's important to distinguish between '$', '@', '%', and '&'? I ask because I've seen a lot of object-based code that has said stuff like '$container{$key}'; Well, $container{$k

Re: Sigils by example (was: Re: Is Perl 6 too late?)

2007-05-14 Thread Jonathan Lang
Good examples. Now could you provide some to explain to me why it's important to distinguish between '$', '@', '%', and '&'? I ask because I've seen a lot of object-based code that has said stuff like '$container{$key}'; it seems that there's an assumption that $foo can be used as a list, a hash

Sigils by example (was: Re: Is Perl 6 too late?)

2007-05-14 Thread Juerd Waalboer
Thomas Wittek skribis 2007-05-14 22:20 (+0200): > But I think that the name of an identifier (noun/verb, single/plural, > the meaning of the word) already gives enough context to understand what > type it is. So is "user_id" a variable or a type? How about "substring" or "document"? Is "new" a fu