News for hackers. Stuff that matters.
Re:Functional calisthenics by epidemian on Thursday October 19, 2017 @01:30PM (#15509803)
> I have seen too often these things being elevated into a religion.

Yeap. I have no hard preference between sin(x) or x.sin, in an OOP context or not, as long as the language is somewhat consistent (e.g., it bothers me that Ruby has some of these functions on the numbers themselves, like 1.23.floor, but others live on Math, like Math.sin(42)).

Re:Functional calisthenics by munificent on Thursday October 19, 2017 @07:06PM (#15512309)
> it bothers me that Ruby has some of these functions on the numbers themselves, like 1.23.floor, but others live on Math, like Math.sin(42)).

Every time I type `len(some_list)` in Python, I die a little inside.

Re:Functional calisthenics by CuriouslyC on Friday October 20, 2017 @09:20AM (#15515505)
While I agree to an extent, the reason for this is not entirely bad. The len function is basically a contract that the result you get will be an integer. An object could easily have a `.length` property that is non-integer, like a line/interval for instance. Think of this as a clunky response to a lack of type information in the language proper.