3 ms·
Everyone knows 'goto' is bad, so a language like this needs 'comefrom'
by gaff33 2y ago
Everyone knows 'goto' is bad, so a language like this needs 'comefrom'
- SirusCodes 2y agoInteresting thought... But how will that work? The statement would be executed only it comes from that line?
- immibis 2y agoIt is reverse GOTO. After (or before - your choice) that line is executed, execution jumps to the comefrom.
- SirusCodes 2y agoI don't know how I'm going to implement it but seems pretty interesting flow. Raised issue - https://github.com/SirusCodes/AntiLang/issues/7 https://github.com/SirusCodes/AntiLang/issues/7
- lloeki 2y agoI see no mention of INTERCAL in this thread, which implements COME FROM If you don't know about it, you're in for a treat. https://en.wikipedia.org/wiki/INTERCAL https://en.wikipedia.org/wiki/INTERCAL The joke runs longer: https://en.wikipedia.org/wiki/COMEFROM https://en.wikipedia.org/wiki/COMEFROM
- ambigious7777 2y agothat's absolutely evil
- movpasd 2y agoThe compiler inserts a goto to the statement following the comefrom statement into the line specified. :^) If multiple comefroms to the same line are specified, the comefrom to jump to is selected randomly.
- GuB-42 2y agoIt is like a regular goto, but with the label and statement reversed. So instead of label: do_something goto label You have comefrom label do_something label: Really, that's just syntax. Declare your labels with "comefrom", and ":" means "jump". But it looks a lot more confusing this way.
- jezzamon 2y agoINTERCAL already has this in its language