At 02:34 PM 10/24/00 +0100, David Mitchell wrote: >Ken Fox <[EMAIL PROTECTED]> wrote: > > David Mitchell wrote: > > > Now of course if we have the luxury of deciding that core perl 'knows' > > > about complex numbers, then of the parser can be made to recognise ... > > > > The core doesn't need to know -- that was my point. All the core needs > > is the basic constant folding rules _it_already_has_ combined with a > > macro to define "i". When you "use complex" the macro would be folded > > into the parser. The core doesn't need any special support (other than > > decent macros... ;) > >Not being au fait with all RFCs atc, are there any concrete proposal >for macros like this, ir is this just a hazy suggestion? Probably just a hazy suggestion, though if complex numbers are part of the perl core, it'll know how to handle this particular case. (The "2i" thing) > > > In summary: Perl shouldn't do interpetation of numeric literals, but > > > should instead delegate it to the numeric class currently in scope. > > > > I agree with you. The complication is that there isn't *a* numeric class > > in scope -- there are *many* numeric classes. > >Well, I was assuming that there would be *a* numeric class in scope >- as defined be the innermost lexical 'use foo'. >I assumed that Perl wouldn't be clever enough to know about all available >numberic types and automatically chose the best representation; rather >that it was the programmer's responsibilty via 'use' or some other syntax. Numeric constants will probably fall into two classes--those perl's parser knows about and can convert to, and those it doesn't and just treats as strings. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk