Hello,
I've got a clojure and a python piece of code. Both seem to create what can
be considered an instance of a class. Wherein lies the conceptual
difference?
Python:
class MYCLASS():
def __init__(self, x):
self.x = x
def MYMETHOD(self):
...
def MYFUNCTION():
lol = MYCLASS()
Clojure:
(defn MYCLASS [x]
{:x [x]
:MYMETHOD (fn [] (MYCLASS ...))})
(let [lol (MYCLASS ...)])
I know its not valid code, but I hope you see what I'm aiming at: isn't
using a map with functions in it just the same as a class?
Or is only the user interface of the language conceptually equal, while the
underlying plumbing is completely different?
If this is the case, wherein lies the major differences?
If one could simply point me in the right direction, I'd already be very
pleased. Most literature I've read so far only explains clojure can be used
this way, but never focuses deeper on the subject.
kind regards,
Dieter
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/clojure/49cd26ca-48ae-48b4-a5ab-b0f7c711b77e%40googlegroups.com.