[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Function calls [was: Lua and Neko comparison]
- From: Mike Pall <mikelu-0609@...>
- Date: Fri, 29 Sep 2006 14:39:15 +0200
Hi,
Glenn Maynard wrote:
> > print( PI * sin a + cos b )
> > print( (a << 11) | (b << 3) | 5 )
> > print( "Rici buys", 1.38 // 0.16, "apples." )
>
> Intuitively, I don't like this. I don't want to use a language where people
> are almost defining their own syntax inside the language.
But that's sort of the definition of a DSL (Domain Specific
Language). Lua is already pretty good at that, but it can be
improved.
> Practical
> languages can't make it impossible to write bad code, of course--people
> will--but this seems at such a level that in order to read anyone else's
> code, I'm going to have to learn their own personal sub-language first.
Language is about expression. The ability to abstract concepts is
broadening your ability to express your intentions more clearly.
Computer languages are built for humans and only incidentally run
on computers. Designing computer languages is the art to allow a
maximum of abstraction with a minimum of implementation effort.
> it just seems to invite incredible abuse.
This reminds me: If you design a computer language to be
foolproof, only fools would use it.
BTW: If you want Java, you know where to get it. :-)
Bye,
Mike