Y
Hacker News
new
|
ask
|
show
|
jobs
by
dnautics
1 day ago
i find Zig does it fairly well. there is also no ambiguity between pointer and multiply.
1 comments
Joker_vD
1 day ago
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]".
link