Hacker News new | ask | show | jobs
by throwaway_bad 2425 days ago
Now that I think about it, languages that aren't subject-verb-object probably find OOP insane.

I tried to find an example of this and found a somewhat related article about how Japanese grammar maps nicely onto ruby: https://thoughtbot.com/blog/learning-japanese-the-rubyist-wa...

1 comments

> Now that I think about it, languages that aren't subject-verb-object probably find OOP insane.

I'm not sure if that's true in this generality. After all, "agent.doSomeThingWith(object)" is not a declarative sentence, it's a command. So you'd have to look for languages where imperatives don't have subject-verb-object (as an acceptable) order.

I'm sure there exist some, but at least I would expect them to start with the agent you are commanding.

The agent still needs to hear the complete command to carry it out, so there's no strong pressure to prefer a particular word order.

In German, the difference between the imperative "Machen Sie das!" [Do that, you (polite form of address).] and the declarative "Sie machen das." [You (polite form of address) are doing that.] is that the imperative does not put the agent first.

Interesting point about German, though du/Sie isn't the kind of "agent" I was thinking of. I meant something where you name the agent by name, like "Frau Huber, machen Sie das!". And yes, I know you can put the name at the end as well.

The du/Sie in such sentences is something that's specific to German compared to the other languages I know, which don't need (or even allow) the pronoun: "do this", "faites ça", "gjør det" are all complete sentences. In fact even in German it's specific to Sie, for while you can say "mach Du das", "mach das" is fine as well. (If you speak a different dialect from mine, you might insist on "mache" instead of "mach", but around here that ship has sailed.)

Interesting how German doesn't allow to drop the addressing pronoun due to how the sentence structure works, but Scandinavian readily allows even the number of addressees to be derived from the context. I guess I prefer English over German as the language for programming because it shoehorns a lot of structure on a later, more boiled-down incarnation of Germanic, and notably (therefore?) ships many short and flashy words, such as "if", "on", "not", "do".