lua-users home
lua-l archive

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


C is by far not without problems of its own, and making it accessible might be one that should be added to the list. Although perhaps this is more of a client-side problem?

However, if the language in question is irregular and very loose, it doesn't matter what tools you use, parsing it is going to be hell. And this is another problem of C, it's not really the most regular and strict language around now is it ^_^

Kenneth

Veli-Pekka Tätilä wrote:
From: "Kenneth Forsbäck" <kenneth.forsback@pp.inet.fi>
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.
I could say the same about C giving me a headache, <grin>.

The extremely clean English-like syntax is one of the very reasons why I like Lua to begin with, though by no means the only, or the most significant one. This is a bit of a special case, but it just goes to show that needs may be different. I'm programming with a screen reader producing synthetic speech, so in that context Lua is so much easier to parse mentally. Consider the expressions:

Lua: while true do
C: for(;;) {

Spoken:

Lua: while true do
C: for left paren semi colon semi colon right paren left brace

And some more:

Lua: if not x then x = y end
C: if(! x) { x = y; }

Their meaning is slightly different (0 being true in Lua), but still. Spoken:

Lua: if not x then x equals y end
C: if left paren exclamation x right paren left brace x equals y semi colon right brace Oh yeah, and I don't even want to mention explicit dereferencing and function pointers.

At the end of the day it is not about syntax. I can even tolerate Emacs Lisp spoken out loud programmatically, with heavy use of line breaks and ending comments, that is.

Hope this gives you a different perspective. Though mind you this is the special case of programming legally blind.