Clojure based objects

R

rahul

I am implementing a clojure based objects. This is my first draft.
http://rahulkmr.pastebin.com/m6e30ac7e

It's quite trivial but it still implements encapsulation, inheritance
and polymorphism(though not correctly). I am stumped by 1 that
appears when a base class method is called. Can anyone help me with
correcting this?
 
R

rahul

I am implementing a clojure based objects. This is my first draft.http://rahulkmr.pastebin.com/m6e30ac7e

It's quite trivial but it still implements encapsulation, inheritance
and polymorphism(though not correctly). I am  stumped by  1 that
appears when a base class method is called. Can anyone help me with
correcting this?

Don't bother about the error. That is line number 37. Instead of print
$foo->('dump')(), it should say $foo->('dump')(). But I would still be
interested in comments on the code and what people think about using
clojures for objects.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top