[
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: | Martin Jambon <martin.jambon@e...> |
| Subject: | Re: [Caml-list] when OO is wrong |
Alexy Khrabrov wrote:
> What is it about FP which makes modeling simpler than OO, conceptually
> and technically? How can folks summarize their "enlightenment"
> experiences in this regard?
OO is not dirty. Wait until you feel it's the right time and do it safely ;-)
Objects and classes tend to be more appropriate than modules and records in
the following cases:
- self-centric data that can be considered as a "resource", typically for IO
operations.
- frequent need to define and use interfaces before implementations.
- keeping familiar names for functions/methods without requiring
disambiguation prefixes ("input", "output", "print", "flush", "read", "send",
etc.)
Martin
--
http://mjambon.com/