lua-users home
lua-l archive

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


On Tue, Sep 23, 2008 at 1:55 AM, Kenneth Forsbäck <kenneth.forsback@pp.inet.fi> wrote:
Does anyone have any snippet of lua code, modified lua, or something else that would allow me to use C-esque syntax, lua is starting to hurt my eyes.

If you're still seeing concrete syntax, to the point where you still miss a keyword-for-keyword translation, then you're probably not proficient enough with the language (this is true of most claims of the form "I want to use language X but with a syntax closer to that of language Y", even for X~=lua and/or Y~=C).

Generally speaking, it's almost always a bad idea to work against the grain of the wood: embrace the way of your tools or pick other ones. There was a funnily epic failure report some time ago, by a team who spent most of its time performing gratuitous changes on Lua (0-based arrays, superficial syntax changes towards a more C-esque look, and other "optimizations"), then blamed their failure on "Lua" being a buggy under-performing mess...

 The problem is overtyping [...]

If your problem is related to RSI, then you should get a decent editor that does the typing for you. Emacs has pretty good template libs, for instance. 

If it's a matter of screen real estate, then you should get something wider than a 14'' monitor. For a few hundred euros, you can get a panoramic LCD monitor, which in portrait mode can display ~150 wide lines of code at once.

Note! I am not going to use metalua, already made that mistake once.

That's clearly not what metalua was designed for, although that's one of the things that are doable with it. 
If you want a trivial (mostly keyword-for-keyword) source transformation, a very fast learning curve, and don't care about exploitable error messages, what you probably want is m4.

-- Fabien.