So is it usefull to make sence out of these :
hash ^[op] hash
hash ^[op] array
hash ^[op] scalar
array ^[op] array
array ^[op] scalar
Actually ,
I just want to understand , why so much accent is put on vectorizing
atomic operations with arrays . It seems that hashes are at least as
frequent . And automating operations on them may be just as usefull.
( my feeling is that the reason is not the same as in Matlab and such
.. Because it begin to look like Matlab .
)
with arrays we have to resolve the question :
what to do if @a, @b in @a ^[op] @b have different length
with hashes we will have this question
what to do if %a, %b in %a ^[op] %b have not the same set of keys
we can resolve it with properties on hashes.
%a is vector_intersect
%a is vector_unify
Now we have also this question :
what to do in %a ^[op] @a
this again can be resolved by hash property :
%a is vector_maptoindex { return int rand }
I am not shure we need all this ( and in this form ) , but if
vectorizing array operations make operators so heavy , we have to
probably take a ride on it. I dont know. Or probably to go on that
path we should introduce tenzor operators . There was a discussion
about Sets .
how about having
@a ???[op] @b = [ array of @a[x] op @a[y] for all pairs x,y ]
this path have no end, but where to stop ??
arcadi.