Open an-OK-squirrel opened 9 years ago
How else are you going to separate tokens? Whitespaces only take up a single byte of storage. I don't think semicolons quite fit the style of stack, it's not like each token is a separate statement after all.. though it may be handy for separating separate "sections" of tokens (though that's what I use new lines for).
Remember - !=
is a function just the same as ifelse
, print
, and llen
are.
Perhaps it'd be okay for tokens to be placed directly beside strings and code blocks?
Perhaps it'd be okay for tokens to be placed directly beside strings and code blocks?
this is what I meant.
@BookOwl ping :package:
Sorry, I've been busy.
I don't like the idea of allowing strings and other tokens to site right next to each other - it looks really ugly. '"spam""ham"print print
just looks awful to me. However, I do agree with not needing whitespace around code blocks. IMHO, {1 print a}
a def a` doesn't look so bad. Just so everybody knows, Stack is NOT meant to be a code golf language - I want it to be easy to use and read. I need to think about this some more.
It looks ugly.. but it also helps a lot in code golf.
This also looks ugly:
if(x|1)console.log("sup");
And this does as well:
function*(){yield n?5:3}
But they're both valid JavaScript and they're both safe a few bytes (think code golf).
Also, in Ruby, you could do this:
puts"Hi"
Or this:
puts("Hi")
Or this
puts "Hi"
If you were code golfing you'd use the one at the top, but if you were writing normal code you'd use the second or third.
Just saying it might be useful for code golf and file compression :package:
OK, you guys win. We can add this.
WE WINNNNNNNN :smiley: :clap: :rabbit: :rabbit: :rabbit: :rabbit:
Don't be to happy, or I might kick you out! :stuck_out_tongue: (Github tongues just aren't the same as Scratch's :crying_cat_face: )
Github tongues just aren't the same as Scratch's
They're Unicode :smile:s
Parsing is semi-better in #24 where comments are parsed a bit better and ignored by the interpreter.
as of right now, http://codegolf.stackexchange.com/a/62799/46787 is too big. I found that many times, I had to put spaces where spaces should not have been needed.