5 ms·
I wish matz didn't remove macros in the first place.
by xenophanes 17y ago
I wish matz didn't remove macros in the first place.
- raganwald 17y agoI really think that when a language designer is contemplating removing features, they should be mindful of the inevitability of people greenspunning those features right back in. There's a lot of value in making a language simpler and more elegant, and if the language gives you great tools for building stuff in people might surprise you by designing better implementations than what you intended. But still, it's inevitable that anything remotely lisp-like will get sucked into Lisp's black hole.
- aerique 17y agoCan you explain your last sentence? I don't understand it.
- raganwald 17y agoThe Black Hole Theory of Design: http://blogs.sun.com/jag/entry/the_black_hole_theory_of http://blogs.sun.com/jag/entry/the_black_hole_theory_of Another way to put it is that Lisp might be a local maximum: It may not be the globally optimum language for a particular problem, but once you approach Lisp you find that improving your language requires either becoming more Lisp-like or making a huge leap away from Lisp (C, ML, Haskell, Smalltalk, Erlang, &c.)
- UncleOxidant 17y agoI'm not sure he removed it, I think he just didn't want macros from the start as I recall.
- xenophanes 17y agoHe has said he took lisp and removed macros. But it could have just been conceptually, I don't know. Does anyone?
- ionfish 17y agoMatz was talking about concept, not implementation; MRI is not literally a Lisp interpreter with macros removed.
- raganwald 17y agoI've read that, but I still don't grasp it. Even though he calls Ruby "MatzLisp," it feels a lot more like "MatzSmalltalk" to me. Even without macros, the homoiconicity of Lisp makes eval-ing lists a completely different beast than eval-ing strings or blocks. And everything is an object, there are no functions. And there are magic syntactic constructs like while... But I digress. I guess he did start with Lisp and remove macros :-)
- lispm 17y agothe 'MatzLisp' thing was a joke. He never understood Lisp, Lisp was too complicated for him and wanted to do his own thing anyway.
- Scriptor 17y agoI know the whole MatzLisp was a joke, but where are you getting the idea that he never grokked Lisp? I'm pretty sure writing an interpreter is pretty complicated as well.
- lispm 17y agowatch his keynote from some last Ruby conference. He described that he tried to learned Lisp and that he thinks it is too complicated. He is relatively clueless about it. Interpreters exist in dozens. In the Lisp community it is a sport to write those. Scheme has more than a hundred implementations. Many of them are much more ambitious than Ruby. The Ruby implementation technique is not very advanced - it is a very simple interpreter, hacked together. The Ruby language may be convenient to use for scripting, but from a language implementation standpoint it is far away from the state of the art. It shows. The Ruby implementation is about the slowest language implementation out there. There are dozens of Lisp implementations that are much more advanced, include compilers, etc.. Sure, Ruby is simpler and its implementation is simpler - that's part of the reason of its success.
- jamesbritt 17y agoHe was asked about macros at some recent RubyConf (maybe the one in Charlotte). He said (as I recall) that he was against having macros in Ruby because it would allow for too much variance in program syntax. Seemed an odd argument from someone who defends other "dangerous" language features (e.g open classes) by simply saying that Ruby is a sharp knife and you just need to be careful with your tools.