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

Re: functional languages ill-suited for large programs?



Quoting Dan Sugalski <dan@sidhe.org>:
> At 11:45 PM +0200 10/31/03, vkarvone@mappi.helsinki.fi wrote:
[...]
> >I disagree. It seems to me that a compiler simply can not *in general*
> >make such optimizations and can not guarantee such optimizations *in
> >general*.
> 
> In general, guarantees in general are overrated [...]

I have written a lot of programs that depend on certain "optimizations" that
are specified in language specifications. For example, I have written static
metaprograms that are guaranteed to be evaluated in compile time. I have
also written many programs that require tail call optimization - without the
optimization they would simply not be usable. So, I honestly can't agree
with a claim that guarantees are overrated. The negation of "guaranteed" is
"not-guaranteed" or "undefined". If, in general, *everything* in a
programming language would be "not-guaranteed", it would probably be very
hard to do anything useful with such a language.

>[...] in practice an amazing amount can be done with some specific
>optimizations.
[...]

Guaranteed-vs-not-guaranteed is orthogonal to specific-vs-general. If a
*specific* optimization, that makes the difference between a usable and a
not-usable program, is not guaranteed, one can not rely on the optimization
while writing portable and correct sofware. For instance, I can't rely on
tail call optimization, while writing software in Java - even if some Java
compiler were able to perform the optimization in some special cases that I
could exploit.

Regards,
  Vesa Karvonen