3 ms·
Why code in faux Latin when you can use the real thing: http://users.monash.edu/~damian/papers/HTML/Perligata.html http://users.monash.edu/~damian/papers/HTML/P
by BerislavLopac 7y ago
Why code in faux Latin when you can use the real thing: http://users.monash.edu/~damian/papers/HTML/Perligata.html http://users.monash.edu/~damian/papers/HTML/Perligata.html
- jacobush 7y agoI didn't expect it, but I thought Perligata is more readable than Perl.
- libeclipse 7y agoNot a difficult task lol
- skykooler 7y agoAt least, apart from numbers, which all are rendered in Roman numerals.
- ClumsyPilot 7y agoThis is so cool! I love it. I am a Russian speaker, and this ambiguous aspect of English has always bugged me to hell! I think english was a bad model as a starting point for programming languages.
- Aloha 7y agoHow so?
- SamBam 7y agoI'm guessing they're referring to linguistic features that English doesn't have, such as inflected nouns to unambiguously indicate the subject, direct object and indirect objects. `bite(dog, man)` is ambiguous. You need to look up the function documentation, make a guess, or ask the library developer to come up with a less ambiguous name. If you could decline your variables, however, you could write (in terrible fake Latin) `bite(dog, man-um)` or `bite(dog-um, man)` and they would be interpreted as two different -- and unambiguous -- things. ...but I'm just repeating GP's article.
- zamubafoo 7y agoIt might just be me, but isn't that just how you name your attributes within the function definition? I don't see how that would help disambiguate without have to look at the function definition at the very least.
- SamBam 7y agoThe point is it's a new way of looking at arguments (in this toy example). In Latin, the order of the nouns typically does not matter. Their role in the statement is unambiguously determined by their declension. So if you wrote a library with the verb "bite", you wouldn't specify that the first bites the second, or the first was bitten by the second. Those are ambiguous, because they're you're choice as a developer. Rather, you'd specify that the noun in the subject case bites the noun in the object case. That's unambigious in all declined languages. So, as a reader of someone else's code, I can see immediately that `bite(boy-um, dog)` -- in my fake Latin where "um" denotes the object (cf. "Puer - Puerum") -- that the boy was bitten by the dog. I don't need to look up any documentation or look at how the variables are named in a third-party library. Again, of course this case is a toy example. The article is more in-depth.
- tuesdayrain 7y ago`bite({from:Dog,to:Man})` solves the ambiguity in my opinion.
- airstrike 7y agoThis is clearly the work of both a madman and a genius
- meddlepal 7y agoI just proposed my team switch to this haha, awesome.