Re: defined: Short-cutting on || with undef only.

2001-02-16 Thread Philip Newton
On 15 Feb 2001, at 20:52, [EMAIL PROTECTED] wrote: > On Thu, Feb 15, 2001 at 10:31:34AM -0300, Branden wrote: > > With Perl 6, it will (probably) be possible to have values with boolean > > value independent of integer or string values, so that it will be possible > > to have a value that when vi

Re: PDD 2: sample add()

2001-02-16 Thread David Mitchell
Ken Fox <[EMAIL PROTECTED]> wrote: > David Mitchell wrote: > > To get my head round PDD 2, I've just written the the outline > > for the body of the add() method for a hypophetical integer PMC class: > > [... lots of complex code ...] > > I think this example is a good reason to consider only ha

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
<[EMAIL PROTECTED]> wrote: > As I wrote elsewhere, other reasons not to change the behaviour of my: > > GetOptions (foo => \my $foo, > bar => \my $bar); > GetOptions (foo => \my($foo), bar => \my($bar)); > tie my $shoe => $tring; > tie my($shoe) => $tring; #

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Bryan C . Warnock
On Friday 16 February 2001 07:36, Branden wrote: > But it surely isn't > consistent with the rest of the language. It's consistent with "our" and "local", which are really the only other things in the language that parallel its use. -- Bryan C. Warnock bwarnock@(gtemail.net|capita.com)

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
<[EMAIL PROTECTED]> wrote: > @a = (1 .. 10); > $a, $b, $c = @_; > > $c becomes 10. Should $c become 3 when my is placed before $a? > No. If my binds weaker than =, it would be my $a, $b, $c = @_; is the same as my $a, $b, ($c = @_); as the opposite of (my $a, $b, $c) =

Re: string encoding

2001-02-16 Thread Simon Cozens
On Thu, Feb 15, 2001 at 05:09:45PM -0800, Hong Zhang wrote: > People in Japan/China/Korea have been using multi-byte encoding for > long time. I personally have used it for more 10 years. And now you have a chance to not do so. Isn't that *nice*? -- Term, holidays, term, holidays, till we leav

Re: string encoding

2001-02-16 Thread Simon Cozens
On Thu, Feb 15, 2001 at 04:55:00PM -0800, Hong Zhang wrote: > > On Thu, Feb 15, 2001 at 03:59:54PM -0800, Hong Zhang wrote: > > > The concept of characters have nothing to do with codepoints. > > > Many characters are composed by more than one codepoints. > > > > This isn't true. > > What do you

Re: string encoding

2001-02-16 Thread Branden
Simon Cozens wrote: > On Thu, Feb 15, 2001 at 03:59:54PM -0800, Hong Zhang wrote: > > The concept of characters have nothing to do with codepoints. > > Many characters are composed by more than one codepoints. > > This isn't true. > Yes, for UTF-16 it is. For UTF-32 it isn't, but unless you want

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
Edward Peschko wrote: > How about 'an implicit parens around a set of statements separated by commas > in any context'? This is consistent > > $a, $b, $c = $d, $e, $f; # ($a, $b, $c) = ($d, $e, $f); > I guess this should be $a, $b, ($c = $d), $e, $f I think making `my' work just the same as

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
<[EMAIL PROTECTED]> wrote: > > tie (my $shoe) => $string; > > Not enough arguments for tie... > tie +(my $shoe) => $string; This is the same as would happen to `print', for example. Or else, the easyer tie my($shoe) => $string; It doesn't look like a function, so it isn't. > > Ah, mo

Re: string encoding

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 12:26:43PM +, Simon Cozens wrote: > On Fri, Feb 16, 2001 at 10:24:51AM -0300, Branden wrote: > > Yes, for UTF-16 it is. For UTF-32 it isn't > > Yes, it damned well is. I mean, no, it damned well isn't. But you probably guessed that. > You're confusing "codepoint" wit

Re: string encoding

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 10:24:51AM -0300, Branden wrote: > Yes, for UTF-16 it is. For UTF-32 it isn't Yes, it damned well is. You're confusing "codepoint" with "number of bytes in representation". -- I would imagine most of the readers of this group would support abortion as long as fifty or s

Re: string encoding

2001-02-16 Thread Branden
Dan Sugalski wrote: > At 05:09 PM 2/15/2001 -0800, Hong Zhang wrote: > >People in Japan/China/Korea have been using multi-byte encoding for > >long time. I personally have used it for more 10 years. I never feel > >much of the "pain". Do you think I are using my computer with O(n) > >while you are

byteperl ?

2001-02-16 Thread Vijaya Kumar C
Hai, as Beatie says byteperl is a standalone application that runs system independent bytecode generated by O Module and Bmodule backend. Perl will get another height if it is a success . As larry says perl will generate C,C++ and Java codes(?).. I am interested in developing a application tha

Re: Garbage collection (was Re: JWZ on s/Java/Perl/)

2001-02-16 Thread Tim Bunce
On Thu, Feb 15, 2001 at 02:26:10PM -0500, Uri Guttman wrote: > > "TB" == Tim Bunce <[EMAIL PROTECTED]> writes: > > TB> As a part of that the weak reference concept, bolted recently into > TB> perl5, could be made more central in perl6. > > TB> Around 92.769% of the time circular refere

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
Bryan C. Warnock wrote: > On Friday 16 February 2001 07:36, Branden wrote: > > But it surely isn't > > consistent with the rest of the language. > > It's consistent with "our" and "local", which are really the only other > things in the language that parallel its use. > Well, `local' is actually

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
I said: > Anyway, I don't see why `local' (and `our' and `my') should bind more > strongly than , and = . They are list operators, they should behave the same > as those. > Actually, they *look like* list operators, they should behave like those. > - Branden > >

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Bryan C . Warnock
On Friday 16 February 2001 09:24, Branden wrote: > I said: > > Anyway, I don't see why `local' (and `our' and `my') should bind more > > strongly than , and = . Because the implicit global scope declarator binds that tightly. Because you lose the ability to mix scope declarators in an assigment.

Re: Garbage collection (was Re: JWZ on s/Java/Perl/)

2001-02-16 Thread Uri Guttman
> "TB" == Tim Bunce <[EMAIL PROTECTED]> writes: TB> On Thu, Feb 15, 2001 at 02:26:10PM -0500, Uri Guttman wrote: >> > "TB" == Tim Bunce <[EMAIL PROTECTED]> writes: >> TB> As a part of that the weak reference concept, bolted recently into TB> perl5, could be made more central in

Re: Generating Perl 6 source with Perl

2001-02-16 Thread Andy Dougherty
On Fri, 16 Feb 2001, Simon Cozens wrote: > Larry has guaranteed that Perl 6 will be built "out of the same source tree" > as Perl 5. This is a major win for us in two areas. Firstly, we can reuse the > information determined by Perl 5's Configure process to help make Perl 6 > portable: > Second

Re: string encoding

2001-02-16 Thread Hong Zhang
> > What do you mean? Have you seen people using multi-byte encoding > > in Japan/China/Korea? > > You're talking to the wrong person. Japanese data handling is my graduate > dissertation. :) > > The Unified Hangul/Kanji/Ha'nzi' Characters in Unicode (so-called "Unihan") > occupy one and only one

Re: string encoding

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 12:32:10PM -0800, Hong Zhang wrote: > Did it buy you much? I don't believe so. Can you give some examples why > random character access is so important? substr's already been mentioned. Regular expressions. Perl does rather a lot of them. We've already found from Perl 5 d

Re: string encoding

2001-02-16 Thread Bryan C . Warnock
On Friday 16 February 2001 15:35, Simon Cozens wrote: > On Fri, Feb 16, 2001 at 12:32:10PM -0800, Hong Zhang wrote: > > Did it buy you much? I don't believe so. Can you give some examples why > > random character access is so important? > > substr's already been mentioned. > > Regular expression

Re: Generating Perl 6 source with Perl

2001-02-16 Thread Bryan C . Warnock
On Friday 16 February 2001 14:55, Simon Cozens wrote: > Secondly and more importantly, it guarantees that we've got a copy of Perl on > hand before Perl 6 is built. This allows us to reduce the level of > preprocessor muddling by effectively generating the C source to Perl 6 from > templates and

Re: string encoding

2001-02-16 Thread Dan Sugalski
At 12:32 PM 2/16/2001 -0800, Hong Zhang wrote: > > > What do you mean? Have you seen people using multi-byte encoding > > > in Japan/China/Korea? > > > > You're talking to the wrong person. Japanese data handling is my graduate > > dissertation. :) > > > > The Unified Hangul/Kanji/Ha'nzi' Characte

Re: string encoding

2001-02-16 Thread Dan Sugalski
At 12:20 PM 2/16/2001 -0800, Hong Zhang wrote: > > >People in Japan/China/Korea have been using multi-byte encoding for > > >long time. I personally have used it for more 10 years. I never feel > > >much of the "pain". Do you think I are using my computer with O(n) > > >while you are using it with

Re: Generating Perl 6 source with Perl

2001-02-16 Thread Nicholas Clark
On Fri, Feb 16, 2001 at 07:55:10PM +, Simon Cozens wrote: > Secondly and more importantly, it guarantees that we've got a copy of Perl on > hand before Perl 6 is built. This allows us to reduce the level of > preprocessor muddling by effectively generating the C source to Perl 6 from > templa

Re: Generating Perl 6 source with Perl

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 08:52:03PM +, Nicholas Clark wrote: > macro languages and symbolic debuggers don't mix well. Generated output would be Real Life C. I'm thinking something along the lines of perl vtable.pl < vtable.spec > vtable.c which would work just fine with symbolic debuggers

Re: Generating Perl 6 source with Perl

2001-02-16 Thread Sam Tregar
On Fri, 16 Feb 2001, Simon Cozens wrote: > On Fri, Feb 16, 2001 at 08:52:03PM +, Nicholas Clark wrote: > > macro languages and symbolic debuggers don't mix well. > > Generated output would be Real Life C. I'm thinking something along the lines > of > perl vtable.pl < vtable.spec > vtable.

Re: string encoding

2001-02-16 Thread Hong Zhang
> Then you would be incorrect. To find the character at position 233253 in a > variable-length encoding requires scanning the string from the beginning, > and has a rather significant potential cost. You've got a test for every > character up to that point with a potential branch or two on each on

Re: string encoding

2001-02-16 Thread Hong Zhang
> substr's already been mentioned. I have already given the counter argument. The codepoint position is useless in many cases. They should be deprecated. > Regular expressions. Perl does rather a lot of them. We've already found from > Perl 5 development that they get nasty when variable length

Generating Perl 6 source with Perl

2001-02-16 Thread Simon Cozens
Larry has guaranteed that Perl 6 will be built "out of the same source tree" as Perl 5. This is a major win for us in two areas. Firstly, we can reuse the information determined by Perl 5's Configure process to help make Perl 6 portable: for instance, I expect we'll still be using the [UI](8|16|32

Re: string encoding

2001-02-16 Thread Hong Zhang
> And address arithmetic and mem(cmp|cpy) is faster than array iteration. Ha Ha Ha. You must be kidding. The mem(cmp|cpy) work just fine on UTF-8 string comparison and copy. But the memcmp() can not be used for UTF-32 string comparison, because of endian issue. Hong

GC sublist?

2001-02-16 Thread Stephen P. Potter
Is this (these) thread(s) to the point where it is worth spinning off a new sublist? If a couple of the main contributors (Dan, Simon, Branden, etc) say yes, can we get perl6-internals-gc created? -spp

Re: GC sublist?

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 02:54:04PM -0500, Stephen P. Potter wrote: > Is this (these) thread(s) to the point where it is worth spinning off a new > sublist? If a couple of the main contributors (Dan, Simon, Hey, I proudly know *nothing* about GC. > say yes, can we get perl6-internals-gc created?

Re: string encoding

2001-02-16 Thread Hong Zhang
> >People in Japan/China/Korea have been using multi-byte encoding for > >long time. I personally have used it for more 10 years. I never feel > >much of the "pain". Do you think I are using my computer with O(n) > >while you are using it with O(1)? There are 100 million people using > >variable-l

Re: Generating Perl 6 source with Perl

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 04:00:05PM -0500, Sam Tregar wrote: > I think he meant that using a symbolic debugger is hard, not that it > wouldn't work. After all, when GDB is tell you that: >(*fooz).blazt[10].mark[0]->set(fungle(10)); > Is causing a seg fault and all you wrote was: >$fooz->se

Re: string encoding

2001-02-16 Thread Hong Zhang
> >Did it buy you much? I don't believe so. Can you give some examples why > >random character access is so important? Most people are processing text > >linearly. > > Most, but not all. And as this is the internals list, we have to deal with > all. We can't choose a convenient subset and ignore t

Re: string encoding

2001-02-16 Thread Bryan C . Warnock
On Friday 16 February 2001 16:20, Hong Zhang wrote: > > And address arithmetic and mem(cmp|cpy) is faster than array iteration. > > Ha Ha Ha. You must be kidding. > > The mem(cmp|cpy) work just fine on UTF-8 string comparison and copy. > But the memcmp() can not be used for UTF-32 string compari

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Bryan C . Warnock
On Friday 16 February 2001 11:20, Branden wrote: > proposal. I don't think it works, because > > $a, $b, $c = @_;# $c gets 10 for @_=(1..10) > > mean a different thing that > > my $a, $b, $c = @_; # $c gets 3 for @_=(1..10) It does? > > The last code should behave as >

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread Bryan C . Warnock
On Friday 16 February 2001 11:38, Branden wrote: > > (my($a),our($b),local($,),my($c)) = @_; > > What is it, anyway? A joke? (There's Perl poetry, why can't be there Perl > jokes?) Who writes this kind of code anyway? Okay, you caught me, it was a contrived exampled. The actual code was

The binding of "my" (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread Nathan Wiger
Branden wrote: > > As to the second item b), I would say I withdraw my complaints about `my' if > my other proposal of `use scope' gets approved (since then I don't need `my' > anymore!). I guess I would be happier with `use scope', and I also think it > would make you happier, since it wouldn't

Re: Closures and default lexical-scope for subs

2001-02-16 Thread John Porter
Branden wrote: > a) Many of us want Perl to have globals as default, what is opposed to > some that want `use strict' and `-w' turned on by default. You are profoundly confused. Globals *are* the default in current perl; and having strict 'vars' on does not magically change that. strict 'subs',

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread John Porter
Nathan Wiger wrote: > Let alone that this: >my $x, $y, $z; > Doesn't DWIM, again according to what most people think. Come on. What's so hard about knowing ( $x, $y, $z ) is a bunch of variables, and my( $x, $y, $z ) is a bunch of variables declared local. Answer: nothing.

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
John Porter wrote: > It turns > out that 'my' having higher precedence than comma is signficantly > more useful than if it had a lower precedence. > Well, for me, it isn't useful, unless you can show me I'm wrong. At least give me an example that shows it's more useful this way. > Let's all just

Re: Warnings, strict, and CPAN

2001-02-16 Thread John Porter
[EMAIL PROTECTED] wrote: > > Even with warnings on, they are all too often ignored. Just today I > got an email from a friend asking "why doesn't this program work"? > The program was throwing a warning, but he'd ignored it. Turns out it > was one of the problems. And he's no newbie. Bizarre.

Re: End-of-scope actions: do/eval duality.

2001-02-16 Thread Bart Lateur
On Thu, 15 Feb 2001 10:04:51 -0300, Branden wrote: >Why `do FILE' behaves like eval, if there's eval to do it? Isn't this a >little too much not-orthogonal? Why don't we require `eval { do FILE }' to >have the behaviour of not dying and setting $@ ? The reason for its existence is simple: histor

Re: The binding of "my" (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread Branden
Nathan Wiger wrote: > > I wouldn't be so hasty to withdraw from the my binding argument. There's > many uses of "my" that are required even with the "use scope" pragma (at > least as I described it in RFC 64, but feel free to point it out if I > missed an application). I think there's some good ch

Re: The binding of "my" (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread Jarkko Hietaniemi
>FOR >--- > 1. It becomes more consistent with other Perl functions my is not a function. It is a declaration. Functions take arguments and return values. my does not. It is language construct like if. Unless, of course, you claim that if is a function, too. That ways lies LISP.

Re: Go to perl6-language-strict please (was Re: Warnings, strict, and CPAN)

2001-02-16 Thread Edward Peschko
On Fri, Feb 16, 2001 at 03:51:31PM -0500, [EMAIL PROTECTED] wrote: > Can we take this thread over to perl6-language-strict? Its where it > belongs. Then you can argue to your heart's content and let us know > when you've reached a conclusion. Ok, that seems fair enough. But I really don't think

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Jonathan Scott Duff
On Fri, Feb 16, 2001 at 01:20:43PM -0300, Branden wrote: > `my' DWIMs. `my' will do what *you* mean at the cost of every single existing perl programmer that currently uses it to relearn what it means. Not a good trade off IMHO. I'd rather `my' does what *I* mean which is what it does now. > I

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
Bryan C. Warnock wrote: > Oh, wait, commas are now implicitly parenthesized, so that > (my $a, $b, $c) = @_; > can be written as > my $a, $b, $c = @_; > Oh! I never said commas are implicitly parenthesized! That was other proposal. I don't think it works, because $a, $b, $c = @_;# $

Re: Closures and default lexical-scope for subs

2001-02-16 Thread John Porter
Branden wrote: > Anyway, I don't see why `local' (and `our' and `my') should bind more > strongly than , and = . They are list operators, they should behave > the same as those. "In general, perl does what you want -- unless what you want is consistency." The point is that consistency is NOT the

Re: Closures and default lexical-scope for subs

2001-02-16 Thread John Porter
Edward Peschko wrote: > well, for the small fraction of people that use it, they probably are > experienced and know to use parens to disambiguate. No, *everyone* knows to use parens to disambiguate. > And anyways: > my $a, $b, $c = @_; > not working is 'very hard to bugtrack and totally une

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread Peter Scott
At 09:56 AM 2/16/2001 -0500, John Porter wrote: > > As for the -q thing, I think it is far *less* of a burden to add "use > > strict" and "use warnings" when you're writing a big piece of code. When > > you're writing 5 lines, every extra character counts. When you're > > writing 500 or 5000 lines

Go to perl6-language-strict please (was Re: Warnings, strict, and CPAN)

2001-02-16 Thread schwern
Can we take this thread over to perl6-language-strict? Its where it belongs. Then you can argue to your heart's content and let us know when you've reached a conclusion.

Re: The binding of "my" (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread John Porter
This just isn't making sense. Currently one has to write my( $x, $y, $z ) = @_; And you're willing to eviscerate perl to save two keystrokes; you say you'd be happy with either my $x, $y, $z = @_; or ( $x, $y, $z ) = @_; but the (consequent) fact that $x, $y,

Re: The binding of "my" (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread John Porter
Simon Cozens wrote: > John Porter wrote: > > But they are inextricably bound by perl's parsing rules. > > Perl 5's parsing rules. I don't think Perl 6 *has* a parser just yet. As someone else said before me, Perl should not be changed Just Because We Can. Aspects which have proven usefulness a

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread John Porter
> Why with `my' I do need them? Why don't these behave the same? Because the precedence is different. Remember, 'my' is a lexical construct. It does not "return" a value, and it does not take "arguments" -- not in the runtime sense. It applies only to literal variable symbols. It is meaningless (

Re: Auto-install (was autoloaded...)

2001-02-16 Thread Stephen P. Potter
Lightning flashed, thunder crashed and "Branden" <[EMAIL PROTECTED]> whisp ered: | For the list managers: Could we have a list apart from -language, so that we | don't bother all with this `par'-issue ??? Please? Perhaps a list that | includes the issue on directory structure, and other issues re

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread Branden
John Porter wrote: > > Having `my' with the same precedence rules as `print' for example, > > 'my' is not 'print', it is not like 'print', is not comparable > to 'print'. Please stop with the bogus comparisons. > Agree they're different (one is compile-time, other runtime, and much more differe

Re: Auto-install (was autoloaded...)

2001-02-16 Thread Andy Dougherty
On Fri, 16 Feb 2001, Stephen P. Potter wrote: > How about a perl6-install list? This discussion really doesn't fit into > any of the current top level lists, so we can make a new top level and > cover other installation issues as well. Ask, can you make this, if the > name is agreeable. There

Re: The binding of "my" (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread John Porter
Nathan Wiger wrote: > To rehash, all this discussion should involve is the possibility of > making "my" swallow its list args: >my $x, $y, $z; # same as my($x, $y, $z) > That's it. No changing the way lists and , and = work in Perl. But they are inextricably bound by perl's parsing rules.

Re: The binding of "my" (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 03:45:21PM -0500, John Porter wrote: > But they are inextricably bound by perl's parsing rules. Perl 5's parsing rules. I don't think Perl 6 *has* a parser just yet. > You can't keep Perl6 Perl5. See? -- What happens if a big asteroid hits the Earth? Judging from real

Re: Closures and default lexical-scope for subs

2001-02-16 Thread John Porter
Simon Cozens wrote: > > John, settle down. None of us profess to be fantastic language designers, > which is why we gave Larry the job. That being done, I'm not entirely sure why > people are continuing to argue about these things. :) You're right, of course. I should have faith that Larry will

Re: Warnings, strict, and CPAN

2001-02-16 Thread schwern
On Fri, Feb 16, 2001 at 02:48:01PM -0800, Edward Peschko wrote: > 1) be lax on warnings and strict in a script, assume strictness and >warnings in the modules. Rationale: in a script, you really > have an audience of one. With few exceptions, you are only >

Re: Warnings, strict, and CPAN

2001-02-16 Thread Edward Peschko
On Fri, Feb 16, 2001 at 06:33:46PM -0500, [EMAIL PROTECTED] wrote: > On Fri, Feb 16, 2001 at 02:48:01PM -0800, Edward Peschko wrote: > > 1) be lax on warnings and strict in a script, assume strictness and > >warnings in the modules. Rationale: in a script, you really > >ha

Re: Auto-install (was autoloaded...)

2001-02-16 Thread Ask Bjoern Hansen
On Fri, 16 Feb 2001, Stephen P. Potter wrote: > Lightning flashed, thunder crashed and "Branden" <[EMAIL PROTECTED]> whisp > ered: > | For the list managers: Could we have a list apart from -language, so that we > | don't bother all with this `par'-issue ??? Please? Perhaps a list that > | inclu

Re: Warnings, strict, and CPAN

2001-02-16 Thread John Porter
Edward Peschko wrote: > And don't dismiss 1 as trivial. I personally have spent hours > tracking down simple bugs that I otherwise would have found > within SECONDS with 'use strict'. Which is why, after going through this twice, I now habitually blow in 'use strict' without a moment's thought. (

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 10:26:40AM -0500, John Porter wrote: > Oh, that's a terrific improvement. > Basically you want to change (= break) the current precedence > of the comma operator. Thank you, Mr. Language Designer. John, settle down. None of us profess to be fantastic language designers, w

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread John Porter
Edward Peschko wrote: > NOTE: to perl5 users - by default, perl is doing more up-front error checking. > To get the old behavior, you can say 'perl -q' in front of your scripts, Yep; the perl manpage has said, since time immemorial, that the fact that -w was not on by default is a BUG. So chan

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
John Porter wrote: > > Well, for me, it isn't useful, unless you can show me I'm wrong. At least > > give me an example that shows it's more useful this way. > > First, we must always remember that whatever we do, we can > force explicit precedence through the addition of parentheses. > The cases

Re: Closures and default lexical-scope for subs

2001-02-16 Thread Branden
Well, I'll try to reach to an agreement here, since this discussion is getting pretty much pointless. What do we know: a) Many of us want Perl to have globals as default, what is opposed to some that want `use strict' and `-w' turned on by default. b) Some of us (that would be me, I think) think

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-16 Thread Branden
John Porter wrote: > Come on. What's so hard about knowing > ( $x, $y, $z ) > is a bunch of variables, and > my( $x, $y, $z ) > is a bunch of variables declared local. > Answer: nothing. > If you see some code saying my $a, $b, $c; Would you say $b and $c are subject to a different scoping

Re: string encoding

2001-02-16 Thread Dan Sugalski
At 06:47 PM 2/16/2001 -0800, Hong Zhang wrote: >I like to wrap up my argument. > >I recommend to use UTF-8 as the sole string encoding. >If we end up with multiple encodings, there is absolutely >no point for this argument. Um, I hate to point this out, but perl isn't going to have a single strin

Re: Warnings, strict, and CPAN

2001-02-16 Thread Edward Peschko
> > Basically, I want '-w' back as a useful tool. > > That's interesting, why isn't it useful now? And why is that related > to making it the default? (I'm honestly curious) Its because '-w' is a global switch. To wit: --AA.pm-- my $a = undef; print $a; --a.p-- use AA; my $a = undef; pri

Re: Warnings, strict, and CPAN

2001-02-16 Thread schwern
This is a cross-over from perl6-language. First off, I'd like to make it clear that I'm *not* arguing against the advantages of having strict and warnings on. I turn them on for every program I write (except strict for one-liners) and strongly advocate that everyone else do the same. However,

Re: Warnings, strict, and CPAN

2001-02-16 Thread schwern
I'm moving this over to perl6-language-strict. On Fri, Feb 16, 2001 at 03:48:22PM -0800, Edward Peschko wrote: > Why? Its not the filename, its how its used - > > require("A"); # library - strict, warnings on > use A;# library - strict, warnings on > do "A"# li

Re: Warnings, strict, and CPAN

2001-02-16 Thread Peter Scott
At 05:33 PM 2/16/01 -0500, [EMAIL PROTECTED] wrote: >This is a cross-over from perl6-language. Good, I love cross-overs. It's not as good as a The Tick/Eraserhead cross-over, but it'll do. >First off, I'd like to make it clear that I'm *not* arguing against >the advantages of having strict and

Re: Warnings, strict, and CPAN

2001-02-16 Thread Peter Scott
At 10:13 PM 2/16/01 -0500, [EMAIL PROTECTED] wrote: >On Fri, Feb 16, 2001 at 06:22:45PM -0800, Edward Peschko wrote: > > I *want* a global switch. I want the ability to never have to forget to > type > > 'use warnings' in a package and track it down for hour upon hour. Or 'use > > strict'. I do

Re: Warnings, strict, and CPAN

2001-02-16 Thread schwern
On Fri, Feb 16, 2001 at 06:52:22PM -0800, Peter Scott wrote: > S'not about saving keystrokes, as many times as I do type the same things > in every file; it's about giving newbies the right introduction to the > language and providing appropriate feedback at the appropriate level of > individua

Re: Warnings, strict, and CPAN

2001-02-16 Thread Peter Scott
At 09:36 PM 2/16/01 -0500, [EMAIL PROTECTED] wrote: >On Fri, Feb 16, 2001 at 06:08:20PM -0800, Peter Scott wrote: > > But if you want P6 to be so backwards > > compatible that the largest issues are smaller than "@", an awful lot of > > good stuff ain't gonna make it in, it seems to me. 'Sides, w

Re: Warnings, strict, and CPAN

2001-02-16 Thread schwern
On Fri, Feb 16, 2001 at 06:22:45PM -0800, Edward Peschko wrote: > On Fri, Feb 16, 2001 at 08:41:02PM -0500, [EMAIL PROTECTED] wrote: > > On Fri, Feb 16, 2001 at 03:28:36PM -0800, Edward Peschko wrote: > > > Its because '-w' is a global switch. > > > > What about the new lexical warnings? "use wa

Re: Warnings, strict, and CPAN

2001-02-16 Thread schwern
On Fri, Feb 16, 2001 at 03:28:36PM -0800, Edward Peschko wrote: > Its because '-w' is a global switch. What about the new lexical warnings? "use warnings"? > > I'm not sure what you mean by a policy. Do you mean you want people > > to have to say C explicitly? Do you want to > > make it a co

Re: Warnings, strict, and CPAN

2001-02-16 Thread Peter Scott
Redirected to -strict to save the sanity of thousands of people who don't care. At 03:48 PM 2/16/01 -0800, Edward Peschko wrote: > > Its a fine rationale, but I'm very, very loathe to implicitly split > > Perl into two seperate languages based on what the filename is. > >Why? Its not the filename

Re: Warnings, strict, and CPAN

2001-02-16 Thread Peter Scott
At 08:41 PM 2/16/01 -0500, [EMAIL PROTECTED] wrote: >On Fri, Feb 16, 2001 at 03:28:36PM -0800, Edward Peschko wrote: >In the same way that I unconsciously type '-wle' in all my one-liners, >people will write '-q'. Not if we bury the documentation for -q somewhere devilishly difficult to find...

Re: Warnings, strict, and CPAN

2001-02-16 Thread Edward Peschko
On Fri, Feb 16, 2001 at 08:41:02PM -0500, [EMAIL PROTECTED] wrote: > On Fri, Feb 16, 2001 at 03:28:36PM -0800, Edward Peschko wrote: > > Its because '-w' is a global switch. > > What about the new lexical warnings? "use warnings"? umm... that's part of what this is all about. People don't have

Re: Warnings, strict, and CPAN

2001-02-16 Thread schwern
On Fri, Feb 16, 2001 at 06:08:20PM -0800, Peter Scott wrote: > >Come to think of it, what language or popular compiler does have > >run-time (not compile-time) warnings on by default? > > Er, Perl is loose enough that those run-time warnings substitute for only a > part of the kind of strictness

Re: string encoding

2001-02-16 Thread Hong Zhang
> > But the memcmp() can not be used for UTF-32 string comparison, because > > of endian issue. > > What endian issue? If you have two differently-endian strings being > compared at the C level, you have *far* bigger design problems > than the choice of UTF. My argument was: You can use memcmp(

Re: string encoding

2001-02-16 Thread Hong Zhang
I like to wrap up my argument. I recommend to use UTF-8 as the sole string encoding. If we end up with multiple encodings, there is absolutely no point for this argument. Benefits of UTF-8 is more compact, less encoding conversion, more friendly to C API. UTF-16 is variable length encoding too,

Re: string encoding

2001-02-16 Thread Hong Zhang
> > I have already given the counter argument. The codepoint position is useless > > in many cases. They should be deprecated. > > Uh? That doesn't make sense. Codepoint position is *exactly* what people > expect when they use substr. When I say > > $a = substr($b,10); > > I want the 10th char

Re: string encoding

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 01:20:26PM -0800, Hong Zhang wrote: > But the memcmp() can not be used for UTF-32 string comparison, because > of endian issue. What endian issue? If you have two differently-endian strings being compared at the C level, you have *far* bigger design problems than the choi

Re: string encoding

2001-02-16 Thread Simon Cozens
Moved to -unicode, because that's what it's *for*. On Fri, Feb 16, 2001 at 01:17:03PM -0800, Hong Zhang wrote: > > substr's already been mentioned. > > I have already given the counter argument. The codepoint position is useless > in many cases. They should be deprecated. Uh? That doesn't make

Re: string encoding

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 04:51:14PM -0800, Hong Zhang wrote: > Yes and no. You can use for eq(), but not for cmp(). On little endian > machine, the memcmp() will first compare the least significant byte, not > most. We'd use a custom cmp in the vtable in that case anyway. -- I often think I'd g

Re: string encoding

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 02:39:10PM -0800, Hong Zhang wrote: > But you can not use memcmp() to compare binary order of two UTF-32 > strings on little endian machines, even both strings are using > the same endian. Yes, you can. > BTW, with UTF-8, you never worry about endian issue. *cough*. I kn

Re: string encoding

2001-02-16 Thread Simon Cozens
On Fri, Feb 16, 2001 at 02:25:59PM -0800, Hong Zhang wrote: > I think you already mixed the codepoint vc character. What you will get is > 10th codepoint, not 10th character. I think you're confused. Codepoints *are* characters. Combining characters are taken care of as per the RFC. > The UTF-32

Re: string encoding

2001-02-16 Thread Hong Zhang
> On Fri, Feb 16, 2001 at 02:39:10PM -0800, Hong Zhang wrote: > > But you can not use memcmp() to compare binary order of two UTF-32 > > strings on little endian machines, even both strings are using > > the same endian. > > Yes, you can. Yes and no. You can use for eq(), but not for cmp(). On

Re: string encoding

2001-02-16 Thread Hong Zhang
> > I think you already mixed the codepoint vc character. What you will get is > > 10th codepoint, not 10th character. > > I think you're confused. Codepoints *are* characters. Combining characters are > taken care of as per the RFC. If you define that way, I can agree with it. Since you still ha

Re: Warnings, strict, and CPAN

2001-02-16 Thread Edward Peschko
On Fri, Feb 16, 2001 at 10:13:07PM -0500, [EMAIL PROTECTED] wrote: > On Fri, Feb 16, 2001 at 06:22:45PM -0800, Edward Peschko wrote: > > On Fri, Feb 16, 2001 at 08:41:02PM -0500, [EMAIL PROTECTED] wrote: > > > On Fri, Feb 16, 2001 at 03:28:36PM -0800, Edward Peschko wrote: > > > > Its because '-w'

Re: Generating Perl 6 source with Perl

2001-02-16 Thread Dan Sugalski
At 09:30 PM 2/16/2001 +, Simon Cozens wrote: >The real benefit would be that the Perl program would know about all the >methods and be able to automatically construct the vtable definitions and >the relevant enum's, and that all the system-specific crap wouldn't show >up in the generated C fi

  1   2   >