Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

I used to like Lua a lot...

Name: Anonymous 2017-06-07 12:24

https://garry.tv/2014/08/16/i-fell-out-of-love-with-lua/
I used to like Lua a lot and now I don’t. I think anyone intending to add a scripting language to their game/engine should seriously consider using Javascript instead.

Javascript is used all over the web. It’s only going to end up getting used more and more. Google, Mozilla and Microsoft are all working to make it faster and faster.

Ultimately if we have to teach people a scripting language, lets teach them a language that will serve them in the future. Sure the jump from Lua to Javascript isn’t that great, but if you skip Lua there’s no need to make a jump at all.

Name: Anonymous 2017-06-07 12:30

I until very recently insisted that Python was the master race. Then I started work on two things: A complex timer (for game speedrunners) and a game. I felt like I was spending so much time fixing typing related errors and working with the weird inheritance and looking for libraries/reinventing ways to do things.

The language I’m probably most familiar with besides Python is Java. I hated Java. The syntax is clearly inferior, the braces felt clunkier and harder to read than whitespace parsing, it lacks any elegant functional support. But then I switched the timer to Java for a cross-platform hotkey library. Suddenly the code became so much easier to write. Part of it is a better IDE (IDEA vs PyCharm), but a lot of it is that Java forces you to write correct code. Not elegant, not necessarily very readable, but correct. And this is the number one issue in getting large projects to scale up. I still hate Java, but it’s better than Python for anything of any size.

Name: Anonymous 2017-06-07 12:40

>>1
while I must admit that JavaShit has improved leaps and bound over what it used to be (mostly thanks to ES6), this reasoning is kinda backwards. Lua's quirks are its strength, not weaknesses - especially when it comes to teaching and learning. if you want to be a programmer who understands programming as opposed to being a code monkey who just memorized some common JS patterns, learning something that is unusual while still being somewhat useful (I'm talking lua, lithps, forth, apl, prolog; not brainfuck, malbolge, intercal or whatever new bullshit s***k o******w codegolfers come up with) will be extremely helpful for you

>>2
funnily enough, I'm in process of making a game in FIOC and despite what many people claimed, I don't have much problem with type errors. but I'm still considering something with static types (maybe Cython?) for performance reasons

Name: Anonymous 2017-06-07 20:39

The only problem with Lua is that is uses too many curly braces. The old languages like Fortran, Cobol, Algol, PL/I, Basic, Pascal, APL, and some relatively newer languages like Ada and Smalltalk do not use a single curly brace for anything. Pascal can use them for comments, but that's about it.

The more curly braces a language uses, the more design flaws and inconsistencies it has. That's an undeniable fact. Lua, Ruby, and Python are better designed than Perl, PHP, and JavaScript. Pascal, Ada, and Eiffel are better designed than C, C++, and Java. I can't explain why that is, but it's true.

Name: Anonymous 2017-06-08 1:07

>>4
The only problem with LISP is that is uses too many parentheses.

Name: Anonymous 2017-06-08 5:58

>>4
what's the difference between curly braces, begin/end and significant whitespace though? just aesthetics.

also, I wouldn't say that Pascal is better designed than C. it is a nice language (despite the fact that so many people seem to hate it) but it wasn't like that from the start. the canonical example of early Pascal stupidity is array size being a part of its type.

Name: Anonymous 2017-06-08 15:09

>>6
just aesthetics.
Aesthetics are important. There's a big difference between end and ;}) even though they have the same number of characters.

begin/end are also better because they have more meaning. People think of { as punctuation, but they think of begin as a statement. End also lets you write end NAME so the compiler can help check when you close blocks and functions/procedures correctly, as well as make it easier to read.

It's not only replacing begin/end with {/} but other aesthetic choices like * and & for pointers, and < and > for templates. What do those characters have to do with pointers? Why are we using the same symbols for greater than and less than operators and brackets in the same language? More bad aesthetics is the C-style for loop, which isn't like the for loop in any other language. It's not even consistent with the rules of C. I understand that they wanted a loop that could do more than counting, but it's still badly designed.

the canonical example of early Pascal stupidity is array size being a part of its type.
That's also true for C, but C arrays decay to pointers when they're passed to functions, unless they're inside of structures. An example of early C stupidity is struct members being offsets that can be used on any kind of struct/union pointer. There is a lot of still existing C stupidity like array decay, type syntax (especially function pointers), weakly typed enums, null-terminated strings, and the semantics of register, restrict, const, and volatile.

Name: Anonymous 2017-06-08 20:51

Name: Anonymous 2017-06-08 21:31

>>8
a dynamic scripting language that compiles into Lua.
It's better than any of that JavaScript-based crap, but that's incredibly stupid. Scripting languages shouldn't need to compile into scripting languages. This is what's wrong with programming today.

Name: Anonymous 2017-06-09 6:45

>>7
oh I'm not denying that there's a lot of early C stupidity that still fucks us in the ass to this day. null-terminated strings and weak typing are big ones.

I disagree about aesthetics though. Pascal is more readable for inexperienced programmers but the more you program in it, the more annoying the verbosity and the need for 5 keystrokes (b e g i n) instead of 2 (shift + [ ) becomes. if similarity to English language was important, COBOL would be the archetypal good language that would then get gradually replaced by Inform 7. and while I can respect Inform, I prefer the raw aesthetics of well-written low-level C or the regularity and elegance of Lithps.

Name: Anonymous 2017-06-09 11:31

>>10
Nobody in the 70s and 80s had problems with begin and end when computers had a lot less memory than they do today. Pascal, Ada, PL/I, Algol, etc. programmers to this day prefer begin and end. Modern universities teach that shorter is better, but they mean code complexity and not length of symbols.

Early C stupidity is more of a problem now than it was then because barely anyone used C. In the 80s, there were more Pascal, BASIC, COBOL programmers than C programmers.

Name: Anonymous 2017-06-09 11:43

>>11
I'm not talking about memory or complexity, I'm talking about verbosity. don't get me wrong, I'm not advocating switching to APL just so your source files will be smaller, I just think that things you write all the time (block delimitation) should be quick to write. this is why I really dislike Java (at least pre-Java 8, modern Java is tolerable in comparison): there's just too much boring boilerplate.

Name: Anonymous 2017-06-09 12:35

>>8
MoonScript:
with Person!
.name = "MoonScript"
\say_name!


Symta:
Me = person
$name <= \Symta
$say_name

Name: Anonymous 2017-06-09 12:48

>>13
what is this post supposed to prove, Nikita?

Name: Anonymous 2017-06-09 13:21

>>14
Guess it.

MoonScript:
double_args = (...) ->
[x * 2 for x in *{...}]


Symta:
double_args @As = As{?*2}

Name: Anonymous 2017-06-09 14:01

>>15
this I can understand, but what was wrong with the example above?

Name: Anonymous 2017-06-09 14:13

>>16
.\!

and they even boast about `with` being major language feature:
with statement lets you access anonymous object with short syntax

Name: Anonymous 2017-06-09 18:09

>>12
I'm not talking about memory or complexity, I'm talking about verbosity. don't get me wrong, I'm not advocating switching to APL just so your source files will be smaller
APL has a reputation for being hard to read, but C is also hard to read and uses a lot of symbols which make source files smaller without making code simpler.

I just think that things you write all the time (block delimitation) should be quick to write.
The C-style for loop is not quick to write. You have to repeat the variable name three times like for(i = 1; i <= 10; ++i), and it's a lot harder to read than for i = 1 to 10 or Lua for i=1,10 do. switch is also verbose and error-prone because you have to write case and break all the time. These case and break take up more characters than the Pascal case statement[1], so C is the verbose language there too. C strings and arrays are lower level so you end up using more code for them and the compiler can't optimize them as well.

this is why I really dislike Java (at least pre-Java 8, modern Java is tolerable in comparison): there's just too much boring boilerplate.
Java is a curly brace language, so begin and end are not your problem at all. Java's verbosity and boilerplate don't come from the length of the tokens it uses, except for the parts copied from C like switch. Eiffel programs are shorter and considered easier to read than Java programs and it uses begin/end. Ruby also uses begin/end and people preferred it before the JavaScript takeover.

[1] https://www.freepascal.org/docs-html/ref/refsu56.html

Name: Anonymous 2017-06-09 18:35

>>18

C's syntax is standard. It is nice being able to copy-paste Java snipped directly into JavaScript program without much change.

Name: Anonymous 2017-06-09 18:45

>>19
without much change.

Java Hello World:
public class HelloWorld {
public static void main( String[] args ) {
System.out.println("Hello, World!" );
System.exit(0);
}
}


JavaScript Hello World:
alert('Hello, world!');

Name: Anonymous 2017-06-09 19:55

>>19
You're probably trolling, but this is how JavaScript idiots think. With a good language, you actually understand what you're writing instead of trying to copy code from a different language and ``hope it works''.

Name: Anonymous 2017-06-09 20:03

>>21
I agree with you on the good language part, but I'm pretty sure he meant easier to learn a new language because the syntax is familiar.

There's nothing same about C, Java or Javascript that makes copypasting code any different.

Name: Anonymous 2017-06-09 20:04

>>21

Modern IDE will autocomplete your input by inserting code from stackoverflow.

Name: Anonymous 2017-06-09 21:46

>>23
Eclipse, sublime text and VS already have plugins that search stackoverflow, so I guess you might be right.

Name: Anonymous 2017-06-10 16:38

protip: Lua is pronounced 'laaaa'.

Name: Anonymous 2017-06-23 2:07

>>25
I always knew I was saying it right

Don't change these.
Name: Email:
Entire Thread Thread List