This might be a somewhat rhetorical question, but anyway. Why doesn't it?
Lua 5.2 brings in such new features as bit32 library and goto statements.
goto statements are evil. But cool, because you can substitute a lot of features from other programming languages with them. Also you can accidentally make your code look extremely awkward if over-using these. But that's another story.
bit32 library adds bitwise operators. Bitwise operations are cool. And fast. And you can fit up to 32 'boolean' values into single number, which is extremely useful for organizing grid-based levels. Current workarounds include splitting number into a 32-element array (which means allocating 32x more memory for every, and harder conversions) or abusing modulo and math.floor on division to split few bits (which is quite bad, and works slowly).
Why isn't Love 0.8.0 on Lua 5.2?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- YellowAfterlife
- Prole
- Posts: 29
- Joined: Mon Jan 23, 2012 4:05 pm
- Contact:
Why isn't Love 0.8.0 on Lua 5.2?
yal.cc
Contains things I work on. Also gets Love2d examples time to time.
Contains things I work on. Also gets Love2d examples time to time.
Re: Why isn't Love 0.8.0 on Lua 5.2?
ALL CREATURE WILL DIE AND ALL THE THINGS WILL BE BROKEN. THAT'S THE LAW OF SAMURAI.
Re: Why isn't Love 0.8.0 on Lua 5.2?
A common misconception.YellowAfterlife wrote: goto statements are evil
goto isn't evil, bad program design is
- YellowAfterlife
- Prole
- Posts: 29
- Joined: Mon Jan 23, 2012 4:05 pm
- Contact:
Re: Why isn't Love 0.8.0 on Lua 5.2?
Well, it is rather obvious that it is not actually evil, and on lowest level everything else is organized upon it, but I decided to go with that to not get thread going off the topic too early. Well, it did anyway.thelinx wrote:A common misconception.YellowAfterlife wrote: goto statements are evil
goto isn't evil, bad program design is
Some languages do not have actual control structures, leaving only goto's to organize logic. Mostly these also have a call\return statements, first of which is essentially a goto with current position being pushed to stack.
"Evilness" in this case comes from fact that many do not notice a border between just removing unneeded iterations and condition wraps and turning code into barely readable mass that gives suspects that program was built from disassembled low-level commands.
On-topic, will wait if it's too early. Also could say that linked topic ended a bit too early, with author linking to fork that he did to fix things.
yal.cc
Contains things I work on. Also gets Love2d examples time to time.
Contains things I work on. Also gets Love2d examples time to time.
Re: Why isn't Love 0.8.0 on Lua 5.2?
I don't care about goto, but for bit lib you can use luajit. And it will be way faster than lua 5.2 could ever be.YellowAfterlife wrote:This might be a somewhat rhetorical question, but anyway. Why doesn't it?
Lua 5.2 brings in such new features as bit32 library and goto statements.
goto statements are evil. But cool, because you can substitute a lot of features from other programming languages with them. Also you can accidentally make your code look extremely awkward if over-using these. But that's another story.
bit32 library adds bitwise operators. Bitwise operations are cool. And fast. And you can fit up to 32 'boolean' values into single number, which is extremely useful for organizing grid-based levels. Current workarounds include splitting number into a 32-element array (which means allocating 32x more memory for every, and harder conversions) or abusing modulo and math.floor on division to split few bits (which is quite bad, and works slowly).
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Re: Why isn't Love 0.8.0 on Lua 5.2?
Lua 5.2 is the bleeding edge release which will take a year for adoption to spread, and 5.1.5 is the official currently supported legacy version from PUC-Rio. Lua 5.2 introduces a small handful on incompatible features with 5.1 code that would be problematic and make a ton of existing lua tools and libraries broken. So yeah, it's basically too new.
As for the goto statement, thats a can of worms that PUC-Rio opened . I'll allow that "bad program design is evil, not goto", but it's been long known that the goto keyword should be rarely if ever used, and that the whole point of the break and continue keywords was to eliminate 99.9% of cases where you could use goto.
As for the goto statement, thats a can of worms that PUC-Rio opened . I'll allow that "bad program design is evil, not goto", but it's been long known that the goto keyword should be rarely if ever used, and that the whole point of the break and continue keywords was to eliminate 99.9% of cases where you could use goto.
Re: Why isn't Love 0.8.0 on Lua 5.2?
i'd imagine that the main reason 5.2 isn't being adopted all that quickly is because apart from the bc breaking, it doesn't really have any killer features. the two big features are the bit library and removal of many coroutine yielding restrictions... problem is both of those have been available to 5.1 for yearsInny wrote:Lua 5.2 is the bleeding edge release which will take a year for adoption to spread, and 5.1.5 is the official currently supported legacy version from PUC-Rio. Lua 5.2 introduces a small handful on incompatible features with 5.1 code that would be problematic and make a ton of existing lua tools and libraries broken. So yeah, it's basically too new.
i wouldnt worry about goto too much since it was mainly wanted for things like code generation and error handling. it also replaces some uses for tail calls since it's cheaper. and, like one of lua's authors mentioned: at least they aren't continuations
technically, goto follows lua's tendency to eliminate cruft. since break and continue are just special cases of goto, it makes sense to just use the more general version. plus, continue has the problem of wonky semantics with locals with the repeat until loop. so does goto, but they changed the definition of scope to account for that. of course they could have done the same with continue but i guess the goto way was more elegant (better to say "scope ends at a label if there are no further uses of the variable" than say the same about continue but not for break)Inny wrote:that the whole point of the break and continue keywords was to eliminate 99.9% of cases where you could use goto
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests