Skip to content

Comments

Woking solution#1

Open
ympbyc wants to merge 12 commits intoneverblued:masterfrom
ympbyc:pullreq
Open

Woking solution#1
ympbyc wants to merge 12 commits intoneverblued:masterfrom
ympbyc:pullreq

Conversation

@ympbyc
Copy link

@ympbyc ympbyc commented Feb 21, 2013

Hi. I don't know if you are still interested in this, but I made some commits to your js-clos project. This pull-req is just to let you know about it.

The changes include:

  • Modify generics so that they can be called in a normal JS way
    • foo(x, y, z) instread of CLOS.call('foo', x, y, z)
  • Modify defGeneric and defMethod to cope with the above change
    • defGeneric returns a function object
    • defMethod takes the function object instead of its name
  • Added defClass with support for multiple inheritance
  • defMethod sorts the methods based on specificity
  • etc...

I made a gist to show the example use cases: https://gist.github.com/ympbyc/4996968

I apologize this is a huge commit. I hope this is worth reviewing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant