lua-users home
lua-l archive

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

Consider this:

def test()
    a = 10
    if (a > 4) {
        print 'was larger'
        if (a > 6) {
            print 'larger than 6'
            if (a > 10) {			
                print 'bonanza'
            } else if (a > 8) {
                print 'payola'
            } else {
                print 'bonus'

After mucking around with a token filter for a few hours, I got this
to compile correctly. It 'looks' like a bastardized JavaScript, but it
actually is Lua. The semantics are the same, and the transformation
was fairly simple (110 lines of Lua).

On the other hand, Java and C++ are very different animals, even
though they can look very similar.

Maybe it would be productive to think of programming languages as 'skinnable'?

steve d.