Thanks alot for all the answers, 
still getting my head around the matter :)


On Tuesday, March 31, 2020 at 10:41:02 AM UTC+2, Dieter Van Eessen wrote:
>
> 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 clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/ab81ad93-4e11-4255-a5ed-865101213b26%40googlegroups.com.

Reply via email to