[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Microlight
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 18 Dec 2012 16:51:21 +0200
On Tue, Dec 18, 2012 at 2:14 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> Actually, on second thoughts, anything short of an array
> with vector semantics will be disappointing.
I've recently been using such a numerical array and it is a useful
beast.Still feel that it is a subtype, since not every element type
has the necessary operations. But maybe this is residual static-typing
anxiety.. As in all dynamic languages can use the Caveat Emptor
principle; if you get an error with a+b then it's your own fault for
not having add-able elements.
> {1,2,3}*{4,5,6} -- to be debated, {4,10,18} or 32 or error
I vote for the first one; dot-product can be a method. (Cross-product
is a rather more specialized kind of animal)
I'd think we agree that a1 .. a2 is the combined array and not
element-wise concatenation! One might wish however that something
like A{'help','interp','foo'}..'.lua' would be
A{'help.lua','interp.lua','foo.lua'}.
steve d.