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

Other reasons for avoiding DWIM (was Re: Summary)



On Tue, 2003-05-27 at 09:51, John Clements wrote:
> Scheme (and others):   This code is a mess!  I can't write ten lines 
> without introducing bugs! I need help!
>
> ... and I think that arguing between these camps about the proper role 
> of checking and fully-specified semantics is probably a waste of time.

I think if Scheme (and LISP) hackers were truly terrified of bugs, they
would be more interested in static typing.

Instead, I think that many Scheme and LISP hackers prefer a little less
DWIM and auto-conversion in their languages for two reasons:

  1) Scheme and LISP hackers build towers of abstractions, using
     functional programming and macros.  This is much easier when
     your language building-blocks have very well-defined semantics.
 
  2) Because Scheme and LISP have well-defined, distinct data types--
     and fairly static namespaces--it's a lot easier to write good
     optimizers.  The best Scheme and LISP compilers are a lot closer
     in performance to C compilers than they are to Python, Perl, etc.

If you don't like functional programming or macros, (1) is moot.  And if
you're willing to rewrite your code in C whenever you need performance,
(2) is moot.

Cheers,
Eric