3 ms·
> This feels like a philosophical question at this point. Kind of, but a) not all questions of semantics make for interesting philosophy, and b) the semantics
by PittleyDunkin 2y ago
> This feels like a philosophical question at this point.
Kind of, but a) not all questions of semantics make for interesting philosophy, and b) the semantics in this case absolutely map to meaningful concerns regarding performance, behavior, and debugability/tactics for inspection of runtime environments. The fact that ruby doesn't have the concept of a function without a parent object whose method table is referenced by the caller complicates (for instance) passing around functions as values as well as whether or not you can expect the same function to even behave the same way when calling it twice.
Of course, much of this is hidden by syntax, and it certainly doesn't restrict you from acting as if it has proper functions rather than just methods, but it absolutely does matter if you want to understand how your code is running, particularly details like memory usage and garbage collection and whether or not ruby can inline code (spoiler: it generally can't).