Version française
Home     About     Download     Resources     Contact us    
Browse thread
If OCaml were a car
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] If OCaml were a car
On Mon, 2007-08-20 at 04:37 +0100, Jon Harrop wrote:

> Why should the return value (of unit) not be used as the argument to an 
> application?

Because functions returning unit are always executed for side-effects
since unit conveys no information, so allowing a procedure to be
used as an argument means the order of side effects depends on
implementation dependent argument evaluation ordering, that is,
it is indeterminate.

In Felix banning side-effects from functions allows optimisations
Ocaml will have a much harder time applying, since Felix
bans side-effects from functions, and the type system helps
by requiring procedures to return the vacuous type void.
[But this still doesn't give referential transparency ;]

> > 	print$ "Hello" + " World";

> You might prefer the F# operators |>, << and >>.

I might. But I'll use what Inria provides.

>  I'd much rather 
> see effort go into an IDE rather than tweaking the syntax and breaking 
> backward compatibility.

I'd never use the IDE.. so I'd rather the effort be going into

	(a) the type system, parallelism, etc -- which it is!
	(b) libraries -- which it isn't ;(


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net