Browse thread
[Caml-list] OCaml wishlist
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Richard Jones <rich@a...> |
| Subject: | Re: [Caml-list] OCaml wishlist |
On Tue, Oct 21, 2003 at 04:55:31PM +0200, Michal Moskal wrote: > This is however religious issue. It wasn't meant to be (honest!). I just want to write code in whatever paradigm is best for the moment, be that OO, functional or imperative. My point is actually just that if you're writing user interface code, then what you're doing is essentially going to be imperative most of the time. > > 2. abstract data type syntactic sugar: > > obj#call [ or: obj->call ] > > > > is exactly equivalent to: > > > > M.call obj > > let f a b c = a->add b c > > What type does f have? Several correspondents asked the same question, and I understand that you can't infer the type in this case. So the answer would be that it's an error. This makes sense because the -> syntax isn't meant to be a substitute for object oriented programming / late binding :-) Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you. NET::FTPSERVER is a full-featured, secure, configurable, database-backed FTP server written in Perl: http://www.annexia.org/freeware/netftpserver/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners