General discussion about LÖVE, Lua, game development, puns, and unicorns.
thelinx
The Strongest
Posts: 857 Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden
Post
by thelinx » Sun May 01, 2011 5:16 pm
Code: Select all
[list]
[*]item
[*]item
[*]item
[/list]
vrld
Party member
Posts: 917 Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:
Post
by vrld » Sun May 01, 2011 5:35 pm
ishkabible wrote: *no control over for loops, sometimes i want a different condition than <= or a more complex increment than addition
Uhm.. what?
Generic for .
ishkabible wrote: *arrays start at 1, WTF!! they should start at 0!!
Says who?
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.
hump |
HC |
SUIT |
moonshine
bartbes
Sex machine
Posts: 4946 Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:
Post
by bartbes » Sun May 01, 2011 5:38 pm
Regarding that little script I posted earlier in this thread, it now has
a github repo .
Jasoco
Inner party member
Posts: 3727 Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:
Post
by Jasoco » Sun May 01, 2011 6:11 pm
Not everyone uses an editor that has text replacing you know. Not everyone WANTS to switch editors from something they like to something that isn't good enough just for that feature. Give me my gosh darn ++ and += and != consarnit!
No, not really a big deal. I've become used to typing it all out.
slime
Solid Snayke
Posts: 3166 Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:
Post
by slime » Sun May 01, 2011 6:34 pm
Jasoco, use bartbes' script...
Xgoff
Party member
Posts: 211 Joined: Fri Nov 19, 2010 4:20 am
Post
by Xgoff » Sun May 01, 2011 8:30 pm
Robin wrote: BlackBulletIV wrote: The main problem now I guess, is that they have to maintain backwards compatibility with grammar.
No, it's that it would allow ambiguous syntax. In which case it's not at all obvious what the compiler should do. These situations cause debugging to be very hard, because the code doesn't
look wrong, and there is probably not even an error at that exact location.
it turns out that lua already has an ambiguous syntax case that's related to that if example:
it's better not having more of them! (although this case is technically fixed in 5.2, since it'll just assume it's all one statement)
also, if
x++ were added, then people would expect
x-- to be added too. but... there's a problem with the latter one.
bartbes
Sex machine
Posts: 4946 Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:
Post
by bartbes » Sun May 01, 2011 8:33 pm
How is that ambiguous, once the line ends the statement ends, right?
thelinx
The Strongest
Posts: 857 Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden
Post
by thelinx » Sun May 01, 2011 8:40 pm
bartbes wrote: How is that ambiguous, once the line ends the statement ends, right?
No. Take this, for example:
Code: Select all
foobar = table.concat
{
"foo",
"bar"
} -- works!
Xgoff
Party member
Posts: 211 Joined: Fri Nov 19, 2010 4:20 am
Post
by Xgoff » Sun May 01, 2011 8:44 pm
bartbes wrote: How is that ambiguous, once the line ends the statement ends, right?
line breaks aren't considered significant in lua's syntax
bartbes
Sex machine
Posts: 4946 Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:
Post
by bartbes » Sun May 01, 2011 8:47 pm
Right.
Users browsing this forum: Bing [Bot] and 12 guests