From: Marcin 'Qrczak' Kowalczyk Date: 2003-02-17T21:05:44+09:00 Subject: Re: General programming language question Mon, 17 Feb 2003 19:04:42 +0900, Christian Szegedy pisze: > First of all, I don't agree that variables are first class > objects in any of the above languages. Mutable variables (SML & OCaml's ref, Haskell's IORef) are first-class. Plain variables (named constants) aren't, and it's unnecessary, since they are equivalent to their values. > Secondly: There are several drawbacks of using Haskell, but it is > definitively *NOT* the "ugly syntax". I would go so far to say that > I have not seen a language with more elegant syntax than Haskell > (even compared to Ruby). I agree, but not for mutable variables. Haskell: increment v = do value <- readIORef v writeIORef v (value + 1) OCaml & SML: let increment v = v := !v + 1 fun increment v = v := !v + 1 And in my language Kogut: increment $v = v := v + 1 which is the same as increment v = v (v() + 1) -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/