Hacker News new | ask | show | jobs
by hythloday 5081 days ago
1.plus(1) looks quite sensible to me (every vector/matrix library I've seen has had a v.plus(v) or m.times(m) that returned a copy), though obviously sugar improves it. Sugar is irrelevant to OO vs procedural though.

OO is a good way to think about sockets because sockets are state machines. There's nothing wrong with passing around a socket called "this" to every procedure, but if you're doing that then you're just doing OO clumsily (i.e. without the benefit of being able to transparently substitute an SSL socket at a later point in time).