Hm, the most common way to encapsulate in clojure is with a closure:
Your account repository would be:
(defn account-repository [connection]
;; <- here goes additional constructor logic
(fn save [account]
(sql-save connection account))
If the repository has more methods than just save, y
x27;m looking
> for concrete stuff to imitate. :)
>
> Thank you everyone for the ideas and thoughts,
>
> -d
>
>
> On Saturday, February 7, 2015 at 10:23:43 AM UTC-6, Dru Sellers wrote:
>>
>> Greetings,
>>
>> I am trying to convert my mind from OO (C#) to one
at 10:23:43 AM UTC-6, Dru Sellers wrote:
>
> Greetings,
>
> I am trying to convert my mind from OO (C#) to one more functionally
> friendly. I am increasingly comfortable with simple applications in
> clojure, but as I start to build more complex applications, I start to fall
>
time to share your thoughts and ideas with
me.
-d
On Saturday, February 7, 2015 at 10:07:45 AM UTC-6, Dru Sellers wrote:
>
> Greetings,
>
> I am trying to convert my mind from OO (C#) to one more functionally
> friendly. I am increasingly comfortable with simple applications in
n Scala and
Clojure, by Michael Bevilacqua-Linn (Pragmatic Programmer, publisher). In
it, he takes standard OO patterns, gives Java examples, then shows how the
same things are accomplished in functional style in Scala and Clojure. I
found it to be very instructive.
A similar book by Brian
tractions. In OO (Java at least) almost everything was a special case,
> in Clojure it is the polar opposite; almost nothing is a special case.
>
> It is astonishing how many domains can be sufficiently modeled as a
> sequence of maps [{..} {..} ...] and can be sufficiently transfo
to group
> functions by the first argument. Yes, this means that my Clojure projects
> resemble OO projects, at least in terms of what logic goes where. See what
> works for you.
At World Singles we’ve ended up with just over 40 main namespaces that
correspond to the major "domai
that my Clojure projects
resemble OO projects, at least in terms of what logic goes where. See what
works for you.
Some Clojure projects I see use fairly long files. I tend to prefer smaller
files myself. In my opinion, just as a function that is too long often
indicates unnecessary complexity
I missed the salient point about data transformations which is that of
abstractions. In OO (Java at least) almost everything was a special case,
in Clojure it is the polar opposite; almost nothing is a special case.
It is astonishing how many domains can be sufficiently modeled as a
sequence
+1 This separation of behaviour and state is a key part of Clojure's
philosophy. That isn't to say that stateful components are bad as such
(Stuart Sierra's https://github.com/stuartsierra/component is an
obvious analog here) only that they aren't a given as they are in OO
lang
aybe as a
> responsibility of a function) by looking at the tests. (This is true for
> any language I work with.)
>
> http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd
>
>
> On Sat, Feb 7, 2015 at 6:23 PM, Dru Sellers wrote:
>
>> Greetings,
>>
>&g
REPL. The OO approach you have often makes it difficult
(for less trivial examples) to run a particular function in the right
context. But with the self-contained function it's just a case of getting
the parameters right, which is often easier to think about.
Jony
On Saturday, 7 Februar
b.com/ArticleS.UncleBob.TheThreeRulesOfTdd
On Sat, Feb 7, 2015 at 6:23 PM, Dru Sellers wrote:
> Greetings,
>
> I am trying to convert my mind from OO (C#) to one more functionally
> friendly. I am increasingly comfortable with simple applications in
> clojure, but as I start to build more complex applicati
2015 at 16:07, Dru Sellers wrote:
> Greetings,
>
> I am trying to convert my mind from OO (C#) to one more functionally
> friendly. I am increasingly comfortable with simple applications in
> clojure, but as I start to build more complex applications, I start to fall
> do
Greetings,
I am trying to convert my mind from OO (C#) to one more functionally
friendly. I am increasingly comfortable with simple applications in
clojure, but as I start to build more complex applications, I start to fall
down about how to structure my application. I don't want to just
Greetings,
I am trying to convert my mind from OO (C#) to one more functionally
friendly. I am increasingly comfortable with simple applications in
clojure, but as I start to build more complex applications, I start to fall
down about how to structure my application. I don't want to just
Sure that could be the case. But I found the coverage interesting and quite
different from the other books. There was also some good tips for using
Clojure in the real world. That said, may be its still worth a wait for
next version.
Thanks
Guru
On Sat, Jan 11, 2014 at 1:51 PM, Sean Corfield wr
On Jan 11, 2014, at 10:05 AM, Guru Devanla wrote:
> Sorry, I mixed up. I meant the second book to be 'Clojure in Action' :
> http://manning.com/rathore/
That book was already outdated when it was released (and many of the examples
won't work properly now).
There's a second edition coming: http
Sorry, I mixed up. I meant the second book to be 'Clojure in Action' :
http://manning.com/rathore/
On Fri, Jan 10, 2014 at 4:26 PM, Sean Corfield wrote:
> On Jan 10, 2014, at 11:26 AM, Guru Devanla wrote:
>
> Another good book I thought you could get through faster in 'Pragmatic
> Clojure'.I
On Jan 10, 2014, at 11:26 AM, Guru Devanla wrote:
> Another good book I thought you could get through faster in 'Pragmatic
> Clojure'.I found this book to be the next level to Clojure Programming.
Do you mean "Programming Clojure (2nd Ed)" by Stuart Halloway?
http://pragprog.com/book/shcloj2/pr
ginal post :).
>
> On Friday, 10 January 2014 12:52:53 UTC, christian jacobsen wrote:
>>
>> I have +10 years experience of OO programming (C++, C# and a little Java)
>> and a couple of years of FP programming (mainly F#, some Scala and a little
>> Haskell).
>> Are t
example of how elegant Clojure can become.
* it isn't self promotion at all! It is self deprecation - my solution is
clearly lame, hence the original post :).
On Friday, 10 January 2014 12:52:53 UTC, christian jacobsen wrote:
>
> I have +10 years experience of OO programming (C+
IMO there are 2 aspects of learning Clojure coming from an imperative
and/or OO background. One s the functional aspect of it and other the
idioms and the language itself. To learn the language a book like 'Clojure
Programming' would be a good start as others have suggested. It wil
anuary 10, 2014 4:52:53 AM UTC-8, christian jacobsen wrote:
>>
>> I have +10 years experience of OO programming (C++, C# and a little Java)
>> and a couple of years of FP programming (mainly F#, some Scala and a little
>> Haskell).
>> Are there any resources for learning
or all) of the way through, you'll have a very
> solid understanding of Clojure.
>
> On Friday, January 10, 2014 4:52:53 AM UTC-8, christian jacobsen wrote:
>>
>> I have +10 years experience of OO programming (C++, C# and a little Java)
>> and a couple of years
I really think Clojure Programming is the best Clojure book out there. If
you read that thing most (or all) of the way through, you'll have a very
solid understanding of Clojure.
On Friday, January 10, 2014 4:52:53 AM UTC-8, christian jacobsen wrote:
>
> I have +10 years exper
On Jan 10, 2014, at 11:02 AM, Gary Trakhman wrote:
> I loved the 'Joy of Clojure' as my first clojure book, but it was a little
> over my head at the time I started reading it, so it took subjectively quite
> a while to internalize everything.
JoC was my first Clojure book - but I had plenty of
lojure
> > Programming)
>
> I'll second that recommendation, and also suggest Brian Marick's
> "Functional Programming for the Object-Oriented Programmer":
>
> https://leanpub.com/fp-oo
>
> But, yes, coming from a heavy OOP background can make it chal
On Jan 10, 2014, at 7:18 AM, Stefan Kanev wrote:
> I strongly suggest you get a copy of the O'Reilly book (Clojure
> Programming)
I'll second that recommendation, and also suggest Brian Marick's "Functional
Programming for the Object-Oriented Programmer":
http
On 10/01/14, christian jacobsen wrote:
> I have +10 years experience of OO programming (C++, C# and a little Java)
> and a couple of years of FP programming (mainly F#, some Scala and a little
> Haskell).
> Are there any resources for learning Clojure that are particular good fo
For me (a similarly entrenched OO guy) I found it very challenging.
Nothing to do with the syntax, but you are moving from a world of locked up
bits of data behind a (hopefully) impenetrable API to a world full of
lightweight data with a myriad of tiny functions which pretty much all
perform
With that background I would go with Joy of Clojure by Michael Fogus and
Chris Houser. http://manning.com/fogus2/
On Friday, January 10, 2014 10:52:53 AM UTC-2, christian jacobsen wrote:
>
> I have +10 years experience of OO programming (C++, C# and a little Java)
> and a couple of ye
I have +10 years experience of OO programming (C++, C# and a little Java)
and a couple of years of FP programming (mainly F#, some Scala and a little
Haskell).
Are there any resources for learning Clojure that are particular good for
someone with the above background?
--
--
You received
> I wonder what are the specific advantages of putting the objects first /
making them functions?
There wasn't any specific advantage. I did it because I could and I thought
it was an interesting approach.
I didn't just want to create Yet-Another-OO-System. I wanted it to
; However, I must admit that I made it mainly as a toy project, with no
> serious intent for actually using it (I actually try to avoid OO as much as
> possible, since I don't see it as a good solution to most problems). I just
> wanted to see how feasible it was to implement
ent for actually using it (I actually try to avoid OO as much as
possible, since I don't see it as a good solution to most problems). I just
wanted to see how feasible it was to implement an OO system on top of
functions. However, reading what you wrote gave me some ideas, so I might
work on
Nice, I have been looking for something like this to experiment with.
Suggestions on syntax: It would be much nicer to use and more idiomatic if
the method name came first, e.g.
(method some-object arg1 arg2)
This would bring many benefits: you could use the standard "->" syntax, you
can "appl
Just a simple toy project I made moments ago...
https://github.com/eduardoejp/jormungandr
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated
> > very object-oriented to me. Am I wrong? Is it just because the
> > > function comes before the record instance?
>
> > > (fly hummingbird)
>
> > > As opposed to calling:
>
> > > hummingbird.fly() in a standard OO language.
>
> > Records &a
?
>
> > (fly hummingbird)
>
> > As opposed to calling:
>
> > hummingbird.fly() in a standard OO language.
>
> Records & Protocols are indeed a way of achieving polymorphism and is
> quite similar to class-based single dispatch found in Java, etc. Thus
> th
>> Records & Protocols are indeed a way of achieving polymorphism and is
>> quite similar to class-based single dispatch found in Java, etc. Thus
>> the calling conventions can look quite familiar.
>>
>> Having said that, records & protocols are fundamentally
; found it helpful, but the usage of datatypes and protocols looks/feels
> > very object-oriented to me. Am I wrong? Is it just because the
> > function comes before the record instance?
>
> > (fly hummingbird)
>
> > As opposed to calling:
>
> > hummingbird.f
s/feels
> very object-oriented to me. Am I wrong? Is it just because the
> function comes before the record instance?
>
> (fly hummingbird)
>
> As opposed to calling:
>
> hummingbird.fly() in a standard OO language.
Records & Protocols are indeed a way of achieving
Subject: Newbie question on OO/records
Okay, I'm trying to understand records. I read this article:
http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-peek/
(Clojure Protocols & Datatypes - A sneak peek by Baishampayan Ghose. I
found it helpful, but the usage of data
-oriented to me. Am I wrong? Is it just because the
function comes before the record instance?
(fly hummingbird)
As opposed to calling:
hummingbird.fly() in a standard OO language.
Thanks for any insight.
Steve
--
You received this message because you are subscribed to the Google
Groups "
On 4 September 2011 20:40, Dennis Haupt wrote:
>
> Am 04.09.2011 19:08, schrieb Justin Kramer:
>> On Sunday, September 4, 2011 12:21:23 PM UTC-4, HamsterofDeath
>> wrote:
>>
>>
>> Some other comments:
>>
>> - Nested defns are not good.
>
> why? imo, nested function/method definitions are a tool to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Am 06.09.2011 16:28, schrieb Meikel Brandmeyer (kotarak):
>
> Am Dienstag, 6. September 2011 15:57:16 UTC+2 schrieb Mark
> Rathwell:
>
> You want an anonymous function:
>
> (fn [x] (= x 2))
>
> or the equivalent shorthand form:
>
> #(= % 2)
>
> O
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
>
> or the equivalent shorthand form:
>
> #(= % 2)
>
should i ever write a bigger app with clojure, it will be filled with
these. i like them.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http:
Am Dienstag, 6. September 2011 15:57:16 UTC+2 schrieb Mark Rathwell:
>
> You want an anonymous function:
>
> (fn [x] (= x 2))
>
> or the equivalent shorthand form:
>
> #(= % 2)
>
Or even more short-hand: #{2} (for all 2s not in #{nil false})
Scary.
Sincerely
Meikel
--
You received this mess
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> It was not a syntax error. Your expression just had the wrong
> return value. I don't see how an IDE could help here.
>
>
by type inference. i don't know how far an ide could track the types
in clojure since it's completely lacking any type ann
You want an anonymous function:
(fn [x] (= x 2))
or the equivalent shorthand form:
#(= % 2)
Sent from my iPhone
On Sep 6, 2011, at 9:35 AM, Dennis Haupt wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> figured it out, i the () were a bit messed up. the working code:
>
> (def op
Hi,
On Tuesday, September 6, 2011 3:35:08 PM UTC+2, HamsterofDeath wrote:
>
>
> (every? (= parameter player) currow
> i'd like to write something like:
>
> do i have to define the function via letfn before, or is there a way
> to do it nested in the code?
>
you can create a function anytime using
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
thx, that's what i figured out a moment ago. i am used to allknowing ides
Am 06.09.2011 15:25, schrieb Stefan Kamphausen:
> hi,
>
> why does clojure want to cast the result to IFn?
>
>
> if I parse that correctly, you have two parens around the
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
figured it out, i the () were a bit messed up. the working code:
(def open 0)
(def p1 1)
(def p2 2)
(def emptyfield [open open open open open open open open open])
(defn indexOf [x y] (+ x (* y 3)))
(defn withmove [x,y,player,field]
(assoc field (
hi,
> why does clojure want to cast the result to IFn?
>
if I parse that correctly, you have two parens around the let-expression.
That leads to Clojure evaluating the let-expression, taking the result
(which is the return value of the line you mentioned: a Boolean) and trying
to call that as
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
i tried using letfn insteaf of defn for inner functions.
(def open 0)
(def p1 1)
(def p2 2)
(def emptyfield [open open open open open open open open open])
(defn indexOf [x y] (+ x (* y 3)))
(defn withmove [x,y,player,field]
(assoc field (indexOf
> i started with a tic tac toe implementation, but i'm stuck:
I used the same example problem last year to teach Clojure to two
people that were new to programming. Hopefully you'll find their code
helpful.
https://github.com/algarete13/tic-tac-toe
--
You received this message because you
On Sun, Sep 4, 2011 at 11:40 AM, Dennis Haupt wrote:
>> - Nested defns are not good.
> why? imo, nested function/method definitions are a tool to fine-tune
> accessibility. just like public/private, but much more powerful. why
Right, but defn binds function names at the top-level (which is why
it
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Am 04.09.2011 19:04, schrieb Luc Prefontaine:
> Have a look at reduce:
>
> (reduce conj [] (take 9 (cycle [0])))
>
> take returns a lazy seq. but reduce will return you a vector.
>
> Looks like you try to translate as if you were using a language
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Am 04.09.2011 19:08, schrieb Justin Kramer:
> On Sunday, September 4, 2011 12:21:23 PM UTC-4, HamsterofDeath
> wrote:
>
> * in the last loop where i am just printing out what i want to do,
> i need something like "foldLeft" (from scala). how do i fold
Dennis, may I suggest you to read this great article on Clojure:
http://java.ociweb.com/mark/clojure/article.html
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new me
On Sunday, September 4, 2011 12:21:23 PM UTC-4, HamsterofDeath wrote:
>
> * in the last loop where i am just printing out what i want to do, i
> need something like "foldLeft" (from scala). how do i fold in clojure?
>
doseq is the way to iterate over a collection and perform side effects:
(let [mo
Have a look at reduce:
(reduce conj [] (take 9 (cycle [0])))
take returns a lazy seq. but reduce will return you a vector.
Looks like you try to translate as if you were using a language that allows
mutations but you use functions to hold values that you redefine since mutation
is restricted
t
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
solved my last problem, and now i'm stucker than before:
(def open 0)
(def p1 1)
(def p2 2)
(def emptyfield [open open open open open open open open open])
(defn updated [seq index replacement]
(concat
(take index seq)
[replacement]
(dr
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
i started with a tic tac toe implementation, but i'm stuck:
(def open 0)
(def p1 1)
(def p2 2)
(def emptyfield [open open open open open open open open open])
(defn updated [seq index replacement]
(concat
(take index seq)
[replacement]
You can also put a commented out example call of the function, like this:
(defn some-magic [spells wizards]
...)
; (some-magic 5 [:gendalf :einstein])
Which is also handy for quick evaluation in the REPL.
Or you can put these example calls in the (automatic) test code.
--
You received this mes
On Sat, 3 Sep 2011 13:43:42 -0700 (PDT)
HamsterofDeath wrote:
> this might seem like a stupid question, but for me, not knowing the
> type of something is like being stuck in a dead end for anything non
> trivial.
It's not stupid, it's normal :)
In functional programming, most of the time you w
this might seem like a stupid question, but for me, not knowing the
type of something is like being stuck in a dead end for anything non
trivial. i've made a few little experiments with clojure (not much,
just testing some features) and i see how powerful clojure can be -
for small to medium sized
ridging the gap between OO and FP. It isn't Clojure specific, but as a
> (well established) Java/OO guy, this helped me "get FP".
>
> (not connected in anyway with the book or author other than through
> appreciation :))
>
> --
> You received this message because
lin Yates
> wrote:
> > Not sure whether this is good etiquette or not, but I wanted to
> > praise http://oreilly.com/catalog/0636920021667. I found it pretty
> useful
> > in bridging the gap between OO and FP. It isn't Clojure specific, but as
> a
> > (well
On Fri, Jul 29, 2011 at 5:03 AM, Colin Yates wrote:
> Not sure whether this is good etiquette or not, but I wanted to
> praise http://oreilly.com/catalog/0636920021667. I found it pretty useful
> in bridging the gap between OO and FP. It isn't Clojure specific, but as a
>
for java, I use google guava quite a bit. (formerly known as google
collections).
http://code.google.com/p/guava-libraries/
there is quite a bit of FPish things in it.
On Fri, Jul 29, 2011 at 9:49 PM, Jeff Heon wrote:
> In the vein of FP for Java programmers, these two libraries might be
> of i
In the vein of FP for Java programmers, these two libraries might be
of interest.
Sequence-like operations on collection using annotations. Nice and
small.
http://jedi.codehaus.org/
More advanced and Scalaish. Benefits from a bigger community.
http://functionaljava.org/
--
You received this mes
2011/7/29 Colin Yates
> Hi all,
>
> Not sure whether this is good etiquette or not, but I wanted to praise
> http://oreilly.com/catalog/0636920021667. I found it pretty useful in
> bridging the gap between OO and FP. It isn't Clojure specific, but as a
> (well establi
, so
> essentially I'm asking you to convince me to let this book jump the
> queue. :^)
>
>
> On Jul 29, 5:03 am, Colin Yates wrote:
>> Hi all,
>>
>> Not sure whether this is good etiquette or not, but I wanted to
>> praisehttp://oreilly.com/catalog/0636
I found it pretty useful in
> bridging the gap between OO and FP. It isn't Clojure specific, but as a
> (well established) Java/OO guy, this helped me "get FP".
>
> (not connected in anyway with the book or author other than through
> appreciation :))
--
You recei
Hi all,
Not sure whether this is good etiquette or not, but I wanted to praise
http://oreilly.com/catalog/0636920021667. I found it pretty useful in
bridging the gap between OO and FP. It isn't Clojure specific, but as a
(well established) Java/OO guy, this helped me "get FP".
e and returns a new Shape with an updated x and y.
Technically, Object Oriented programming handles both approaches, but
in practice, most OO programmers tend to think of programming in terms
of breaking down problems into objects that destructively update. So
this is really the big change for
I was wondering what's a good way to use OO concepts in clojure. Just
using multimethods and maps? Or maybe protocols?
Let's say I write a program that deals with many graphical elements
e.g. a game or a vector graphic editor.
I could represent each graphic/sprite/shape etc. as a map
rained in
> > using an object-oriented hammer on every nail they see? I know Rich
> > and Stuart have some good design examples around (I've read many), but
> > if there are any tutorials that show how to re-envision OO problems in
> > an FP world, I'd love to see
if there are any tutorials that show how to re-envision OO problems in
> an FP world, I'd love to see them.
I haven't seen an answer to this, so here's my one-page guide. This is
meant more for LISP in general than Clojure specific, but should be
better than nothing.
I. Fun
Oh and another thing:
In my experience, it's easier to start by putting all the code in a
single package, and only split it up once you get to a level of
complexity that really demands splitting it up.
Emacs/SLIME (and probably other interactive environments) really help
too: once you've written/
that show how to re-envision OO problems in
> an FP world, I'd love to see them.
You are probably running into two problems at the same time:
1 is the expectation that you can modify stuff left and right
2. is the "dispatch" issue
In my (short) experience with clojure, the m
simulator with
> Clojure in my nights & weekends. There's just one problem: I think
> I'm tainted by too much exposure to OO.
>
> I often find my self going upstream, against the language. I want to
> have an object and send it a message or invoke it, rather than
>
been doing a stock-market backtesting simulator with
> Clojure in my nights & weekends. There's just one problem: I think
> I'm tainted by too much exposure to OO.
>
> I often find my self going upstream, against the language. I want to
> have an object and send it a message
get to know Clojure is to write something in
it. So I've been doing a stock-market backtesting simulator with
Clojure in my nights & weekends. There's just one problem: I think
I'm tainted by too much exposure to OO.
I often find my self going upstream, against the language.
; And so then, to get a dialog that is like a sequence of panels, you
> > can go through and do like:
>
> > (make-login-app env make-next-widget)
>
> > Anyway, is not particularly any better than using signal passing
> > technique,
&g
r application.
>
> On Sep 4, 11:01 am, rb wrote:
>
> > Hi,
>
> > In using the Jwt library, for which I only found examples in object
> > oriented languages that structure the code in class definitions and do
> > heavy usage of instance variables, I was in a situ
In using the Jwt library, for which I only found examples in object
> oriented languages that structure the code in class definitions and do
> heavy usage of instance variables, I was in a situation where I
> wondered how I could best structure my code.
>
> With help on the IRC channel I
working solution which I
document in a blog post at
http://www.nsa.be/index.php/eng/Blog/From-OO-to-Lisp-style-structuring-my-Clojure-Jwt-app
I'm interested in feedback and advices for improvements
Thanks
Raph
--~--~-~--~~~---~--~~
You received this message be
Andrew, you have just said what needs to be said about DI that for
some reason it seems like nobody else on earth ever says -- no, they
have to write some giant screed that includes references to Hollywood.
No wonder technology sucks, when the people writing the tutorials
can't even explain things
On Jun 16, 11:34 am, Jules wrote:
> I still don't know what dependency injection means exactly. The
> examples I've seen that are said to use dependency injection can be
> solved by using first class functions. Are first class functions what
> you want?
Dependecy injection is nothing more than
I've written two successful open source IoC containers (HiveMind and T5
IoC). I don't really see the need for an IoC container for Clojure. It is
interesting that coding a stateless IoC layer in OO is a step towards
functional (T5 IoC does a lot of functional composition and sup
That would be point 5 :)
On Jun 16, 3:45 pm, Daniel Lyons wrote:
> Sean,
>
> On Jun 16, 2009, at 10:59 AM, Sean Devlin wrote:
>
> > The last example was okay, but it felt a little forced. Let's create
> > a function to do the currying for us:
>
> > user=>(defn my-parab [a b c] (fn[x](quad a b c
Sean,
On Jun 16, 2009, at 10:59 AM, Sean Devlin wrote:
> The last example was okay, but it felt a little forced. Let's create
> a function to do the currying for us:
>
> user=>(defn my-parab [a b c] (fn[x](quad a b c x)))
>
> Now, it isn't immediately obvious, but my-parab returns a function.
>
Hari,
First, I'd recommend you watch Rich's videos on Clojure, both for Java
programmers and LISP programmers. In it Rich explains why Clojure
*isn't* OO. It's heresy to some who has written lots of Java, but
once you see Clojure in action, everything starts to make sense.
On Tue, Jun 16, 2009 at 12:18 PM, hari sujathan wrote:
>
> I was trying to look from some mathematical concepts by representing -
> OOP's inheritance by tree/graph structurtes(tree for single , and
> graph
> for multiple inheritence) with classes acting as each node.
> With functional programmin
I've seen dependency injection used in choosing an implementation for
an interface with a configuration file i.e. without having to modify
the code.
I've only seen it used in component frameworks with lifecycle (a
lifetime ago with Jakarta Avalon and now with Spring.)
Currently we're using it in
> Stu
>
> > Hi,
> > clojure web site says - "Clojure multimethods are a simple yet
> > powerful mechanism for runtime polymorphism that is free of the
> > trappings of OO, types and inheritance" .
>
> > I think dependency Injection has nothing to do with ju
re web site says - "Clojure multimethods are a simple yet
> powerful mechanism for runtime polymorphism that is free of the
> trappings of OO, types and inheritance" .
>
> I think dependency Injection has nothing to do with just OOP, though
> it came out in OOP.
> Why no
1 - 100 of 153 matches
Mail list logo