[m-users.] Idiomatic Mercury - if-then-else or (C->I;E)

Paul Bone paul at bone.id.au
Wed Nov 25 11:00:47 AEDT 2015


On Tue, Nov 24, 2015 at 02:35:53PM +1300, Richard A. O'Keefe wrote:
> 
> For a time I thought that programming-in-the-small was a
> basically solved problem and that programming-in-the-large
> was the big challenge.  But we are pressing on with
> programming-in-the-large while reverting to the BL***Y
> STONE AGE in programming-in-the-small.  Mercury is one of
> a handful of blessed exceptions to that.  Semper floreat
> et crescat!  (Dijkstra reference.)
> 

Hi Richard.

I'm curious about what you mean when you say that we're reverting to the
stone age about programming in the small.  My guess is that you mean that
some languages make certain things (at the in-the-small scale) inconvenient,
for example Java lacked first class functions (and maybe still does, I
haven't looked at the details of Java 8 yet), and putting a higher order
(predicate) value into a structure in Mercury is extremely awkward.

In general I think these things are getting better.  Lately many languages
are having things like generics and lambdas added (Java) or designed in from
the start.  So I'm not sure that I've understood you when you say that it's
getting worse, maybe I misunderstand what you've said or the scope of what
you've said.  I think some examples may help.

Can you also explain, probably also with examples, how Mercury is an
exception to this?

Thanks.


-- 
Paul Bone



More information about the users mailing list