Re: Quote from comp.object

From: Marshall <marshall.spight_at_gmail.com>
Date: 5 Mar 2007 16:53:16 -0800
Message-ID: <1173142396.049981.141390_at_c51g2000cwc.googlegroups.com>


On Mar 5, 3:50 pm, "Tony D" <tonyisyour..._at_netscape.net> wrote:
> On Mar 5, 9:34 pm, "Marshall" <marshall.spi..._at_gmail.com> wrote:
>
> > I tend to agree, actually. I think enforced purity isn't a great idea.
> > However, I believe that purity ought to be the default. Today,
> > most programmers use imperative techniques for virtually
> > everything, and only occasionally drop in to a pure mode.
> > I think a better way to be would be to reverse that, and only
> > use imperative techniques when necessary and with the
> > consciousness that you're doing something different. I think
> > the success of impurely functional languages (SML, O'Caml)
> > supports this idea.
>
> Although I'd have to say I think I prefer Haskell's monads approach to
> Standard ML - it seems to me to allow a cleaner break between the
> functional code (pure as the driven snow) and the monads with
> sequences and possibly side effects (pure as snow that's been driven
> on).

I can respect this view even though I don't subscribe to it. I tend to agree with Van Roy's critique of this approach that it requires the threading of the "state" throughout the program. The cost of the improved ability to reason locally that results from the all-pure, all-the-time approach is in reduced modularity. Which way one prefers this issue is a tradeoff, and likely to be dependent on the person and the situation.

Marshall Received on Tue Mar 06 2007 - 01:53:16 CET

Original text of this message