by TamDenholm · 16y ago · 0 comments
Is the intention here to make PHP more Ruby like? If so why?
Perhaps there is some sort of ideal that Ruby's author Matz and the author are both striving for. If Ruby is closer to the ideal than PHP, an observer who examines the two languages and this work may wonder if the intention is to make PHP programming more like Ruby programming, where is actuality the author is seeking the ideal.
This trick of perspective probably explains why so many people seem to reinvent Lisp over the years. They aren't trying to turn their languages into Lisp, they're seeking what Lisp's authors have sought over the years but haven't found another path towards the ideal.
As to why... PHP and Javascript are both very interesting because they are so widely deployed by default and have a very large "market penetration" amongst programmers.
Once you get past the "uncool factor," reaching PHP programmers is probably one of the highest value activities a toolsmith can pursue.
JM2C.
Would you mind if I ran an idea past you?
The other idea I'm toying with is something similar, but having immutable classes. So basically every time you add a new method, instead of modifying the class you would return a brand new class.
Crazy? :-)
Yep, the intention was to implement classes in a more dynamic and hackable way. Ruby was certainly an inspiration, but I'm not really trying to copy it if that's what you mean.
Ruby is pretty good in this regard, except that classes are global. This means that any change you make to a class is permanent (it's not scoped).