This is a Wish List for Ruby. Ruby is an excellent language, however here are some small things that I would like to see added to Ruby:
Imagine that the method we were calling is this fn mult x y = 10 * x * y and then we wish to do mult 10 2 mult 10 3 mult 10 4 These calls will now cause it to do 10 * 10 * 2, 10 * 10 * 3 and 10 * 10 * 4 However if we could partially evaluate a function we could say fn mult10 = mult 10mult10 2 mult10 3 mult10 4 When mult10 is created it is already evaluated to being “100 * y”. So, subsequent calls would cause it to do only 100 * 2, 100 * 3 and 100 * 4. To add this sort of support to Ruby will have to bring large changes to the language. A simpler implementation would be to create a method object (yes that’s possible in Ruby) and also a hash of the partial list of parameters. The call itself could be formally executed only when all formal parameters are satisfied by the parameter hash table collection. If you are still reading this might interest you: http://www.svendtofte.com/code/curried_javascript/
Imagine that the method we were calling is this
fn mult x y = 10 * x * y
and then we wish to do
mult 10 2
mult 10 3
mult 10 4
These calls will now cause it to do 10 * 10 * 2, 10 * 10 * 3 and 10 * 10 * 4
However if we could partially evaluate a function we could say
fn mult10 = mult 10mult10 2
mult10 3
mult10 4
When mult10 is created it is already evaluated to being “100 * y”. So, subsequent calls would cause it to do only 100 * 2, 100 * 3 and 100 * 4.
To add this sort of support to Ruby will have to bring large changes to the language. A simpler implementation would be to create a method object (yes that’s possible in Ruby) and also a hash of the partial list of parameters. The call itself could be formally executed only when all formal parameters are satisfied by the parameter hash table collection.
If you are still reading this might interest you:
http://www.svendtofte.com/code/curried_javascript/
Whew!
Well, that’s about it for now. But as you can see most of what I am asking for here are simple things and superficial changes. I would however really like to see the win32ole, threads and ++ operators in Ruby, even if none of the others work out.
Matz, (Yukihiro Matsumoto), the creator of Ruby is planning to introduce some significant changes to the language and more importantly going to get it running off a formal virtual machine that he is writing for Ruby called Rite.
Here are some of the plans for Rite and Ruby:
http://www.rubygarden.org/ruby?Rite
I found this on one of the websites, this is about how Matz wanted to work on Rite:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/76588|* will Rite be developed publicly.. Or will you keep it souce secret?
From my experience and observation, an open source software needs to
have running code before the ball rolling to success. I think I need to work alone until the first running version.
|* still use Ruby license scheme?
It will be open source software for sure. License terms may be
changed.
|* do you need help? Say what we should do and we will do it
This is very important. Listen carefully.
From the reason I stated above, I feel like I will work alone.
But if someone shows his talent, and comes up with his own _good_
implementation of new Ruby earlier than me, and if he is willing to
contribute his code, and if he allows me to hack and chop his code to
make it "Rite", I will name it "Rite". And he will be honored for ever.
Remember Me
a@href@title, strike
Powered by: newtelligence dasBlog 2.0.7226.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Roshan James
E-mail