4 ms·
> The syntax in question isn't just used by Lua, either, and it usually tells me that a developer can't respect differences between languages. Actually, the tw
by Pimpus 8y ago
> The syntax in question isn't just used by Lua, either, and it usually tells me that a developer can't respect differences between languages.
Actually, the two examples you bring up are paragons of asinine design. I can't imagine it being easy to justify such design decisions, your attempt to do so was wholly unconvincing.
- ufo 8y agoLua uses 1-based indexing because its initial userbase were engineers used to FORTRAN. As for ~=, you need to keep in mind that Lua goes all the way back to 1991 and back then there wasn't a big pressure to make your syntax look like C (of Java or JavaScript) like happens today. Syntax used to be much more varied.
- int_19h 8y ago~= is a poor choice in and of itself, because it doesn't have any clear justification. It would make some marginal sense in C, where it's binary negation, but that's not the case in Lua - it only ever uses ~ to mean "not" in that one context of inequality. And, on the other hand, ~= looks too much like an attempt to spell out ≅ in ASCII, but the meaning is completely different. If anything, /= (as used in Algol-68, Ada, Eiffel etc) makes a great deal more sense as an obvious rendering of ≠. It's unfortunate that C confused matters by reusing it as assignment.
- scns 8y agoHaskell uses /= too
- andrewmcwatters 8y agoThat "asinine design" comes from decades old syntax practices like ALGOL, Ada, and MatLab. Perhaps exposing yourself to other languages might inform your responses on debatably the largest technical forum in the industry: one with many developers from widely varying backgrounds.
- Pimpus 8y agoHeh, you don't even try to justify it, just point out prior art in some irrelevant "languages". Yeah, definitely not easy to defend such choices. Even the fact that this turns off potential Lua programmers such as myself makes it do more harm than any potential good (and I am hard pressed to find a single good thing about these asinine choices).
- andrewmcwatters 8y agoIn mathematics, there are multiple symbols for negation. https://en.wikipedia.org/wiki/List_of_logic_symbols https://en.wikipedia.org/wiki/List_of_logic_symbols What is there to defend? Can you explain why it's "asinine design?" You don't actually elaborate as to why, and I've provided you both academic background in mathematics and prior art. I apologize if I've missed your point.
- Pimpus 8y agoThe fact that this discussion ALWAYS comes up when talking about Lua, with people saying they won't even try the language, should clue you in how terrible these design decisions are.
- andrewmcwatters 8y agoYou're right: This discussion always comes up with developers who constantly have petty complaints.
- Pimpus 8y agoI would venture to say that you're just out of touch.