For examples of polymorphism mixing Java and Clojure, try my article on
Developer Works:
http://www.ibm.com/developerworks/java/library/j-clojure-protocols/
-Stuart Sierra
clojure.com
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
On Feb 15, 3:10 pm, Sean Corfield seancorfi...@gmail.com wrote:
On Tue, Feb 15, 2011 at 2:53 PM, MS 5lvqbw...@sneakemail.com wrote:
Because I'm not sure how else to use (for example) a graph library and
still have it look like a circuit, rather than a graph.
Almost any such graph library
On Feb 15, 4:12 pm, James Reeves jree...@weavejester.com wrote:
On 15 February 2011 22:53, MS 5lvqbw...@sneakemail.com wrote:
So an electrical circuit is a data structure containing vertices and
edges and describing how they are connected. Then you'll have some
functions that operate on
If your domain model can be represented by a simple vector / map /
set, then you have a very rich set of tools (in Clojure) to operate on
your domain model. If your domain model is represented by fixed types,
you have to write all sorts of wrapper functions to be able to apply
those
Hi, I just (mostly) finished reading the Programming Clojure book and
while it gave a great overview of the language, I'm still at a loss
for how to design programs.
Maybe my mind has been polluted by OO concepts.
For example, I'm trying to figure out how to do polymorphism in FP.
Specifically,
On Feb 15, 9:04 pm, MS 5lvqbw...@sneakemail.com wrote:
Hi, I just (mostly) finished reading the Programming Clojure book and
while it gave a great overview of the language, I'm still at a loss
for how to design programs.
You'll get better answers later but here is my take on it.
Maybe my
On Tue, Feb 15, 2011 at 1:07 PM, Saul Hazledine shaz...@gmail.com wrote:
On Feb 15, 9:04 pm, MS 5lvqbw...@sneakemail.com wrote:
Maybe my mind has been polluted by OO concepts.
Maybe a combination of OO and static typing.
for a functional take:
On Tue, Feb 15, 2011 at 1:12 PM, Raoul Duke rao...@gmail.com wrote:
for a functional take:
http://ac.aua.am/trietsch/web/Critical%20Path_Holistic%20Approach_final.pdf
aw, crap.
http://www.htdp.org/
is the link i really wanted to copy-paste. (i think the one i did
paste is good reading if
On Tue, Feb 15, 2011 at 12:04 PM, MS 5lvqbw...@sneakemail.com wrote:
Maybe my mind has been polluted by OO concepts.
I was having this discussion on another list and it seems that the
less OO folks know, the easier they find FP... so you may well be
right :)
For example, I'm trying to figure
On Tue, Feb 15, 2011 at 1:55 PM, Sean Corfield seancorfi...@gmail.com wrote:
On Tue, Feb 15, 2011 at 12:04 PM, MS 5lvqbw...@sneakemail.com wrote:
For example, I'm trying to figure out how to do polymorphism in FP.
Why?
because polymorphism makes code suck less, if done well. see
typeclasses in
Thanks, I have HTDP on my computer but after the first chapter I got
distracted and have been meaning to get to itI'll look for my
answers there! :)
On Feb 15, 1:13 pm, Raoul Duke rao...@gmail.com wrote:
On Tue, Feb 15, 2011 at 1:12 PM, Raoul Duke rao...@gmail.com wrote:
for a functional
Cool, thanks for the tips. More inline below:
For example, I'm trying to figure out how to do polymorphism in FP.
Why?
Because I'm not sure how else to use (for example) a graph library and
still have it look like a circuit, rather than a graph.
Specifically, an electrical circuit is a
On Tue, Feb 15, 2011 at 1:58 PM, Raoul Duke rao...@gmail.com wrote:
because polymorphism makes code suck less, if done well.
If polymorphism is the appropriate solution, yes. But for a lot of
people steeped in OO thinking, polymorphism is a bit of a hammer for
every problem that looks like a
On Tue, Feb 15, 2011 at 2:53 PM, MS 5lvqbw...@sneakemail.com wrote:
Because I'm not sure how else to use (for example) a graph library and
still have it look like a circuit, rather than a graph.
Almost any such graph library is going to be a bunch of functions that
operate on a data structure.
On Tue, Feb 15, 2011 at 3:03 PM, Sean Corfield seancorfi...@gmail.com wrote:
If polymorphism is the appropriate solution, yes. But for a lot of
people steeped in OO thinking, polymorphism is a bit of a hammer for
every problem that looks like a nail.
you might also sorta be saying that there
On 15 February 2011 22:53, MS 5lvqbw...@sneakemail.com wrote:
So an electrical circuit is a data structure containing vertices and
edges and describing how they are connected. Then you'll have some
functions that operate on that data structure.
So... how do I use someone else's implementation
On Tue, Feb 15, 2011 at 3:11 PM, Raoul Duke rao...@gmail.com wrote:
you might also sorta be saying that there are lots of different kinds
of polymorphism in programming, and that we need to know when to/not
use any given form of it, which i'd agree with :-)
We're probably in violent agreement,
There are two very interesting threads over on the Scala mailing lists
at the moment that have some bearing on this thread - and I think
illustrate the two very different ways of thinking about types and
type systems:
Benefits of static typing:
18 matches
Mail list logo