top | item 46662280

(no title)

lolc | 1 month ago

Haha I can read some casual Turkish and this made my day!

Funny how the case system of Turkish is both strong and standardized enough for this to work well. I don't know any other language where flexible argument order would work so well.

discuss

order

inkyoto|1 month ago

> I don't know any other language where flexible argument order would work so well.

Any highly inflected language has such a property. Slavic languages, Sanskrit (or, more broadly, Indo-Aryan languages) are prime examples.

Speakers of Finnish and Hungarian will likely chime in and state something similar.

ronjakoi|1 month ago

Finnish case markers vary a lot from word to word, because of not only vowel harmony but other features of the word stem, and consonant gradation which is a weird feature of Uralic languages.

For the subtraction example, some numbers would be 50:tä 5:llä and others 6:tta 3:lla. Of course you could encode for all those possibilities and successfully parse them, but it would feel weird for a compiler to reject an expression because it's ungrammatical Finnish.

Also it would feel weird if you first write (vähennä muuttujaa 256:lla) but then realise you made an off-by-1 and have to change it to (vähennä muuttujaa 255:lla) but that doesn't compile because it should be 255:llä, so you have to remember to change two things.

But on the other hand, that's just how it is to write in Finnish, so in prose we don't really think about it. In natural language, it's normal to have to change other stuff in a sentence for it to continue making sense when you change one thing.

thaumasiotes|1 month ago

> I don't know any other language where flexible argument order would work so well.

What kind of sample size is that? A case system and flexible argument order are largely the same thing.

Note also that flexible argument order is a robust phenomenon in English:

1. Colonel Mustard killed him in the study at 5:00 with his own knife.

2. Colonel Mustard killed him at 5:00 in the study with his own knife.

3. Colonel Mustard killed him in the study with his own knife at 5:00.

4. Colonel Mustard killed him with his own knife at 5:00 in the study.

5. Colonel Mustard killed him at 5:00 with his own knife in the study.

6. Colonel Mustard killed him with his own knife in the study at 5:00.

But if you insist on looking in other languages, there's a famous Latin poem beginning Quis multa gracilis te puer in rosa perfusus liquidis urget odoribus grato, Pyrrha, sub antro?

Translating this as closely as possible to a one-word-for-one-word standard, it says What slender boy soaked [in] liquid odors presses you among many rose[s], Pyrrha, beneath [a] pleasant cave?

(Notes: rosa is singular for unclear reasons. There is nothing corresponding to the in of "in liquid odors"; the relationship between the odors and the soaking is expressed purely by case. There is also nothing corresponding to the article in "a pleasant cave"; Latin does not mark definiteness in this way. Location inside a cave is expressed with "beneath"; compare English underwater.)

Anyway, the actual word ordering, using this translation, is: What many slender you boy among rose[s] soaked liquid presses [in-]odors pleasant, Pyrrha, beneath [a-]cave?

I've heard that Russian poetry is given to similarly intricate word orderings.

lolc|1 month ago

Yeah sure there are other languages where the cases allow flexible argument ordering. I should have written "another language" not "any other language" because I meant the languages I know. I can see how it'd work in Latin. Though poetry takes a lot of license with language, so by quoting from poetry, we're at the extreme end of what a language can do. From what little I remember in Latin there would be examples where one couldn't distinguish the cases.

The only variation in your English examples is with the prepositions. English is a language where you just do not get that kind of flexibility. Unless, again, you do poetry. Can't even put the inflected pronoun first even though it would be unambiguous:

    Him Colonel Mustard killed.
Let's look at this contrived example:

    The policeman bites the dog.
Notice how in English I can't reverse them easily. Have to get creative:

    The dog the policeman bites.
Stilted and prone to get misunderstood isn't it? In German, this is possible:

    Den Hund beisst der Polizist.
Though if you do that, people think you made a mistake and will misunderstand you. The cases are rather weak in German. No comparison to Turkish:

    Köpeği ısırıyor polis.
They do it for emphasis as part of everyday speech. You can put the subject first or last or in the middle and there is no confusion. Though admittedly that example is stretching it :-)