lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, 2002-06-10 at 12:48, Pyrogon Public wrote:
> > The fact that enough game companies don't find languages like 
> > Lua useful says that there is something Lua is missing that 
> > it shouldn't be.  All that I can really think of tho is a) 
> > *real* multi-tasking, and b) a more newbie-friendly syntax.
> 
> Actually, in my experience from talking to lots of game developers, the
> two biggest knocks on Lua are lack of documentation and lack of
> awareness.

Hmm, see, haven't really thought of lack of exposure as a problem -
maybe because that is because I am already exposed.  ^,^

> 
> My conversations tend to go like this:
> 
> Them: "So what scripting language are you using?  Python?  Java?  Ruby?"
> Me: "I'm looking at Lua"
> Them: "Lua?  Never heard of it"
> Me: "It's a small, simple language that's easy to embed."
> Them: "Hmmm, I'll check it out"
> 
> Two weeks later:
> 
> Them: "I think it's cool, but there's almost no documentation for it,
> and what documentation I have found is partial or out of date or based
> on a mix of Lau 3.2, 4.0, 4.1 and 5.0 work"

That is vastly annoying.  Few other "popular" languages have decent
embedding documentation, however.  I think documentation in genreal
needs to be improved for all embeddable scripting languages.

> 
> > So, speaking of that, does anyone have other examples of 
> > where a simple syntax isn't a good as a common syntax?
> 
> While it's a valid point of "people like what they already know" (cf. my
> old comments about "Why the hell does Lua use -- for comments intsead of
> //?!", constantly being held back because of old syntax rules only makes
> matters worse in the long run.
> 
> For example, a common gripe with C/C++ syntax is that function
> signatures are of the form:
> 
> [return type] [name] [arguments]
> 
> e.g.
> 
> bool isAlive( Entity &e );
> 
> This makes complete sense to someone that is used to C/C++, but if you
> look at it objectively, it's actually not the way you'd really want to
> write it for readability.  The first item in a list should not be the
> return type, because people scan source code for identifiers.  A more
> logical representation would be:
> 
> isAlive( Entity &e ) bool;
> 
> Same with variables.  Do you search by type or by identifer?
> 
> int someInt;
> foo aFoo;
> bar aBar;
> 
> doesn't make as much sense as:
> 
> someInt : int;
> aFoo : foo;
> aBar : bar;
> 
> Yet the former syntax is "clearer" to many of today's programmers.

Which is the point.  Unfortunately, people hate change.  Seriously. 
Yes, the bright people like it, encourage it, cause it, etc.  Far too
many people, however, refuse to use something "new."  This can affect
the popularity of a language.  People get upset with Python because of
the block syntax - I don't see a problem with it, it's a good idea for
encouraging students to indent code, but "old school" programmers
generally hate it.  I have trouble sometimes with Ruby, because it
forces you to think in OO, while I (having been brought up on C) just
tend to think procedurally.  I can code in a C syntax much faster than
other languages, simply because of familiarity.

Of course, you can keep a C syntax while extending it, as well.  You
suggestion for variable declarations has actually been used in a number
of game scripting languages I recall from years ago, even tho the
majority of the language kept a C syntax.

Again, this isn't an argument against Lua, whose syntax is nice - just a
problem I keep seeing from people.  They don't want change.  Lots of
times, even if the developers like the "different" syntax, if they are
publishing a product to be used by customers, they might go with
something else to please them.

> 
> Brian
>