> > would need to know a fair bit about particular user-defined types that have
> > been loaded in, on order to make clever interpretations of literals.
>
> Precisely. Assume I want
>
> $a = 2 + 3i;
>
> to work...
Which I what I suggest we abandon attempts to make the parser do intellignet
decisons on numeric liternal, and instead just grab all the characters
that appear to make up thye string constant, and pass the whole lot to
the from_string() method of the current defualt numeric type (as defined
by use integer et al) to deal with.
NB - there's no reason why the from_string method of complex number class
couldnt have a private convention that 2 _'s separate out real and imaginary
parts, eg
use complex;
my $c = 2__3; # 2 + 3i
although this wouldnt work if both compnents were floats.
So, I strongly suggest that when
use xtype
is in force, all numeric literals are created as type xtype, to avoid madness!