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

Re: expressiveness



   Sundar Narasimhan wrote:
   > [quoting Kragen]
   >    (Here I speak specifically of one kind of duplication: the need to
   >    explain one decision in two places, so that you must change both
   >    places if you change the decision, but the program does not
   >    automatically detect if you forget and change only one place.
   >    Programming consists largely of removing this kind of duplication.)
   > 
   > I'm confused.. are you talking about duplication or about dependency
   > tracking support? Macros are no better than functions in that
   > regard.. and what you are talking about is often left to "tool
   > support" rather than treated as a base language capability. Personally
   > speaking, I'm with you -- I've never liked the somewhat arbitrary
   > separation we have in modern systems where because
   > IDE's/debuggers/loaders/runtimes tend to be monolithic programs, they
   > are not available to the programmer to re-use/extend/bug-fix.

   I didn't mean to bring up dependency-tracking support; I meant
   something different.

   If I make some decision that ends up encoded in two places in my code,
   I might want to change that decision later.  Then I have to change
   both places.  Sometimes I'll forget one, and then the code breaks.  I
   don't mind if it breaks in an immediately obvious way --- for example,
   if I change the number of arguments to a function in C, I get
   compile-time errors --- but if it breaks in a subtle way, I mind.

   Some language features that make it possible to encode the decision in
   only one place instead of two, or to link the two so that changing the
   decision in only one place results in an immediately obvious error.  I
   believe Matthias's post said the first part of this in a much clearer
   way.

   I was trying to ask this question: are macros such a language feature,
   or do they just make your code shorter?  I don't mean that I don't
   care about making code shorter, but I care even more about the kind of
   language feature I tried to describe above.

IMO, macros are such a language feature (and you *are* talking about
dependency tracking support :), perhaps even more than functions are
since they can operate over a lexical space that functions can't/often
don't (the recent papers/presentations that people have been posting
are clarifying that for me nicely :).

   I'll respond to the middle part of your post, which interested me the
   most, in a bit --- it will take a little more thought.  :) Flavors,
   eh?  Do you work on Cyc, or does someone else still use LispMs?
It's actually "Ascent Flavors" (which limits flavors along certain
dimensions to get performance better than CLOS -- such as
kinds of redefinitions possible at runtime :), and yes, we still use
LispMs (on suns). We 'are' investigating Open Genera though.. but at
~30K/box it may be pricing itself out of the market..

A lot of people still use Lisp in commercial products -- although I
must admit it's getting increasingly difficult (so you'll probably
understand that part of me me that resists 'yet more languages' :)