[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Function calls [was: Lua and Neko comparison]
- From: Glenn Maynard <glenn@...>
- Date: Fri, 29 Sep 2006 16:01:39 -0400
On Fri, Sep 29, 2006 at 12:42:55PM +0100, David Jones wrote:
> int b = GETARG_B(i);
> int nresults = GETARG_C(i) - 1;
> if (b != 0) L->top = ra+b; /* else previous instruction set
> top */
> L->savedpc = pc;
> Now, this is fairly plain C, but knowing C doesn't really help you
> understand what's going on. You have to understand the language of
> "GETARG_B" and "L->top" and such like. A language has been created
> with the "C language programming system".
I can read the code, and understand the order of operations. I can't
even do that when new basic tokens are being created, with new precedences.
I want a domain-specific language, not a domain-specific language
> Perhaps it boils down to: to what extent do you trust your developers
> (people that write code that you have to look at, say) to design
> sensible languages? I observe that what C++ makes easy, operator
> overloading, seems to make it easy for people to create languages
> that are not intuitively understood, and are therefore "bad".
Not all means of "extending" languages (in the sense you're using here)
are bad; many of them aren't, in fact. Operator overloading can be
abused (and frequently is), but it isn't defining new tokens and
precedences; I think this is at a new level.
> I find all this a bit ironic since you Glenn have created your own
> sub-language with stuff like: http://stepmania.cvs.sourceforge.net/
> revision=1.1344&view=markup . In order to "understand" that document
> I have to understand the sub-language of "[ScreenUnlockStatus]" and
> "# blah blah blah" and so on. I'm not saying that's difficult in
> this case, I'm just saying that you create sub-languages of your own.
That's the INI file format, used by Windows since the beginning of time.
That software does have some of its own file formats, but we try hard
not to, since it reduces learning curves and increases reusability.