|
|
|
|
|
by AnIdiotOnTheNet
1999 days ago
|
|
I feel like what you're complaining about is the equivelent of Calculon's critique of a screenplay: "no, I don't like the font". I am very much not a genius (check the user name) and it took me less than a minute to understand the payload operator (which IIRC was taken from Ruby or something). Let's say `for (x in y) {}` replaced the payload operator. It would still exist in: - if(some_error_union) |value| {} else |err| {} - if(some_nullable) |value| {} - while(some_nullable) |value| {} - switch(some_tagged_union) { .some_tag => |value| {} } And any that I might be forgetting. Is your suggestion that each of these should have separate syntax, thus complicating the language with one-off syntax? |
|
Syntax is not irrelevant to the main use of a programming language the way fonts are to the use someone is probably concerned with if they ask an opinion of a screenplay, so, no, I don't see a similarity there.
> it took me less than a minute to understand the payload operator (which IIRC was taken from Ruby or something).
Loosely inspired by Ruby, perhaps, but definitely not taken from. Neither the positioning nor the semantics are the same.