apricot-lang / apricot

Clojure-like Lisp on Rubinius
94 stars 7 forks source link

Class method shorthand #32

Closed solson closed 11 years ago

solson commented 11 years ago

This stuff from Clojure would be pretty handy-dandy to have in Apricot.

(Classname/staticMethod args*) ==> (. Classname staticMethod args*)
Classname/staticField ==> (. Classname staticField)

The second one makes a lot less sense in Ruby. I think I'll just do the first one.

solson commented 11 years ago

I've implemented the second one to work like (.method Classname staticField), eg. Math/sqrt returns the Method object for the sqrt method. (Math/sqrt 4) calls it (with just a direct send).

solson commented 11 years ago

Closed by a0d04629e2bbc1c041898948c8c1a8efaa0a4f1a