Remix.run Logo
dnautics 2 hours ago

i find Zig does it fairly well. there is also no ambiguity between pointer and multiply.

Joker_vD 2 hours ago | parent [-]

Yeah, they took it from Pascal:

    var p: ^integer, i: integer;

    p := @i;
    p^ := 42;
Which follows an obvious "if modifier of a base type goes to the left of the type, then the operator that uses this modifier goes to the right in the expression". Just like "array of T/[]T" translates into "arr[index]".