3 ms·
> As for Ruby, I'm not sure I understand what you're saying; Ruby lets you just write top-level functions and variables just like you can in Python. I don't kn
by matt_kantor 9y ago
> As for Ruby, I'm not sure I understand what you're saying; Ruby lets you just write top-level functions and variables just like you can in Python.
I don't know much about Python, but in Ruby top-level bindings are just syntax sugar for attaching things to an object called "main". [0]
[0]: https://codequizzes.wordpress.com/2014/04/23/rubys-main-object-top-level-context/ https://codequizzes.wordpress.com/2014/04/23/rubys-main-obje...