Hacker News new | past | comments | ask | show | jobs | submit login

> Or at least I think `+(u, v)` or `u + v`, is more natural then `u.plus(v)` or `u.+(v)`

I definitely agree with that, I said that object.method() style is often more natural. Typically when you have an object with some internal state and you want to send a message to it that will change its state. For example: threadPool.run(command) feels more natural than run(thread_pool, command).




It's more natural to you (and to be fair, most programmers who have used OOP languages) purely because you're used to languages which work that way.


No, it is not some arbitrary choice, it confirms to the [second] most dominant word order in natural languages: subject-verb-object.


In fact, the most common word order in natural languages is subject-object-verb.

https://en.wikipedia.org/wiki/Subject%E2%80%93object%E2%80%9...

But SVO is a close second, and certainly more common than verb-subject-object (the equivalent of `function(arg1, arg2)`).


> purely because you're used to languages which work that way.

You don't know that. I think that for people new to programming both styles can be natural, depending on the specific situation.


I agree, and that was largely my point.

People discuss certain styles as being more natural, but in nearly every case (including this syntactical debate) I assert that it is solely due to what the most mainstream languages do and thus what people are more used to seeing.

That's not the same as being natural




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: