lua-users home
lua-l archive

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


On Fri, 2002-08-09 at 18:41, Eric Tetz wrote:
> --- Joshua Jensen <jjensen@workspacewhiz.com> wrote:
> > Except it's the biggest hangup when trying to convert C and Javascript
> > users... "Why do tables use braces and functions do not?" ... and
> > they're the main people I always try and get to use Lua.
> 
> Yeah, I prefer JavaScript's C-derived syntax, too, but if Lua used curly braces you would start
> expecting C-like operators too (++, --, +=, *=, <<, >>, etc).  Lua stays leaner by omitting these,
> and it's probably best to not having a syntax that constantly reminds of their absence.

If someone with the skills coded a C-like parser/compiler for Lua
bytecode, these issues might be resolved.  I'm doing something similar
for my extension language - the bytecode interpreter is cleanly
separated from the compiler, allowing programmers to write and link in
their own parsers.  I plan on using this feature to, for example, add a
state-machine parsing language that lets me build AI using a mixture of
clean state machine keywords and script code.  The same could be done to
build a special cut-scene language and so on, so that you still only
need one language core, but can use semantics/structures appropriate for
the task at hand.

> 
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com