Karl, all: I have just been auditing this list so far ;)
But I would like to speak up in support of Baris' idea. I have long
found it
confusing (both to myself and to those I must explain my code to) the
mix of
pdl multi-dimensional lists (lists of refs to lists) and PDLs, which
appear to be scalars. I was even asked once why some arrays look like
arrays and other look like scalars.
It seems to me that scalars are quite overloaded these days. I suppose
the question is:
Do we want to continue the perl4 tradition of syntactic markers for
different data types, or do we want to lump everything together?
Since I'm in the 'numeric' camp, I would vote for full membership of the
compact array type in the set of perl types.
Cheers,
Doug Hunt
Baris wrote:
>
> Hi Karl,
> Thanks for your comments.
> I still think it would be a good idea to have a new type for both functional and
>promotional purposes. I know that Nathan Torkington answered that perl6 will support
>the requirements of PDL but I am hoping that having a new type for multidimentional
>arrays lets PDL developpers freely create whichever syntax they want without worrying
>that if a syntax has any other meaning in another context. Also this will increase
>readibility of code. (Why do we have a new type for hashes?). And wouldn't it be
>faster since clases/objects/etc. are slower than regular perl. The whole issue looks
>like the regex support of perl. It needed a dedicated built in engine to have the
>flexibility and speed. People say that perl character manipulation is faster than
>C... And speed is much more crucial in linear algebra problems.
>
> I think the question at this point will be that "Does perl want to target a new
>audience?". Having a new type will force new books from Oreilly ("Learning Perl6") to
>teach the new type in the second chapter (might be good or bad). Suppose I am a
>newcomer to perl and my aim is to multiply two matrices and I don't really care about
>regex's or references in perl. Currently I have to learn a lot about perl language to
>begin working with matrix multiplication. This seems to me aginst the perl culture. I
>know pdl is very easy to use, but how about somebody who doesn't know anything about
>perl? He will have to first buy an introductory book for perl.
>
> Even if you can solve all problems with syntax, performance, flexibility (I am not
>saying these are problems, just guessing), in terms of promotion of perl in this
>area, having a new type will make a difference. I know this because saying that
>hashes are built in types for perl made a difference.
>
> Thanks,
> Baris.
>
> *********** REPLY SEPARATOR ***********
>
> On 25.08.2000 at 12:28 Karl Glazebrook wrote:
>
> >Hi Baris,
> >
> >I agree with your sentiments. Most people in PDL DO come from the
> >number crunching/scientific background.
> >
> >I would say that a matrix is just a special case of a general
> >N-dimensional compact array which obeys various rules. PDL
> >supplies a matrix-mult operator ("x") and other matrix ops.
> >Note it is useful to have BOTH "x" and "*".
> >
> >Our goal is to get true multi-dim arrays like PDL, as you say,
> >into the core. Then one would have matrices too.
> >
> >What the prefix should be is of course as interesting question,
> >currently PDL uses $, @ could be used if overloading became possible.
> >Is there a real case for a special prefix?
> >
> >Karl
> >
> >Baris Sumengen wrote:
> >>
> >> I am little bit confused and probably very ignorant but one thing seems to
> >> me very useful. Why doesn't perl support a new data type matrix. If perl
> >> wants to become a real "programming language" not just a scripting language
> >> it should support number crunching internally in a more intuitive way. I
> >> don't know if this is suggested before but until now the messages I read
> >> mentioned only making perl arrays consistant with pdl arrays.
> >etc.
>
> ________________________________________________________
> 1stUp.com - Free the Web
> Get your free Internet access at http://www.1stUp.com
--
[EMAIL PROTECTED]
Software Engineer III
UCAR - COSMIC
Tel. (303) 497-2611