Clojure based objects

Discussion in 'Perl Misc' started by rahul, Dec 8, 2009.

  1. rahul

    rahul Guest

    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?
     
    rahul, Dec 8, 2009
    #1
    1. Advertising

  2. rahul

    rahul Guest

    On Dec 8, 4:46 pm, rahul <> wrote:
    > 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.
     
    rahul, Dec 8, 2009
    #2
    1. Advertising

  3. rahul

    rahul Guest

    On Dec 8, 4:51 pm, rahul <> wrote:
    > On Dec 8, 4:46 pm, rahul <> wrote:
    >
    > > 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.


    Here is a revised version.
    http://rahulkmr.pastebin.com/m6e30ac7e
     
    rahul, Dec 8, 2009
    #3
  4. rahul

    rahul Guest

    On Dec 8, 4:51 pm, rahul <> wrote:
    > On Dec 8, 4:46 pm, rahul <> wrote:
    >
    > > 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.


    Here is a revised version.
    http://pastebin.com/mddb8154
     
    rahul, Dec 8, 2009
    #4
  5. rahul

    rahul Guest

    On Dec 8, 5:00 pm, rahul <> wrote:
    > On Dec 8, 4:51 pm, rahul <> wrote:
    >
    > > On Dec 8, 4:46 pm, rahul <> wrote:

    >
    > > > 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.

    >
    > Here is a revised version.http://pastebin.com/mddb8154


    And yes, it should be closure based object. I made a typo(have been
    dabbling with both Clojure and closures lately).
     
    rahul, Dec 8, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xah Lee
    Replies:
    18
    Views:
    2,292
    Arne Vajhøj
    Nov 28, 2008
  2. fft1976
    Replies:
    7
    Views:
    798
    jgrant27
    Jun 19, 2009
  3. fft1976
    Replies:
    22
    Views:
    2,586
    Arved Sandstrom
    Aug 1, 2009
  4. Shaguf
    Replies:
    0
    Views:
    158
    Shaguf
    Dec 11, 2008
  5. Eric Normand

    Introduction to Clojure Videos

    Eric Normand, Feb 19, 2013, in forum: Java
    Replies:
    0
    Views:
    257
    Eric Normand
    Feb 19, 2013
Loading...

Share This Page