Hello,
First of all I am not really sure if there is a need for a new data type,
and I am not really in a position to decide for it. Mine was just an idea
(maybe not a very good one since I am not very experienced with pdl), and
sometimes the ideas are useful but half of the time they are not correct.
But unless I mention my ideas I can't never find the flows in my logic and
correct them. And by the way why do people yell to each other???
My motivation was to give more freedom to the developers of pdl so that
they can freely create the syntax without worrying about the workarounds.
Matlab, in my opinion, is much more natural to code than current pdl. By
the way I am pretty much happy with $pdl notation and I really hate @pdl
notation and I find it confusing.
>To avoid anyone getting yelled at by TomC or someone else: Yes. Anything
>individual in Perl is a scalar. By definition. Please don't try to
>change this.
$a = "foo";
@a = ("foo");
Can we think @a as something individual, or something less individual than
$a? According to your definitions @a is a scalar in the core of perl.
You forgot that there is a dimentionality associated with a piddle
elements.
$p = pdl [1];
is not equavalent to
$p = pdl [[1]];
and neither of them are equivalent to
$p =1; # I think there should be a 0 dimentional pdl also so that we can
have compact scalars.
>http://www.mail-archive.com/perl6-language@perl.org/msg00329.html
It is great that perl is similar to speaking english and it is more closer
to how we behave in our daily lives, but there is something missing here.
When was the last time you needed to multiply two matrices in your daily
life? Yes people learn a language such as English and I realy like that
writing perl programs is like speaking English, (in a natural way). But we
also did learn another language, which is called mathematics. IMHO I don't
think pdl should follow the natural language path, but the mathematics
path. How do we explain things in mathematical terms? Pdl should be natural
in a sense that I should be able to code my program in a similar way that I
answer a math question in a linear algebra exam.
> From http://www.mail-archive.com/perl6-language@perl.org/msg00329.html
> $ just one atomic whatzitz
>
> @ an ordered set of atomic whatzitzes
>
I really have a problem with this. I don't think a rectangular area (a 2-d
matrix slice) can be think or represented as an ordered set of atomic
whatzitzes.
Actually I need find a way to represent a 2-d image as a vector with
somehow not losing the spatial relations of the pixels, and still didn't
find a good way after thinking about it two days. So I really have a
problem with thinking matrices as ordered lists.
Baris.
*********** REPLY SEPARATOR ***********
On 8/29/00 at 8:33 AM Nathan Wiger wrote:
>Baris wrote:
>>
>> Hi,
>> > ^foo = ([1, 2], [3, 4]); # I know, it's taken, I helped :-)
>> > $foo[0,0]; # uh-oh
>> >
>> >Then adding a new fundamental type and syntax is not only unnecessary,
>> >but silly.
>>
>> Why do you think that individual elements are perl scalars?
>
>To avoid anyone getting yelled at by TomC or someone else: Yes. Anything
>individual in Perl is a scalar. By definition. Please don't try to
>change this.
>
>For more details on this, please read this email:
>
>http://www.mail-archive.com/perl6-language@perl.org/msg00329.html
>
>Under these definitions - which are at the core of Perl - piddles are
>just @arrays (maybe special arrays, though, see Buddha's RFC) and do not
>warrant their own data type. Yes, I do view this as a good thing.
>
>-Nate
*********** END FORWARDED MESSAGE ***********