* Re: [Caml-list] when OO is wrong
@ 2009-03-30 22:38 Ed Keith
2009-03-31 3:35 ` Jon Harrop
0 siblings, 1 reply; 8+ messages in thread
From: Ed Keith @ 2009-03-30 22:38 UTC (permalink / raw)
To: Alexy Khrabrov, Raoul Duke; +Cc: OCaml
--- On Mon, 3/30/09, Raoul Duke <raould@gmail.com> 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?
>
> it is worth seeing http://www.info.ucl.ac.be/~pvr/book.html
I'm still learning Ocaml, coming from a C++ background.
I love Concepts, Techniques, and Models of Computer Programming. It is one of the best computer books I've ever read. One of it's messages is that there is no one right paradigm. This is what I like about C++ and Ocaml. I am not forced to fit a square peg into a round hole. I can use procedural, functional or o-o techniques, depending on which is a better fit for the problem.
I do wish I had better tools for visualizing FP designs. I use Nassi-Schneiderman diagram for procedural designs and UML of OO designs.
-EdK
Ed Keith
e_d_k@yahoo.com
Blog: edkeith.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] when OO is wrong
@ 2009-03-31 12:21 Ed Keith
0 siblings, 0 replies; 8+ messages in thread
From: Ed Keith @ 2009-03-31 12:21 UTC (permalink / raw)
To: caml-list, Oliver Bandel
--- On Tue, 3/31/09, Oliver Bandel <oliver@first.in-berlin.de> wrote:
> Quoting "Jon Harrop" <jon@ffconsultancy.com>:
> > On Monday 30 March 2009 23:38:45 Ed Keith wrote:
> >> I do wish I had better tools for visualizing FP designs. I use
> >> Nassi-Schneiderman diagram for procedural designs and UML of OO designs.
> >
> > That's an interesting idea. Someone must have worked on this?
[...]
> A paper which you also might find interesting:
>
> "To Dissect a Mockingbird:
> A Graphical Notation for the Lambda Calculus with Animated Reduction"
>
> http://users.bigpond.net.au/d.keenan/Lambda/index.htm
The notation is very useful for teaching, but I can not imagine using it to design a complex system.
-EdK
Ed Keith
e_d_k@yahoo.com
Blog: edkeith.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* when OO is wrong
@ 2009-03-30 21:51 Alexy Khrabrov
2009-03-30 21:58 ` [Caml-list] " Raoul Duke
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Alexy Khrabrov @ 2009-03-30 21:51 UTC (permalink / raw)
To: OCaml
I liked the part of Yaron's Caml Trading talk where he says that OO is
not always the right way to model things. I wonder about other
situations where OO is wrong and functional approach simplifies
modeling? And then, since UML is so OO-motivated, should we get a new
UML, or all that OO Analysis/Design/Development is a heritage of non-
programming bureaucracy?
I've done some Fortran coding recently for high-performance, numeric
OpenMP app, and also noticed that just about everything fits into an
array -- just like almost anything in FP fits into a list. That's
another case where a flat structure clears the mind. I've found a
graph library in Fortran 77 which, with its compact representation,
was directly applicable to a rather complex social network modeling
problem of today! There's something similar to the "everything is
array" simplification in FP, but it's hard to pin it down exactly.
What is it about FP which makes modeling simpler than OO, conceptually
and technically? How can folks summarize their "enlightenment"
experiences in this regard?
Cheers,
Alexy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] when OO is wrong
2009-03-30 21:51 Alexy Khrabrov
@ 2009-03-30 21:58 ` Raoul Duke
2009-03-31 3:02 ` Martin Jambon
2009-03-31 15:53 ` Raoul Duke
2 siblings, 0 replies; 8+ messages in thread
From: Raoul Duke @ 2009-03-30 21:58 UTC (permalink / raw)
To: Alexy Khrabrov; +Cc: OCaml
> What is it about FP which makes modeling simpler than OO, conceptually and
> technically? How can folks summarize their "enlightenment" experiences in
> this regard?
it is worth seeing http://www.info.ucl.ac.be/~pvr/book.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] when OO is wrong
2009-03-30 21:51 Alexy Khrabrov
2009-03-30 21:58 ` [Caml-list] " Raoul Duke
@ 2009-03-31 3:02 ` Martin Jambon
2009-03-31 3:34 ` Jon Harrop
2009-03-31 15:53 ` Raoul Duke
2 siblings, 1 reply; 8+ messages in thread
From: Martin Jambon @ 2009-03-31 3:02 UTC (permalink / raw)
To: Alexy Khrabrov; +Cc: OCaml
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/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] when OO is wrong
2009-03-31 3:02 ` Martin Jambon
@ 2009-03-31 3:34 ` Jon Harrop
0 siblings, 0 replies; 8+ messages in thread
From: Jon Harrop @ 2009-03-31 3:34 UTC (permalink / raw)
To: caml-list
On Tuesday 31 March 2009 04:02:43 Martin Jambon wrote:
> 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?
>
> ...
> 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.)
I'd also add that OCaml's object system is great when you're developing code
and don't want to have to keep type definitions up to date as the code
evolves. For example, I used objects to represent LLVM's state in HLVM.
I also used an object to avoid introducing a huge mutual recursion in Smoke.
--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] when OO is wrong
2009-03-30 21:51 Alexy Khrabrov
2009-03-30 21:58 ` [Caml-list] " Raoul Duke
2009-03-31 3:02 ` Martin Jambon
@ 2009-03-31 15:53 ` Raoul Duke
2 siblings, 0 replies; 8+ messages in thread
From: Raoul Duke @ 2009-03-31 15:53 UTC (permalink / raw)
To: OCaml
also, check out
http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora151.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-03-31 15:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-30 22:38 [Caml-list] when OO is wrong Ed Keith
2009-03-31 3:35 ` Jon Harrop
2009-03-31 7:03 ` Oliver Bandel
-- strict thread matches above, loose matches on Subject: below --
2009-03-31 12:21 Ed Keith
2009-03-30 21:51 Alexy Khrabrov
2009-03-30 21:58 ` [Caml-list] " Raoul Duke
2009-03-31 3:02 ` Martin Jambon
2009-03-31 3:34 ` Jon Harrop
2009-03-31 15:53 ` Raoul Duke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox