Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

The Germanic language form

by Win (Novice)
on Jun 01, 2007 at 09:34 UTC ( [id://618673]=perlquestion: print w/replies, xml ) Need Help??

Win has asked for the wisdom of the Perl Monks concerning the following question:

I’ve just been on holiday and a few discussions with some Finnish Swedes got me wondering. Apparently Swedish is much more similar to English than Finnish. Finnish has some really strange grammatical constructions apparently. Our conclusions were that English was a Germanic language (heavily influenced by latin). What has this got to do with Perl? Well, the question is. Would modern programming languages have been any different in their structure if they had been entirely developed by Finnish only speaking Finns, for example. How much has the Germanic language form biased the development of Perl? Maybe I should be asking how much the Indo-European language form has biased the development of Perl. Any thoughts welcome.

Also, it is clear that the British are no more similar to the Germans, Swedish, Norwegians, Danish and Austrians than the Spanish, Italians and French. So what was it that drew us to the Germanic language form? What is superior about this form and can we learn from this when developing programming languages? Also, are there any weaknesses in the Germanic language form that leads to weaknesses in programming languages being developed?

Replies are listed 'Best First'.
Re: The Germanic language form
by vrk (Chaplain) on Jun 01, 2007 at 13:12 UTC

    Well, being a native speaker of Finnish, I think I can speculate a bit. I'm sorry for the upcoming confusing explanation, but I know only basics of linguistics.

    Apart from mostly free word order, I think the biggest difference of practical significance between Finnish and English is word flexion. In English, you indicate by use of prepositions (and sometimes postpositions) location, relation, preference, and other similar concepts for nouns. For instance, one might say (the classical example) "I live in a house" or "A lion ate me".

    In Finnish, you flex the nouns, the pronouns, the adjectives, and the verbs, so our examples become asun talossa (or minä asun talossa) and leijona söi minut. In the former, the basic or root form of house, talo is flexed with the -ssa suffix to indicate that something is in something else. Minä, which means I, is flexed as in English, indicating that "I" was the target of the action of eating. The root form of the verb asua, to live, is also flexed according to the pronoun. As in Spanish, you can optionally leave out "I", as it is already visible from the verb who the subject of the sentence is. Also notable is that there are no definite and indefinite articles in Finnish, but those are understood from context.

    By the way, as in English, there are no grammatical genders, and in fact, we even have only one pronoun for third person singular: hän. Talk about gender equality.

    There are fourteen noun cases in Finnish, corresponding to such English prepositions as in, inside, out, outside, of, for, with, by, and between, to name a few. The rules for flexing nouns are a tad complex for non-natives, because not only are there many exceptions (or rather several very different rulesets), you also have to obey so-called vowel harmony.

    Vowel harmony means that a single word must have either frontal vowels (y, ä, ö, y and ö the same as in German) or back vowels (a, o, u, roughly the same as in Latin). Both sets can be mixed with neutral vowels (e, i), but not with each other. This means that there are, in fact, two versions of each noun case, one for frontal vowels and one for back vowels. Our example case, -ssa would be -ssä for words such as äiti, mother. (Imagine the English sentence "there is something good in mother" and äidissä on jotain hyvää.) Talking about vowels, we also have a dozen or so diphthongs.

    Back to word flexion, pronouns may assume the same cases as nouns. I can say minussa, "in me" or "inside me", or hänessä, "in him/her" or "inside him/her". (Note again vowel harmony.)

    Adjectives and verbs flex as well, but a bit differently. Since this is already a long reply, I'll skip most, but in our example, the word söi is the past tense of the root verb, syödä, to eat, flexed according to third person singular. If it were a group of lions, we would use söivät to indicate plurality (and the present (progressive) tense would be syövät, "eat" or "are eating", but you don't want to think about that).

    Naturally, there is also a grammatical group for non-flexing words, i.e. adverbs. There are some that can be used as pre- or postpositions akin to English.

    One example more before actual speculation: word order is relatively free, but it does carry some significance, namely making nuances. In English, you can say "A lion ate me" to stress that it was a lion that ate, or you can say "I was eaten by a lion" with a passive agent to stress that it was you who was eaten. In Finnish, we don't need to change the grammatical structure of the sentence. The first case is leijona söi minut and the second is minut söi leijona. You can permute the three words in any order and you get a different nuance of the same event.

    I have never studied Latin, but as I understand it and from reading Lingua::Romana::Perligata manual, Latin has completely free word order, and it has even stronger word flexion than Finnish. So, to see what Finnish-influenced programming could possibly look like, check that excellently funny module.

    However, some speculation by me is in order. A Finnish-influenced programming language would have very few prepositions and postpositions and would instead either have an elaborate variable name flexion system to indicate relationship between data, or it would write graphemes in place of prepositions, such as arrows or some other abstract symbols.

    Germanic languages have one very good quality: they are modular, for lack of a better word. You can take out a noun and replace it with something else without affecting anything else in the sentence, i.e. without any changes in flexion in other words. You can't do that in Finnish in general. One related example is flexing ordinals. Say you want to say "twenty first": kahdeskymmenesensimmäinen. That's two words: kahdeskymmenes "twentieth" and ensimmäinen "first", and the cardinals for those are kaksikymmentä "twenty" (literally two tens) and yksi "one". If you want to say "in the twenty first chapter", it turns out you need to flex each component in turn: kahdennessakymmenennessäensimmäisessä luvussa. Naturally, you don't often do this in speech nowadays, but use the English system. It's vulgar, but oh so much more convenient.

    So, in our hypothetical language, variable assignment is already a challenge. In Perl 5:

    my $var = value; my @array = (values);

    If you want to strictly adhere to Finnish grammar, we would have something like (taking into account that "variable" is muuttuja, "value" is arvo, pl. arvot, and "array" is taulukko):

    aseta var-muuttujaan arvo value. aseta array-taulukkoon arvot (values).

    Here, aseta means "set", as that's what the equals symbol really does. var-muuttujaan means "into the variable var", and the same for array-taulukkoon. Given somewhat free word order, the lines above are equivalent to:

    # For variable assignment: aseta arvo value muuttujaan var. aseta arvo value var-muuttujaan. aseta muuttujaan var arvo value. # For list assignment: aseta arvot (values) taulukkoon array. aseta arvot (values) array-taulukkoon. aseta taulukkoon array arvot (values).

    I can see a similar pattern as in Lingua::Romana::Perligata forming. However, this is already too long a reply.

    It's curious to note, by the way, that even modern mathematical notation is heavily influenced by Germanic languages. It's hard to come up with examples, but you instinctively notice it if you are not a native speaker of a similar language.

    UPDATE: If you want to do the same as in Perligata, i.e. flex the variable name (instead of the hack above), it becomes more complicated. Variable name muuttuja would flex to muuttujaan, but variable name var would flex to variin, if we try to transcribe the meaning "set var to value". If you wish to use the verb "to be" as in Perligata example:

    # my $muuttuja = value; muuttujan arvo on value. # my $var = value; varin arvo on value. # Alternative word order: value on muuttujan arvo.

    This is because var ends with a consonant, not a vowel, and thus an extra vowel needs to be appended. The parser would need to take this into account; i.e. it would have to be able to deduce the root name from the flexed variable name, and that's not trivial at all.

    --
    print "Just Another Perl Adept\n";

      Being a programmer and Latinist, I have to make some comments on your understanding of Latin from L::R::P.

      Latin only has six cases: nominative, vocative, accusative, genitive, dative and ablative. The uses being somewhat similar to some of the Finnish cases (according to Wikipedia at least), so Finnish is rather more inflected than Latin actually.

      On word order, your're quite right. Word order is very free as long as the words stay within the clause (part-sentence) it belongs in. But in some authors like Tacitus (who I had the [mis?]fortune of encountering this semester), word order is even more free, such that words are occasionally placed such that it appears outside of the clause it belongs in.

      All in all, Latin is a quite interesting language, although it requires effort and dedication to master. Not entirely unlike Perl, come to think of it. =)

        Latin only has six cases: nominative, vocative, accusative, genitive, dative and ablative.

        And locative, though its use is quite restricted in so called "classical" latin.

        On word order, your're quite right. Word order is very free as long as the words stay within the clause (part-sentence) it belongs in. But in some authors like Tacitus (who I had the mis?fortune of encountering this semester), word order is even more free, such that words are occasionally placed such that it appears outside of the clause it belongs in.

        I personnally had greater difficulty understanding Virgil... Damned Georgics! but Cesar is the easiest.

      ++ for your great post, vrk! As another finn I just need to nitpick a little on your last examples.
      # my $muuttaja = value; # You say: muuttujan arvo on value. # which in my opinion means more like: $muuttuja eq value; # I would change that to muuttujaan value. # Meaning: value to muuttuja. # Or maybe muuttujan arvoksi value. # Meaning: value to muuttuja's value. # Or more verbal: aseta muuttujan arvoksi value.
      We'll there more than one way to say it in finnish too ;) Sorry for post that probably has very little to give to non finnish readers. My first post here anyway.
      Fascinating. My niece is a linguist with no programming bent but I'm going to point her at this anyway.

      You're righ about prepositions in English. They really are what make it work. Latin, on the other hand, is so strongly flexed that it practically doesn't use articles. Between case, declension, mood etc. you always know which is which.

      Is it true that Finnish is related more closely to Turkish than any other language?

        Latin, on the other hand, is so strongly flexed that it practically doesn't use articles.

        For completeness: s/practically//;

        As if this thread weren't almost entirely off topic already.... You should be hesitant to ask an encyclopedia question.

          A reply falls below the community's threshold of quality. You may see it by logging in.
      Just a real quick note on word order freedom. I'm going to shy away from absolutes when it comes to languages, but typically even in languages considered "free", word order is fairly restricted. Consider, for instance, that a seven word sentence has 7! = 5,040 possible permutations, yet even in languages with the freest word order a small fraction of these will be semantically equivalent. Moreover, there will usually be pragmatic distinctions within these semantically equivalent sentences.
        You are quite right. Just remember that the sentences tend to have less words in these languages like finnish. Flexation cut's down the prepositions and articles. Words just happen to get longer at the same time. (36 words, english version)

        Olet melko oikeassa. Muistathan, että lauseissa on tavanomaisesti vähemmän sanoja näissä kielissä kuten suomessa. Taivutus poistaa prepositioita ja artikkeleita, Sanoista vain sattuu tulemaan pidempiä samanaikaisesti. (25 words, the same in finnish)

        # Sorry only 6 words to start with I would like to learn Perl. # Same in finnish 3-4 words (Minä) haluasin oppia Perliä.
        => All six combinations of the shorter form have the same semantics although this one is the most natural. With the "I" Minä included some of the 24 possible word combinations are quite awkward, but still understandable. If nothing else, they would likely reveal that you're not a native writer/speaker.

      Oh my! And I thought Czech was crazy. Though ... actually ... quite a few of the things you said about Finish could be said about Czech (and other slavic languages as far as I know) as well. We flex the nouns, the pronouns, the adjectives, the numerals (they are considered separate from nouns as they are flexed differently) and the verbs by means of suffixes, we do not use articles, we allow sentences missing subject, there are fourteen noun cases in Czech (though I bet the usage doesn't match), the word order is relatively free.

      The "kahdeskymmenesensimmäinen" scares the heck out of me though. It's awfully long. Especially since the parts get all joined together. We don't do that in Czech. "Twenty" is "dvacet", "one" is "jedna" (or "jeden" or "jedno", Czech does have genders), "twenty one" is "dvacet jedna". We likewise to have to change all the parts when going between ordinals and cardinals ("dvacátý první"). And we do flex the numerals, "in the twenty first chapter" would be "ve dvacáté první kapitole". We still do this though, no English-like simplification. Tenses are something I would rather not go into. I don't think I could explain that even if I tried.

      It's strange that it seems Czech and other Slavic languages have more in common with Finish than with English even though the official language evolution trees say something else. I guess it's because languages are fairly promiscuous and mix and match like mad.

        It's strange that it seems Czech and other Slavic languages have more in common with Finish than with English even though the official language evolution trees say something else. I guess it's because languages are fairly promiscuous and mix and match like mad.

        In addition to this, you know that a seagull and a mosquito both have wings and fly while they're nearer from the evolutionary pov to us and to a Horseshoe crab respectively, don't you? Speaking of programming languages, in a another post of mine in this very thread I mentioned a question I had asked in p6l: it was "an out of curiosity one" the content of which seems now relevant to the point you raised as an example. Here it is:

        And the answer was: no!

        My computational linguistics professor last quarter said that czech has nearly 10,000 parts of speech when you sit down and really try to work things out. Ca-razay!
Re: The Germanic language form
by blazar (Canon) on Jun 01, 2007 at 11:02 UTC
    I’ve just been on holiday and a few discussions with some Finnish Swedes got me wondering. Apparently Swedish is much more similar to English than Finnish. Finnish has some really strange grammatical constructions apparently.

    Indeed, it's a Finno-Ugric language, that is, it's not even Indo-European unlike most other languages spoken in Europe, including both Germanic and Italic ones which are thus much more similar each other. English itself is considered a Germanic one, although it has had many many influences.

    What has this got to do with Perl? Well, the question is. Would modern programming languages have been any different in their structure if they had been entirely developed by Finnish only speaking Finns, for example.

    Probably so. But not only Perl. I would say that influences would have been clear in most high level enough programming languages. Of course in Perl natural language principles are pervasive, thus it would be interesting to hear $Larry's opinion on this question. One thing that I know is that I'm a big fan of RPN and asked something about it p6l; $Larry's reply included:

    Nope. I used to think RPN was completely unnatural. Then I started learning Japanese, and now I not so sure am. :-)

    Interesting, ain't it?!?

    Also, it is clear that the British are no more similar to the Germans, Swedish, Norwegians, Danish and Austrians than the Spanish, Italians and French. So what was it that drew us to the Germanic language form?

    I think it's clear enough it's only because of cutural circumstances: most programming languages were born in English speaking countries. I bet Klingon ones are strongly imperative! Klingon geeks despise event driven petaQ: they drive events, not the other way round. And their programs don't have loops. They aim straight to the heart: they often kill and rarely die, but when they do, it's with honour.

    What is superior about this form and can we learn from this when developing programming languages?

    Well as a native Italian speaker, I appreciate the richness of my own mother tongue and for many things I favour it over English. One thing I really really love of the latter though is the facility with which one syntactical element can be made into another one: an adjective into a noun or vice versa, a verb into a noun and vice versa, and so on. While writing my thesis in Italian I had to write something along the lines of "number theoretic property", but there is absolutely no way to express the same concept that concisely, that is, without a longer paraphrasis: because we have "Teoria dei Numeri", but we can't easily make that into a single adjective. I think Perl got this right in many respects, and Perl 6 even more so.

      I'm English speaking, but live in Spain, and have spent the last two and a half years learning Spanish.

      The British are almost typically embarrassed about their language - they think it is clunky, and nowhere near as romantic / beautiful / expressive as French / Italian / Spanish.

      What I've realised is that, because English has very simple grammar, it is easy to learn basic English, while the Romance languages present more of a barrier to pick up.

      However, while learning Spanish, I've realised what I love about English - the enormous expressive vocabulary. This is my opinion, I can't be certain, but my experience is that native English speakers use a much larger lexicon of words in their everyday language than a native Spanish/etc speaker.

      For this reason, to speak English WELL, is very difficult - it's not that there are rules you can understand, you have to learn each word separately.

      Oh dear....

      I think English may be PHP.

      That can't be right!

        What I've realised is that, because English has very simple grammar, it is easy to learn basic English, while the Romance languages present more of a barrier to pick up.

        This is certainly true, but then one should analize what the added complexity is up to. Latin for example is even more complex than Italian, but its linguistic features make for a very high degree of expressiveness for very short and concise phrases. Indeed there's a track of this in commonly used idiomatic forms and cultural references even today, e.g:

        • "do ut des": I give you something to obtain something in change from you;
        • 17 is considered an unlucky number because it's written like XVII as a roman number, which in turn is the anagram of "vixi": "I have lived", but with such an exact and strong bent that it's really "I have terminated living", thus "I'm dead".

        Latin has declensions. *NIX shells have a moderate amount to, in that nouns (variables) do not have a sigil as they're defined, thus used as a subject, but they do have one when they're used, that is when they play the role of a complement.

        English certainly doesn't have nearly as much morpho-syntactic complexity (i.e. complicated verb paradigms, noun-adjective agreement, &c.), but that's largely because it has undergone extensive phonological weakening at the end of words--that is, the morphemes that did all the agreement stuff have been slowly disappearing over the last millenium or so due to regular sound change. English syntax still has some fairly difficult constructions. Consider Unbounded Dependency Constructions:

        Who*1 does Kim*2 think the coworkers want management to replace her*2 with *1?

        Kim*2 is the logical object of "replace" and Who*1 is the logical object of "with," but they are on completely opposite ends of the sentence. Moreover, the sentence can be extended in principle for as long as we want:

        Who*1 does Kim*2 think Carol hopes Jim says... the coworkers want management to replace her*2 with *1?

        The computational endeavor of detecting when an unbounded dependency construction is being used and of linking up the right fillers (Who*1 and Kim*2 here) with the right traces (her*2 and *1 here) is extremely non-trivial. Also, check out a grammar of the English Language in your spare time ;)

        We don't have many conjugations &c., but we have weirdo word-order rules all over the place. Swiss German, Dutch, and Norwegian have even some weirder stuff going on.

        An interesting comment but which is not connected directly to english IMHO. I am a french living in Madrid, Spain(14 years already), and previously had been living in Michigan (7 years) and Southampton (1 year). I think on the average that british people were using a larger (and more precise) vocabulary for daily activities (meaning taking out specialized contexts). But the average american daily vocabulary was much poorer about equal I would say with the spanish or french "daily vocabulary". Maybe the continuous rise of the use of specialized "slangs" borrowing lots of english words means in the long run an impoverishment of native non-english "daily word pools".

        cheers --stephan

        This is my opinion, I can't be certain, but my experience is that native English speakers use a much larger lexicon of words in their everyday language than a native Spanish/etc speaker.

        I don't know about everyday language, but English definitely does have a massive vocabulary compared to most contemporary languages. Through the centuries, languages have been getting simpler, but English is the odd one out. It's constant borrowing of words over the last thousand years or so has made it comparable to far more ancient languages in complexity.


        "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Re: The Germanic language form
by Corion (Patriarch) on Jun 01, 2007 at 09:49 UTC

    If you ever find the time, go and listen to TheDamian's talk on Lingua::Romana::Perligata. One of the key differences between English and Latin is the subject / verb / object order, or rather, the lack thereof in Latin. The SVOo has influenced the (high level) programming languages and most of them have a fixed order. As an example, in Perl the order of assignment is determined solely by position:

    my ($var) = @_

    while in Latin (and L:R:P), the order is determined by the casus of the elements:

    meis varo haec da. meis varo da haec.

    Both above sentences are equivalent in Latin (and LRP).

Re: The Germanic language form
by clinton (Priest) on Jun 01, 2007 at 09:56 UTC
    it is clear that the British are no more similar to the Germans, Swedish, Norwegians, Danish and Austrians than the Spanish, Italians and French

    Well, that's not really true. The original Britons (as far as we know) were Celtic, and then the Saxons (Germanic) came over to England, which is why English has so many Germanic words. The French invaded, and became the ruling class. So the farmer words (eg cow) are Germanic, while the consumer words (ruling class) (eg beef) are French in origin.

    In fact, the modern language most closely related to modern English is Frisian, whose speakers live near the border between the Netherlands and Germany.

    Clint

      Friesland is in the North of the Netherlands, not the East.

        Friesland is in the North of the Netherlands, not the East.

        Ostfriesland (East-Friesland) and Nordfriesland (North-Friesland) are on the North Sea shores of Germany... that's East of Westfriesland... I hear the Dutch call it just "Friesland". So the Friesen are a nation split by the Dutch-German border.

        Cheers, Sören

      You forgot the linguistic influence of the Roman and Viking occupiers (lending pronouns, of all things).
Re: The Germanic language form
by Moron (Curate) on Jun 01, 2007 at 10:11 UTC
    It all started either as sanskrit, the classical language of India, which became the origin of the Indo-European languages (most of the European languages in fact).

    Update: or it could be that some other proto-indo-european language was the origin of both Sanskrit and the Indo-European languages - the evidence I have read is as yet not definitive in my opinion and I am by nature skeptical of everything!)

    Finnish is one of the few exceptions and can be said to be lying the other side of the great Indo-European vs. Slavonic language divide being apparently neither slavic or germanic. Celtic was not an Indo-European language and Early English was formed out of a battle between early Fries (a northern Dutch language of Indo-European origin) and Celtic. Fries sort of won with some heavy casualties and absorptions and forming a brand new language that was the early English of about 1500 years ago. Since then, French influence and continuous evolution has made it what it is today *.

    The main difference between natural and programming languages hitherto is that natural languages may be ambiguous and may break rules faster than they are made with long-standing popular mistakes often changing the official spelling of the words (e.g. "give a dam" (a low-valued Indian coin) being the origin of "give a damn" (should be meaningless - would have to be "a damnation"). A programming language bears no real resemblance to a natural language, it is usually a formal instruction language with a simple grammar. Perl does not have a simple grammar and has potential ambiguities that are context-resolved and so begins to take steps in the direction of a natural language. I wonder if that has been a factor in its increasing popularity?

    (* ref. The Adventure of English: The Biography of a Language, by Melvyn Bragg, pub. Hodder & Stoughton, 2003)

    __________________________________________________________________________________

    ^M Free your mind!

      I'm sorry, this is way off-topic, but I just can't let so many misconceptions go unremarked:

      It all started with sanskrit

      No it didn't. Sanskrit is one of the earliest known Indo-European languages, but this does not mean that it was the ancestor of them all.

      Celtic was not an Indo-European language

      Yes it was (and still is).

      Finnish (...) can be said to be lying the other side of the great Indo-European vs. Slavonic language divide

      Huh? The Slavonic languages are Indo-European!

        When looking for other references in regard to your first point, I only found support for the idea that Sanskrit is the ancestor of English, in particular, this article, which describes the history and proof of the proposition. However, your 2nd and 3rd points do check out and I have updated my post accordingly, thanks! __________________________________________________________________________________

        ^M Free your mind!

      Perl does not have a simple grammar and has potential ambiguities that are context-resolved and so begins to take steps in the direction of a natural language. I wonder if that has been a factor in its increasing popularity?

      I think so. I also think it's also a result of Larry having a linguistic background.

Re: The Germanic language form
by belg4mit (Prior) on Jun 05, 2007 at 17:53 UTC
    Well, you could try looking at some languages developed by non-(native-)English speakers e.g; Eiffel, Ruby, etc. Granted, they've not created them in isolation.

    While no linguist, I'd have to say your last statement is way off base though, given what I have read. English has far more in common with German than the Romance languages, once you recognize that we've lifted about 2/3 of our vocabulary from Latin and the Normans; with a bit of Greek and Hebrew/Yiddish thrown in. Not that we should be looking at vocabulary anyways since your question was about grammar :-P

    As for the question itself, I should think that the model chosen (OO, functional, etc.) and the limits of serial transcription of directions (writing linearly) would be the larger limitations. But then, my name isn't Minsky either.

    --
    In Bob We Trust, All Others Bring Data.

Re: The Germanic language form
by belden (Friar) on Jun 04, 2007 at 20:39 UTC
    I've just been on holiday...

    See, now this thread is exactly why people shouldn't take holiday :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://618673]
Approved by Skeeve
Front-paged by bart
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-26 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found