Re: what I meant about hungarian notation

2001-05-14 Thread Michael G Schwern
On Sun, May 13, 2001 at 11:37:01PM -0500, Me wrote: Yes. But I'm not sure that: # ordered @array = (1, 2, 3, 5, 8); # unordered %hash = (Fred = 22, Jane = 30); is more or less typical than: # unordered: @array = ('England', 'France', 'Germany'); # ordered:

Re: Apoc2 - STDIN concerns

2001-05-14 Thread Bart Lateur
On Thu, 10 May 2001 17:15:09 +0100, Simon Cozens wrote: What you could do, is treat an iterator as something similar to reading a line from a file. Tied filehandles allow something like it in Perl5. You know, if what you say is true, I'd expect to find a module on CPAN which turns the exotic

Re: Apoc2 - STDIN concerns

2001-05-14 Thread Simon Cozens
On Mon, May 14, 2001 at 01:25:51PM +0200, Bart Lateur wrote: There must be some reason why a language like Sather isn't more popular. I think that iters are part of the problem. That smacks of the Politician's Syllogism: Something is wrong. This is something. Therefore this is

Re: what I meant about hungarian notation

2001-05-14 Thread Me
an ordered hash is common Arrays too. not wise ... to alter features just for beginners. Agreed. (PS 11 people isn't a statistic, its a night at the pub) Your round... The extra complexity of a separate hash syntax might be justified for other reasons, but not the ones

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 12:32:37PM -0500, Me wrote: an ordered hash is common Arrays too. not wise ... to alter features just for beginners. Agreed. (PS 11 people isn't a statistic, its a night at the pub) Your round... The extra complexity of a separate

Re: what I meant about hungarian notation

2001-05-14 Thread Me
Hm, OK. What does this access and using what method ? $foo = '1.2'; @bar[$foo]; This is an argument against conflating @ and %. It has nothing to do with using [] instead of {}. (I accept that the @/% issue is problematic. Otoh, I don't yet see @/% conflation as being obviously a bad

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 01:56:01PM -0500, Me wrote: Hm, OK. What does this access and using what method ? $foo = '1.2'; @bar[$foo]; This is an argument against conflating @ and %. No it is not. It has nothing to do with using [] instead of {}. Yes it does. I was asking if the

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 03:23:56PM -0400, Buddha Buck wrote: At 08:10 PM 05-14-2001 +0100, Graham Barr wrote: On Mon, May 14, 2001 at 01:56:01PM -0500, Me wrote: Hm, OK. What does this access and using what method ? $foo = '1.2'; @bar[$foo]; This is an argument against

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
Damian Conway wrote [and John Porter reformats]: @bar[$foo]; # Access element int($foo) of array @bar %bar{$foo}; # Access entry $foo of hash %bar @bar{$foo}; # Syntax error %bar[$foo]; # Syntax error And why is that superior to: @bar[$foo]; # Access element int($foo) of array @bar

Re: what I meant about hungarian notation

2001-05-14 Thread Damian Conway
When all the smoke clears, it will be relatively simple to declare an ordered hash probably on the order of adding a single word to its declaration. Yep. In fact, it's now relatively simple in Perl 5. You just grab the Attribute::Handlers and Tie::SortHash modules and add a single

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 03:41:24PM -0400, John Porter wrote: Damian Conway wrote [and John Porter reformats]: @bar[$foo]; # Access element int($foo) of array @bar %bar{$foo}; # Access entry $foo of hash %bar @bar{$foo}; # Syntax error %bar[$foo]; # Syntax error And why is that

Re: what I meant about hungarian notation

2001-05-14 Thread Me
@bar[$foo]; # A %bar{$foo}; # B @bar{$foo}; # C %bar[$foo]; # D You forgot $bar[$foo]; # $bar is an array reference $bar{$foo}; # $bar is a hash reference I can't argue with that. My vote is now against conflating [] and {}.

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
Graham Barr wrote: As I said in another mail, consider $bar[$foo]; $bar{$foo}; But if @bar is known to be one kind of array or the other, where is the ambiguosity that that is meant to avoid? -- John Porter

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 03:58:31PM -0400, John Porter wrote: Graham Barr wrote: As I said in another mail, consider $bar[$foo]; $bar{$foo}; But if @bar is known to be one kind of array or the other, where is the ambiguosity that that is meant to avoid? I did not say it was

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 02:51:08PM -0500, Me wrote: survey ? I never saw any survey, It was an informal finger-in-the-wind thing I sent to a perl beginners list. Nothing special, just a quick survey. http://www.self-reference.com/cgi-bin/perl6plurals.pl As someone else pointed out (I

Re: what I meant about hungarian notation

2001-05-14 Thread Bart Lateur
On Mon, 14 May 2001 20:38:31 +0100, Graham Barr wrote: You forgot $bar[$foo]; # $bar is an array reference $bar{$foo}; # $bar is a hash reference As to what the combined $bar[$foo] would mean: that depends on what $bar contains. (Aw! That hurt!) -- Bart.

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
Bart Lateur wrote: As to what the combined $bar[$foo] would mean: that depends on what $bar contains. I think it would depend on what the declared type of @bar was (i.e. ordered or associative). -- John Porter

Re: what I meant about hungarian notation

2001-05-14 Thread Me
As someone else pointed out (I forget who). But beginners are not always the best people to ask. Beginner don't stay beginners for long I think the quote was. And as I said before, I agree. I picked the beginners list as much because it was active as anything else. They are *somebody* after

Re: what I meant about hungarian notation

2001-05-14 Thread Edward Peschko
On Mon, May 14, 2001 at 10:11:01PM +0200, Bart Lateur wrote: On Mon, 14 May 2001 20:38:31 +0100, Graham Barr wrote: You forgot $bar[$foo]; # $bar is an array reference $bar{$foo}; # $bar is a hash reference As to what the combined $bar[$foo] would mean:

Re: what I meant about hungarian notation

2001-05-14 Thread Me
(i.e. ordered or associative). A (probably futile, but one has to try) plea for people to use numbered rather than ordered. @foo = ['England', 'France', 'Germany'];# unordered %foo = {First = Fred', Last = 'Bloggs']; # ordered (I'd also suggest named instead of the scientific

Re: what I meant about hungarian notation

2001-05-14 Thread Simon Cozens
On Mon, May 14, 2001 at 08:38:31PM +0100, Graham Barr wrote: What is the meaning of the following four expressions in Perl6? @bar[$foo]; %bar{$foo}; @bar{$foo}; %bar[$foo]; $bar[$foo]; $bar{$foo}; It's really, really easy. Just

RE: what I meant about hungarian notation

2001-05-14 Thread David Whipp
Edward Peschko wrote: As to what the combined $bar[$foo] would mean: that depends on what $bar contains. I like visual clues to tell me what type of variable something is. And I disagree strongly with trying to steamroller the language's design paper-flat as much as I

RE: Apoc2 - STDIN concerns

2001-05-14 Thread David Grove
On Mon, May 14, 2001 at 01:25:51PM +0200, Bart Lateur wrote: There must be some reason why a language like Sather isn't more popular. I think that iters are part of the problem. That smacks of the Politician's Syllogism: Something is wrong. This is something. Therefore this

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
Simon Cozens wrote: It's really, really easy. Just stick a - between the variable and the brace, and you have Perl 5. Pardon my indelicacy, but - Screw how it looks in Perl5. We can make it mean anything, and appear anyhow we want. IOW, what makes sense in Perl6 isn't defined by how we were

Re: what I meant about hungarian notation

2001-05-14 Thread Simon Cozens
On Mon, May 14, 2001 at 04:50:17PM -0400, John Porter wrote: Pardon my indelicacy, but - Screw how it looks in Perl5. I'm not telling you how it *looks* in Perl 5, I'm telling you (in Perl 5 terms) what it will *mean*. -- Use an accordion. Go to jail. -- KFOG, San Francisco

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
Simon Cozens wrote: I'm not telling you how it *looks* in Perl 5, I'm telling you (in Perl 5 terms) what it will *mean*. Fine, you're using perl5 as pseudocode. I could do that too. But it has no bearing on the desirability of anyone's proposed perl6 syntax or semantics. -- John Porter

RE: what I meant about hungarian notation

2001-05-14 Thread David Grove
On Mon, May 14, 2001 at 04:50:17PM -0400, John Porter wrote: Pardon my indelicacy, but - Screw how it looks in Perl5. I'm not telling you how it *looks* in Perl 5, I'm telling you (in Perl 5 terms) what it will *mean*. nice save p

A summary: %, @, [], {}

2001-05-14 Thread Me
I will read replies, and respond to off list emails, but I will refrain from posting to the list on this topic for at least one week. If you have nothing new to add, then please don't post. Suggestion: pseudohash. %foo{Fred} = 'Bloggs'; $bar = %bar[1];# $bar is 'Bloggs'