Siphoning the Keywords Out #
Our PorCUpinECaSe bosom friend MenTaLguY is forsaking keywords and reveals the look of Ruby without such crutches.
(Frink::Gromzalot = Class::new).class_eval { define_method(:zork) { puts "Zogmorfo" } }
My eyes say this is like looking at exposed circuitry, like transparent case Gameboys and telephones, but I’ll bet one of ya could put a nice mutant veneer over it to cozy it up, push it beyond.
MenTaLguY
Heh, I had a fascination with transparent-case doodads in my Middle School days. Transparent phone, transparent watch, transparent radio, transparent clock. Predated Gameboys, though, I think… certainly the transparent ones.
As for transparent-case Ruby … the one thing I’ve not been able to solve is how to define singleton methods whilst still entirely avoiding keywords.
Many coats to them who figures that bit out…
flgr
No reason to use .class_eval there:
Class.new and define_method() are actually quite common idioms once you’re doing meta-programming.
MenTaLguY
Ahh, good catch. I’d forgotten about Class::new’s block parameter.
murphy
Looks like a dentist is trying to eleminate evil syntax sugar like “class” and “def” in his code :) Save your teeth with meta programming!
Wonderful idea, DenTaLguY ;) I’ve made a small time-saving framework:
and now this code runs without problems:
The possibilities!
lisp bigot
works for me!
MenTaLguY
murphy: that’s brilliant
*_*
Comments are closed for this entry.