← Back to context

Comment by zem

7 days ago

interesting example of swizzling

``` int[<3>] a = { 11, 22, 33 }; int[<4>] b = a.xxzx; ```

I assume that the `xxzx` is translated directly by the compiler. not seen that in any other language though ruby can fake it pretty easily via `method_missing`

This is not that novel. It is inspired by the similar feature in the Odin language.

  • ah, neat if it's becoming a standard convention of sorts. i haven't used odin either.