[Haskell-cafe] Channel9 Interview: Software Composability and the Future of Languages

Robert Dockins robdockins at fastmail.fm
Wed Jan 31 05:44:03 EST 2007


On Tuesday 30 January 2007 19:02, Bulat Ziganshin wrote:
> Hello Tim,
>
> Saturday, January 27, 2007, 10:23:31 PM, you wrote:
> >> Humm.  While I can accept that this is a valid criticism of Haskell's
> >> monadic structure for dealing with I/O, I fail to see how it could drive
> >> a decision to prefer an imperative language like C#, where every
> >> statement has this property (overspecification of evaluation order).
> >
> > True.. perhaps his objection was related to having a bulky syntax (one
>
> on *practice*, C++ compilers can reorder statements. are this true for
> Haskell compilers?

Well... I think most reordering occurs very late in the process, during 
instruction selection.  These reorderings are very fine-grained, very local 
in scope and are really only (supposed to be!) done when the reordering can 
be shown to have no affect on the outcome of the computation.  I'd be very 
surprised to see a C or C++ compiler reordering something like function 
calls.  (Although, with gcc I believe there's a flag where you can explicitly 
mark a function as being side-effect free.  I can see a compiler perhaps 
moving calls to such functions around.  But really, how's that any better 
than what we've got in Haskell?).

Caveat: I have only a passing knowledge of the black art of C/C++ compiler 
construction, so I could be wrong.


Rob Dockins


More information about the Haskell-Cafe mailing list