22 messages over 3 pages: 1 2 3 Next >>
DaraghM Diglot Senior Member Ireland Joined 6151 days ago 1947 posts - 2923 votes Speaks: English*, Spanish Studies: French, Russian, Hungarian
| Message 1 of 22 15 May 2008 at 6:10am | IP Logged |
Computer languages and spoken languages share a number of common features,
1. Grammar\Syntax.
2. Lexical Tokens\Words.
3. Complexity.
Should computer languages be considered languages in the traditional sense ? Does your spoken language affect your ability in a particular computer language ? Does this give some countries an advantage in information technology ?
As an esoteric example, "John runs to the house", could be translated as,
Run(John,To,House) - Function Run (Subject, in what direction, Object)
- This would be an English style approach
John.Runs(House.To) - John contains a function run, where house has members that cover the various cases that house can possess.
- Closer to Hungarian and Russian.
1 person has voted this message useful
| Volte Tetraglot Senior Member Switzerland Joined 6439 days ago 4474 posts - 6726 votes Speaks: English*, Esperanto, German, Italian Studies: French, Finnish, Mandarin, Japanese
| Message 2 of 22 15 May 2008 at 6:48am | IP Logged |
This post is probably gibberish to non-programmers. I apologize.
DaraghM wrote:
Computer languages and spoken languages share a number of common features,
1. Grammar\Syntax.
2. Lexical Tokens\Words.
3. Complexity.
|
|
|
Lisp is not a computer language now? It has essentially no grammar/syntax (and most of what there is is user-defined via the macro system), almost no lexical tokens/words, and can be quite simple (although the variants actually used aren't).
Several other computer languages have minimal or basically no syntax; forth comes to mind.
DaraghM wrote:
Should computer languages be considered languages in the traditional sense ?
|
|
|
No. Why would they be?
They 'feel' nothing like human languages. The tiniest errors (a character, or even a bit) can make a whole program fail to compile/run, or a space shuttle blow up. They're fragile and inflexible. Unlike human languages, converting from one 'version' to the next is a much more delicate and error-prone process.
(Good) programming has an emphasis on abstraction that is entirely foreign to most people, regardless of what language they speak. To have a good idea of what one is doing, one needs to know at least a little about computers from the silicon level to some pure math for algorithms - and this is even before the several layers of abstraction even a moderately sized program is likely to contain. Pure mathematicians have a similar style, although I'm not sure how the numbers of levels of abstractions actively worked with compare - I think programmers usually deal with more, though.
Definitions are much more pervasive. There are very few, if any, explicit definitions in everyday human conversations; most programs have quite a lot, and not just of words, but also of structures and how structures interact behaviorally. Trying to do this on the fly in a human language in conversation is an utterly strange concept to me; the closest I can think of is when people are discussing something technical, especially code, but even then they don't vastly alter the syntax of the natural language being spoken.
They have a variety far beyond that found in natural languages as well. I haven't found a decent way to explain how different the same program in idiomatic Smalltalk-flavored OO, K&R C, and Haskell are.
Natural languages don't vary by a factor of 10:1 in how long they take to convey non-trivial information, such as a conversation or program. Programming languages, due to the freeness or strictness of their design, and the aforementioned definitions and abstractions, often do. I can't think of how to explain to a non-programmer how grating the repetition required in a language like Java is (or Fortran/Cobol/Ada, though I am less familiar with those), when one knows an alternative that works much better for what one wants to do. The closest I can think of is when there's a really nice idiom that just doesn't translate - now, consider half the utterances in a language being like that, and the idea of the joy or frustration may come across somewhat.
And, finally, natural languages are extremely poorly represented by context free grammars - this is a fairly big problem for everyone doing NLP, I believe, and one of the major reasons why statistical approaches currently prevail. Most programming languages are designed to be parseable using a CFG, and often one in particular subsets of CFGs (LL(1), LALR, etc). I don't think anyone would seriously want to use a statistical approach to parsing code for compilation/interpretation; the bugs would be horrendous.
Basically: human language is fundamentally fuzzy (as one would expect from something arising out of communication between people, where shortcuts that lose information, inquiring about what is unclear, etc, are common), while computer languages fundamentally aren't (as one would expect from something which originated as a way to avoid drudge work in translating conceptual models to what underlying hardware, which is very unforgiving and 'dumb', actually can use, and where precision is vital).
DaraghM wrote:
Does your spoken language affect your ability in a particular computer language ?
|
|
|
Too trivially to matter, if at all. The differences in human languages pale compared to those in computer languages, and all are rather far apart. The attempts to make natural-language-like computer languages have all been disasters.
My preferred programming languages have syntaxes which are rather far from English, or any other human language I'm aware of.
DaraghM wrote:
Does this give some countries an advantage in information technology ?
|
|
|
Nope.
DaraghM wrote:
As an esoteric example, "John runs to the house", could be translated as,
Run(John,To,House) - Function Run (Subject, in what direction, Object)
- This would be an English style approach
John.Runs(House.To) - John contains a function run, where house has members that cover the various cases that house can possess.
- Closer to Hungarian and Russian.
|
|
|
The idea that English is procedural and Russian/Hungarian are object oriented... ehm... no. Slavic languages (I can't speak for Hungarian) definitely put things together differently from English (though they 'still feel very Indo-European', somehow), but my conceptualization of object orientation and Slavic grammar really have nothing in common. There is no concept of 'everything is an object', words don't request to alter each other's state by message passing, and state and behavior aren't encapsulated together neatly into objects sealed off from the rest of the world.
I honestly don't understand what you're trying to show with that example. It clearly isn't syntax. The semantics also don't work out. What was the point?
1 person has voted this message useful
| natia Newbie GeorgiaRegistered users can see my Skype Name Joined 6052 days ago 9 posts - 9 votes Speaks: Georgian*
| Message 3 of 22 15 May 2008 at 8:14am | IP Logged |
one interesting note:
The terminology of the Georgian internet-conversation is the especial place of the Georgian internet-space. The computer language, in accordance with the general terminology is based on English language, accordingly, the terminology of georgian chat-rooms are congested with English words, with loan-translations of English terms and the occasionalisms , that are formed with the root of English word and the Georgian suffixes . E.g. Hermione - the member of the much favored "Tbilisi Forum" writes: "ერთხელ დავპოსტე ის, რასაც თსუ-ს იურ ფაკზე ვფიქრობდი და ვორნი მივიღე" (http://forum.ge/?f=79&showtopic=33778817); ("Once I posted , what I have thought about TSU Iur Fak and got the warning")
"დავ-პოსტ-ე" [dav-post-e] <<I have posted (to post)
"ვორნ-ი" [vorn-i] - << warning
1 person has voted this message useful
| DaraghM Diglot Senior Member Ireland Joined 6151 days ago 1947 posts - 2923 votes Speaks: English*, Spanish Studies: French, Russian, Hungarian
| Message 4 of 22 15 May 2008 at 8:27am | IP Logged |
Volte wrote:
DaraghM wrote:
Does this give some countries an advantage in information technology ?
|
|
|
Nope.
|
|
|
I actually agree with you. The whole area came up in a discussion here at work, when some people argued that some countries, by there language, could have an advantage. I disagreed, as most computer languages are an abstraction above maths.
I agree that my example was terrible, and very rushed. I didn't mean to imply that Slavic grammar is somehow object orientated compared with English grammar. I was thinking of the Hungarian case endings, -ba/-be, but that still doesn't convey the point.
1 person has voted this message useful
| DaraghM Diglot Senior Member Ireland Joined 6151 days ago 1947 posts - 2923 votes Speaks: English*, Spanish Studies: French, Russian, Hungarian
| Message 5 of 22 15 May 2008 at 9:14am | IP Logged |
Volte wrote:
Several other computer languages have minimal or basically no syntax; forth comes to mind.
|
|
|
Do you not need a syntax in order to parse it ?
Volte wrote:
They 'feel' nothing like human languages. The tiniest errors (a character, or even a bit) can make a whole program fail to compile/run, or a space shuttle blow up. They're fragile and inflexible.
|
|
|
True, but could this not be a degree of tolerance. In spoken languages we can also be misunderstood or not understood.
Volte wrote:
Unlike human languages, converting from one 'version' to the next is a much more delicate and error-prone process.
|
|
|
Hmmm. I wonder if we can consider Spanish as Latin 2.0.
Volte wrote:
Basically: human language is fundamentally fuzzy (as one would expect from something arising out of communication between people, where shortcuts that lose information, inquiring about what is unclear, etc, are common), while computer languages fundamentally aren't (as one would expect from something which originated as a way to avoid drudge work in translating conceptual models to what underlying hardware, which is very unforgiving and 'dumb', actually can use, and where precision is vital).
|
|
|
This fuzziness I believe is related to the nature of the communication, rather than the medium. This can be seen in a business context, when we go from a particular requirement, to a more precise definition, to finally the programming language itself. This fuzziness can cause problems even within a natural spoken language, and thus we have the entire legal profession, as well as business consultants.
Obviously, human communication is a superset of the communication possible via programming languages, as it also includes, humour, prayer, insults, desires among other things. The point being, are computer languages fundamentally different from other artificial languages ?
1 person has voted this message useful
| Volte Tetraglot Senior Member Switzerland Joined 6439 days ago 4474 posts - 6726 votes Speaks: English*, Esperanto, German, Italian Studies: French, Finnish, Mandarin, Japanese
| Message 6 of 22 15 May 2008 at 10:58am | IP Logged |
DaraghM wrote:
Volte wrote:
Several other computer languages have minimal or basically no syntax; forth comes to mind.
|
|
|
Do you not need a syntax in order to parse it ?
|
|
|
Yes, but it can be extremely minimal. In the case of forth: The syntax can be stated as follows, "Forth code is a bunch of words with spaces between them."
Lisp syntax is trivial (by default, in the simplest case), but it allows the definition of custom syntax, as I previously mentioned. Practical Common Lisp explains how it works in Common Lisp, the most baroque Lisp I am aware of. At its simplest, Lisp code is simply one s-expression after another.
I've written parsers, and parsing lisp to lists in-memory is extremely trivial.
DaraghM wrote:
Volte wrote:
They 'feel' nothing like human languages. The tiniest errors (a character, or even a bit) can make a whole program fail to compile/run, or a space shuttle blow up. They're fragile and inflexible.
|
|
|
True, but could this not be a degree of tolerance. In spoken languages we can also be misunderstood or not understood.
|
|
|
My point is that computer languages are uniformly brittle. Human languages are not uniformly brittle, though they can be at times. (The link is to a rather sad story about how missing dots in a Turkish SMS message lead to a murder-suicide).
Errors in human language can simply not be noticed, noticed but ignored, cause laughter, or cause serious damage. However, overall, human languages are more redundant (and in more useful ways) than computer languages, and humans are much better at error-correction.
DaraghM wrote:
Volte wrote:
Unlike human languages, converting from one 'version' to the next is a much more delicate and error-prone process.
|
|
|
Hmmm. I wonder if we can consider Spanish as Latin 2.0.
|
|
|
No, or rather, perhaps, but it's not what I was trying to say, and is misleading in this context. Human languages go through continuous evolution, based on the whims of their users. Very few computer languages do; Lisp does to some extent via macros, but with most languages, you'd have to hack the parser, and be careful not to break other, previously working code. Again, it's an example of the fragility of computer languages: if you add a new slang word into Spanish, you don't risk making other parts of the language not be understood overnight/instantly.
Human languages frequently 'overload' words (and even syntax); computer languages do this in a much more limited fashion, and with more pitfalls.
DaraghM wrote:
Volte wrote:
Basically: human language is fundamentally fuzzy (as one would expect from something arising out of communication between people, where shortcuts that lose information, inquiring about what is unclear, etc, are common), while computer languages fundamentally aren't (as one would expect from something which originated as a way to avoid drudge work in translating conceptual models to what underlying hardware, which is very unforgiving and 'dumb', actually can use, and where precision is vital).
|
|
|
This fuzziness I believe is related to the nature of the communication, rather than the medium. This can be seen in a business context, when we go from a particular requirement, to a more precise definition, to finally the programming language itself. This fuzziness can cause problems even within a natural spoken language, and thus we have the entire legal profession, as well as business consultants.
|
|
|
The size of the legal profession and the amount of money that goes into business consulting amply demonstrate that natural languages Just Plain Don't manage formal rigor well. It's a tangent, but I'll quote Lamport: "Mathematics is nature's way of letting you know how sloppy your writing is, and formal mathematics is nature's way of letting you know how sloppy your mathematics is."
Similarly, math progresses much faster through the use of formalism and notations, rather than writing everything out in natural language. There can be ambiguities in the original definitions (the definition of parallel lines in geometry leads to some fun results), but it eliminates a ton of mistakes and misunderstandings.
The simple fact is that form plays a significant role, whether or not one wants it to.
DaraghM wrote:
Obviously, human communication is a superset of the communication possible via programming languages, as it also includes, humour, prayer, insults, desires among other things.
|
|
|
Computer languages are also used to express these things, albeit to other humans rather than a machine. Black Perl is one of the more infamous examples, but writing poetry in syntactically correct and sometimes usable programs is fairly widespread.
DaraghM wrote:
The point being, are computer languages fundamentally different from other artificial languages ? |
|
|
Define 'fundamentally different'. Without a definition, I'd say "yes"; coding feels nothing like using Esperanto.
1 person has voted this message useful
| DaraghM Diglot Senior Member Ireland Joined 6151 days ago 1947 posts - 2923 votes Speaks: English*, Spanish Studies: French, Russian, Hungarian
| Message 7 of 22 15 May 2008 at 11:16am | IP Logged |
Volte, thanks for the post on Black Perl. I've never come across it before. Very entertaining, and somewhat frightening.
By fundamentally different, I mean, that translation between them is impossible. Or is it possible to define a computer language that is logically precise but has the flexibility and redudancies of spoken languages ? This obviously has huge implications for AI.
[EDIT]
On a slightly different tangent, I wonder if linguistics can tell us how computer languages evolved, why some dominated, and can they be classed into language families ?
E.g. The C family containing C, C++, Java, C#, Javascript, Flash MX, etc.
Obviously, each of these had very different initial histories, but a 'speaker' in the C family can move to other languages in the same family with less effort then would be required otherwise.
[/EDIT]
Edited by DaraghM on 16 May 2008 at 3:39am
1 person has voted this message useful
| Captain Haddock Diglot Senior Member Japan kanjicabinet.tumblr. Joined 6768 days ago 2282 posts - 2814 votes Speaks: English*, Japanese Studies: French, Korean, Ancient Greek
| Message 8 of 22 16 May 2008 at 7:15am | IP Logged |
I think the fundamental difference is that ... they're entirely different things.
Natural language encodes and expresses meaning.
A computer "language" is just a set of rules for running mathematical operations.
The fact that both have syntax, or rules for interpretation, is rather beside the point. Origami has rules, but that doesn't make it a language.
1 person has voted this message useful
|
This discussion contains 22 messages over 3 pages: 1 2 3 Next >>
You cannot post new topics in this forum - You cannot reply to topics in this forum - You cannot delete your posts in this forum You cannot edit your posts in this forum - You cannot create polls in this forum - You cannot vote in polls in this forum
This page was generated in 0.3281 seconds.
DHTML Menu By Milonic JavaScript
|