Zig: Proposal: Replace 'return' keyword with 'SLAP'

Created on 12 Sep 2020  路  3Comments  路  Source: ziglang/zig

like so:

fn add (lhs: i32, rhs: i32) i32 {
    SLAP lhs + rhs;
}

;)

Most helpful comment

I see the value in this, however I think @GoNZooo can confirm, this actually makes it more difficult to return, because now you have to say "screaming say slap" instead of "say return"

All 3 comments

If this isn't a good candidate for an April Fool, I don't know what is. 馃槒

I see the value in this, however I think @GoNZooo can confirm, this actually makes it more difficult to return, because now you have to say "screaming say slap" instead of "say return"

Just to confirm; return is good in part because if you really want to you can just create a command for it and it won't conflict with the rest of your grammar, or you just indeed go "say return something escape semi". You can actually go "uppercase slap something escape semi" and get the same results, ish, but if you made a command for it in your language you'd still have to substitute it with something not in the rest of your fundamental grammars (i.e. not "slap").

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bronze1man picture bronze1man  路  3Comments

dobkeratops picture dobkeratops  路  3Comments

jorangreef picture jorangreef  路  3Comments

andrewrk picture andrewrk  路  3Comments

S0urc3C0de picture S0urc3C0de  路  3Comments