Re:
by SirusCodes on Thursday February 27, 2025 @06:08AM
(#43193275)
Interesting thought... But how will that work? The statement would be executed only it comes from that line?
[ Parent
| on HN ]
The 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.
It is reverse GOTO. After (or before - your choice) that line is executed, execution jumps to the comefrom.
Re:
by SirusCodes on Thursday February 27, 2025 @06:30AM
(#43193386)
I don't know how I'm going to implement it but seems pretty interesting flow.
Raised issue - https://github.com/SirusCodes/AntiLang/issues/7
I 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
The joke runs longer: https://en.wikipedia.org/wiki/COMEFROM
Re:
by ambigious7777 on Thursday February 27, 2025 @07:21AM
(#43193702)
that's absolutely evil
It 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.It's just syntax until you decide to support both.