3 ms·
This actually isn't really the case in Crystal, or at least not as much as in Ruby. We allow you to create a proc (closure) from an existing method/function but
by RX14 9y ago
This actually isn't really the case in Crystal, or at least not as much as in Ruby. We allow you to create a proc (closure) from an existing method/function but methods themselves are just methods. Classes have metaclasses though, which are fairly useful for some neat reflection-like behaviour.
None of this really matters, even if functions were objects, then as long as that fact gets out of your way just don't take advantage of that.