Open ghost opened 7 years ago
For your proposed syntax, you'll have to wait for #687 to be resolved.
I'm not sure what accessor
is supposed to designate in your operator
declaration.
I mean argument that means key/index.
Can you provide example usage?
Really good for SIMD, Typed Array operations, Atomics.
let arrayPtr = typedarray{0}; // getting [typedarray, 0]
// also would be operators with pointers i.e. right pair value
let value = *arrayPtr; // arrayPtr[0][arrayPtr[1]] as getter
*arrayPtr = anotherValue; // arrayPtr[0][arrayPtr[1]] as setter
Atomics.add(...arrayPtr, 1); // using ptr as arguments of Atomics (workers)
There's currently no way to use operator
or syntax
to modify the meaning of delimiters ([]
,{}
,()
). You'd have to extend the reader.
I can do array $ptr 0
but this is not very nice syntax. I want like this array |> 0
.
Hello. I also have idea for custom operators with arrays.
Where symbol
@
are divisor between{
and}
.