Hacker News new | past | comments | ask | show | jobs | submit login

Everyone knows 'goto' is bad, so a language like this needs 'comefrom'





INTERCAL already has this in its language

Interesting thought... But how will that work? The statement would be executed only it comes from that line?

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 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.

Ok, so:

  comefrom label
  goto label
  label:
A brand new way to lock up your machine.

It is reverse GOTO. After (or before - your choice) that line is executed, execution jumps to the comefrom.

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


that's absolutely evil



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: