3 ms·
Functions are objects in Python and JS, btw. And primitives can be treated as objects. They are wrapped by prototypes in JS, and belong to type classes in Pytho
by goatlover 9y ago
Functions are objects in Python and JS, btw. And primitives can be treated as objects. They are wrapped by prototypes in JS, and belong to type classes in Python.
Ruby's elegance stems from being able to treat everything as an object sending messages to other objects, like Smalltalk. Some languages promote a certain style of programming. You might as well complain that Haskell is functional, and Lisp is homoiconic.
Howevver, Ruby & Crystal still let you define functions and write statements as if they were procedural.
- nnq 9y ago> and write statements as if they were procedural my issue is not with writing procedural code, it's with the way functional parts of a program "mush" into "OOP-statey" with no obviousness of boundary. It feels kinda "dirty".