Coffeehouse Thread

18 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Programming "languages" are not real languages...

Back to Forum: Coffeehouse
  • User profile image
    littleguru

    ... and should therefore be named "Programming expressions". You can't express everthing with a programming language. But that's the most important part of a real language - that's what it makes real: each real language allows you to express everything.

    I wonder who came up with the idea to name it "language".

  • User profile image
    CatalinPop

    Pardon me but... this is a little absurd. Programing languages arent human languages and therefore they don't allow you to express all the things you as a human would want, and can express using a human language. But they do allow you to fully express everything a computer can and do. There isn't something a computer can do but no language to express it in (not something that I know of at least). Also look at the similarities both human and computer languages evolve over time, to gain greater expressivity and power. What computer languages don't share wit human languages is flexibility. Computer languages are pretty inflexible. "each real language allows you to express everything." - No they don't this is an absolute. If if where so' languages would be perfect and never had to evolve. But they do evolve which means they can't express everything. QED

  • User profile image
    Sven Groot

    littleguru wrote:
    I wonder who came up with the idea to name it "language".

    Programming languages are usually expressed using constructs from formal language theory (such as regular languages, context-free grammars, etc.) which existed even before computers.

    I'm guessing that's where the term programming language comes from.

  • User profile image
    littleguru

    Sven Groot wrote:
    
    littleguru wrote: I wonder who came up with the idea to name it "language".

    Programming languages are usually expressed using constructs from formal language theory (such as regular languages, context-free grammars, etc.) which existed even before computers.

    I'm guessing that's where the term programming language comes from.


    Yeah, but what makes them a "language"?

  • User profile image
    littleguru

    Pop Catalin Sever wrote:
    QED


    The question is: what makes a language a language? That is what makes me wonder... I mean I had a lot about calculus and logic and this stuff here. But this is just math. Not a language... A language and Math are two different things. They have quite nothing in common.

    One thing that makes them very different is: Math is exact, Languages are per se vague.

  • User profile image
    Sven Groot

    littleguru wrote:
    
    Pop Catalin Sever wrote: QED


    The question is: what makes a language a language? That is what makes me wonder... I mean I had a lot about calculus and logic and this stuff here. But this is just math. Not a language... A language and Math are two different things. They have quite nothing in common.

    One thing that makes them very different is: Math is exact, Languages are per se vague.

    From Wikipedia: "In mathematics, logic, and computer science, a formal language is a set of finite-length words (i.e. character strings) drawn from some finite alphabet"

    EDIT: That is to say, a programming language is a formal language, it is not a natural language. The two are very different. Formal languages are exact, natural languages are not.

  • User profile image
    littleguru

    Sven Groot wrote:
    
    littleguru wrote: 
    Pop Catalin Sever wrote: QED


    The question is: what makes a language a language? That is what makes me wonder... I mean I had a lot about calculus and logic and this stuff here. But this is just math. Not a language... A language and Math are two different things. They have quite nothing in common.

    One thing that makes them very different is: Math is exact, Languages are per se vague.

    From Wikipedia: "In mathematics, logic, and computer science, a formal language is a set of finite-length words (i.e. character strings) drawn from some finite alphabet"

    EDIT: That is to say, a programming language is a formal language, it is not a natural language. The two are very different. Formal languages are exact, natural languages are not.


    OK. That sounds better. I forgot the definition of a formal language. I'm getting old. A formal language, well, we are then working with programming formal languages Smiley

    That sounds better.

  • User profile image
    figuerres

    littleguru wrote:
    
    Pop Catalin Sever wrote: QED


    The question is: what makes a language a language? That is what makes me wonder... I mean I had a lot about calculus and logic and this stuff here. But this is just math. Not a language... A language and Math are two different things. They have quite nothing in common.

    One thing that makes them very different is: Math is exact, Languages are per se vague.


    Ok it's been a while but perhaps you can find a copy of "the dragon book" called that due to the cover having a picture of a dragon.

    it is (or was) the "standard" text book to teach compiler theory.

    if you read that book you will see that there is a mathimatic basis for parsing and processing languages.

    natural languages are very much harder than c# etc...

  • User profile image
    PeterM

    Language evolved to attempt to transfer ideas from on person's brain into another person's.

    EG: I need you to pass me that rock, so I'll create a sound that hopefully you'll recognise as meaning I want you to pass me the rock.

    Programming languages are the same in the way that they are translating the thought of the computer, ie: the 1's and 0's into functions and commands that we understand, and in turn we can create commands that can be translated in to something the basic parts of a computer can understand.

    Discuss all this and more by doing a philosophy degree!

  • User profile image
    CyberGeek

    A year ago I took a course called Intro to the study of language. I decided to take it simply because I really enjoy studying languages but couldn't decide on a specific language to study that semester. I also have a hobby of designing languages and writing compilers for fun. As the course went on I became surprised to see how closely the material of the course began to correspond to the phases of a compiler.

    We first studied phonemes and phones, something that bore similarity to the lexer phase of a compiler. Like natural languages, programming languages only permit certain constructs at their most base level (certain pairings of consonants and vowels simply don't happen in English, and in compilers you aren't permitted to have a non-terminated string literal).

    Then we moved on to parsing, a phase which does essentially the same thing in both compilers and natural language. Given information from the lower-level components, you then build a tree representing words, sentences, paragraphs, etc. Or, in a compiler, you build a tree representing expressions, statements, methods, classes, etc. Just as you can't have a noun phrase in english where a noun precedes an article—"Dog the ran" is an illegal sentence—you can't have a binary operator precede its two sub-expressions in C#—so you can't have "+ 5 3"—even though such a construct is perfectly valid in other languages.

    Next, we moved on to semantics, which again is pretty much the same between natural languages and programming languages. English has rules that prohibit saying things like, "He was happy" unless at some point I said who 'he' was. Likewise, in C# you can't use a variable unless you declare it first.

    It's interesting that the later two segments of the course proved to be very difficult for much of the class, but I had a very easy time thanks to my prior experience with compiler-writing.

    To the question of whether or not programming languages are real languages, I would respond with an enthusiastic, "Hell yes!" Are they natural languages? Obviously not. They are artificial languages, created and optimized for a specific purpose.

    To the idea that 'real languages' allow you to express everything, that seems to me to be a rather fuzzy definition. I'm not actually aware of any sort of 'turing test' to determine whether or not a language can be considered 'complete'. Anyone know of any?

    As a footnote, I've long thought about trying to do something like translate the Bible into Java for the fun of it.
    if(abel.offeredBetterSacrificeThan(cain))
        cain.slay(abel);

  • User profile image
    littleguru

    OK. You can design a language that allows you to specify everything that you can express with a natural language.

    The problem you get is that no computer can execute that thing anymore. Where I see a big problem are quantities. If you get from the classic logic to the predicate logic, we have already problems. We have problems with the all and exists quantifier.. and it is getting better, if you extend that thing even more...

    It is that we could express everything, but it's not executable or interpretable for a computer anymore.

    I find programming languages, just to simple to have them classified with the same name as spoken languages. The idea to talk of programming formal languages, sound just better to me.

  • User profile image
    Maurits

    I find Perl to be a reasonably "natural" programming language.  It helps that Larry Wall has a strong linguistics background.

  • User profile image
    Ang3lFir3

    strainge thought just occured to me....

    What if Tolkein had written a programming language?

  • User profile image
    figuerres

    Ang3lFir3 wrote:
    strainge thought just occured to me....

    What if Tolkein had written a programming language?


    from what I know of him it would not happen; or it would be the language of mordor.

    he saw the factory and most of "modern science" as basicly Evil.

    "He who breaks a thing to try and understand it has left the path of wisdom"

    or words to that effect.

    on the other hand if he did decide that creative use of computers was a "white art" then I guess it would be a very elegant language Smiley

  • User profile image
    spoofnozzle

    All languages have limits and boundaries... and, so called, human languages are no different.

    e.g. English has trouble describing values such as colour... you can say something is BLUE but you could not describe blue to a blind person.

  • User profile image
    DoomBringer

    figuerres wrote:
    
    Ang3lFir3 wrote: strainge thought just occured to me....

    What if Tolkein had written a programming language?


    from what I know of him it would not happen; or it would be the language of mordor.

    he saw the factory and most of "modern science" as basicly Evil.

    "He who breaks a thing to try and understand it has left the path of wisdom"

    or words to that effect.

    on the other hand if he did decide that creative use of computers was a "white art" then I guess it would be a very elegant language

    Bull.  He stated several times that his works were not allegorical in any way.  They were just stories.  Everyone has applied his stories as allegories for WWI or whatever.

  • User profile image
    Sven Groot

    It's well known that Tolkien didn't like many of the things of the modern world and preferred nature, a theme that can be clearly seen in LotR.

    This partially had to with the state of some of the technology at that time. Tolkien hated airplanes for instance, since up till then they had been used primarily for war, and were incredibly unsafe. Little did he know that a few decades later we'd have a booming passenger airline industry, and most importantly that planes could be used for things such as providing aid to disaster zones etc.

    Tolkien was also very practical about these things. He didn't mind technology if it was useful. He did use a typewriter, not a pen, to write LotR, and many Tolkien experts I've heard say that had computers existed back then, he would've use them. Smiley

  • User profile image
    Manip

    The word "language" is "Programming Language" is a reference to the Mathematical term Language, in which everything (L*) can be defined... A programming language is a subset of the total language (E L)... In mathematics literally the entire human language can be defined, alphabet, grammar, words, sentences etc...

    PS - "Real" languages don't allow you to express "everything"... That is why some words are literally untranslatable into some other languages. I could tell you what our language won't convey but I am unable to convey that using this language so I can't ... Moving on...

    I stole this wrote:
    Arabic

    taarradhin [tah-rah-deen] (noun)

    Arabic has no word for "compromise" in the sense of reaching an arrangement via struggle and disagreement. But a much happier concept, taarradhin, exists in Arabic. It implies a happy solution for everyone, an "I win, you win." It's a way of resolving a problem without anyone losing face.


Conversation locked

This conversation has been locked by the site admins. No new comments can be made.