Hacker News new | ask | show | jobs
by rjmill 483 days ago
I love it. I want a python-esque version that's whitespace sensitive. But only for trailing whitespace.
5 comments

If you used leading whitespace you could wind up with something like old basics where you had to number your lines. It was great, you'd always skip 10 between lines so if you had a bug you could stuff a patch in between existing lines at *5.

For the whitespace, you'd have to know how deeply to indent the outermost part of your code.

So if you add an if block to a for loop, every line of the code has to be indented and only the contents of the new if would be at indent of 0.

I am not going to write this pseudocode in AntiLang because I am not that much of a masochist.

    for ( foo in somearray )
  doStuff(foo)
    end
becomes

      for ( foo in somearray )
    if ( condition )
  doStuff(foo)
    end
      end
If you antilanged this the rest of the way, you could have a common `start` to indicate the start of a block and then replace the `end with the actual conditional.

    start
  doStuff(foo)
    for( foo in somearray )

This gets horrible pretty quick. So as terrible as trailing line space is, leading line space is quite possibly worse.

Which leads me to the ultimate conlusion -

  White space should be balanced.  If you need 4 spaces indent, you also need 4 spaces on the end of the string.
This is some of the evilest idea I got on the post...

Raised issue for it - https://github.com/SirusCodes/AntiLang/issues/9

You're a demon living in hell, aren't you? No one on Earth could be this evil.
The idea of a trailing whitespace sensitive language is... amazing.

Get real torturous with it and make the amount of whitespace the line number, ala BASIC. 3 trailing spaces is line 3 for instance. Tab character counts as powers of ten separator? Space space space tab space space is line 32?

Why need it be trailing at all? Just use Whitespace (esolang)
Polyglottism
That is something I might do... Seems pretty horrible