[Fwd: Re: Intent (was: Re: Lists, Tables, Psets)]

Kyle Lahnakoski kyle@arcavia.com
Fri, 31 Mar 2000 22:21:48 -0500



Jason Marshall wrote:

> Not only is the code more readable by a human (set aside arguments that
> 25 wpm typists may not be able to cope with the verbosity, as these can
> be addressed by modelling tools and the like), but as you say, it's more
> 
> readable by the code optimizer in the system.  If you for instance
> declare
> that you intend to visit every item in a list or container, and perform
> an action on it, this is easier for the optimizer to sort out than if
> you
> write 50 different minor variations on an iterator idiom by hand, some
> with unintentional out of bounds bugs that you didn't bump into (yet).
> And it's easier for the compiler to parrallelize it on the target
> hardware if the facilities are available (MPP, vector math, etc).
> 
> Some of these issues can be handled at the language level, and some at
> the API level.  The important thing when designing is not to ask, 'how
> do I?' but 'Why do I?'.  Why do I create a file?  Because I want to
> keep some persistent information.  Why do I have locks?  To perform
> atomic operations on data that is seen by multiple threads of execution.
> 
> Why do I need explicit resource allocation/deallocation?  I dunno.
> Why do you?  Are the builtin facilities failing in some serious way?

You put it so well.  It has been what I was trying to say, but obviously
lack the skill to do so. 



> the programmer can just remember that detail", then you're definitely
> barking up the wrong tree.  You're just writing yet another programming
> language, not a metaprogramming language.

Yes, I was getting sidetracked here.  But as I have been trying to
imply: what is good for the human is good for the compiler because of
this meta information.



Excellent ideas you have.



-- 
----------------------------------------------------------------------
Kyle Lahnakoski                                  Arcavia Software Ltd.
(416) 892-7784                                 http://www.arcavia.com