[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rather, DSSLs increase modularity, productivity
On Mon, 17 Nov 2003, Mike Newhall wrote:
> LISP-like languages aren't attractive solely for implementation
> reasons, I think; LISP wins for ease of programming.
Well... maybe, but not in my experience. On the projects I've worked on
with embedded LISP-like languages we all swore with some regularity at the
languages *because* of their inherent LISP-y nature. Writing the code was
more of a headache and hassle, and went more slowly than it would've in
the embedding language. We used them, though, because there was no
alternative. We needed the embedded, dynamic language and had only a
little bit of I-space (even with overlays) to throw at the problem.
The experience of others may vary, of course. All I can say is that we
used it strictly for practical reasons because of the constrants of the
system, and when we moved to a system with looser constraints we ditched
the Lisp-analog for something that we didn't find actively painful to work
> Fewer lines of
> code is a great reason to pick one language over another for a DSL. I
> would imagine it would be easier to code the high-level logic for an
> application in Scheme or CL rather than Forth or Perl.
I think you'd be mistaken here, though any sort of dissent's likely to
trigger the inevitable firestorm. I will say that from what I've seen, I
think it's feasable to map Lisp to Forth and back again with a reasonably
simple source-transform. (Though, not having done it, I'm pulling that one
out of the air and may be wrong)
> In a
> hypothetical large enough project that the implementation cost of a DSL
> were no object, I think a case could be made that a higher-order
> functional language with garbage collection and code = data etc. would
> still be the best choice.
I think you're excessively discounting the experience most programmers
have with functional languages (which approaches zero) nor the difficulty
that most will have making the jump in thinking.
Besides, in a hypothetical large project where the DSL cost is no object,
the choice most everyone would jump for is a DSL that's almost identical
to the language that's used to implement the project, only with all the
sucky bits removed, and the tedious bits abstracted away with masses of
syntactic sugar. They'd also want a lollypop and a pony.
Whether it's the right choice or not, people want their DSL to be
comfortable. Which, I expect, explains the preference for Lisp/Scheme
style DSLs here. :-P
> Dan Sugalski wrote:
> >On Sun, 16 Nov 2003, Mike Newhall wrote:
> >>This is consistent with the semi-humorous comment that all
> >>large systems eventually implement an ad hoc version of LISP -- perhaps
> >>what they are really doing is implementing a DSL, and a LISP-like
> >>language is the ideal type of language to implement DSLs.
> >I've been involved in a number of projects that either already implemented
> >a LISP-like language as a DSL or were in the process of doing so. The
> >two biggest (and, in fact, sole) reasons for a Lisp-like language were
> >ease of implementation and small memory footprint.
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
firstname.lastname@example.org have teddy bears and even
teddy bears get drunk