Hacker News new | ask | show | jobs
by Dutchie 3601 days ago
Computer languages are only very superficially similar to English. Like a whale is superficially similar to a fish. The syntax of ALL computer languages is completely unlike English. Computer languages don't have the phonology or morphology of English either (they don't have any phonology or morphology).
1 comments

morphology I'm not so sure. looking at the evolution of keywords seems to suggest that the morphology is there. phonology, I'd have agreed with you a few years ago after I finished a minor in slavic linquistics, but now after seeing how people verbally communicate programming concepts over the last decade and how that communication has impacted language design itself...I'm not so sure. In either event, the structure of the english language has heavily impacted the design of languages used to program computers. Not so drastic a difference as whale to fish, more whale to dolphin.
As an aside, I wonder if anyone has studied how learning an English-based (at least wrt keywords and such) programming language before learning English affects the latter.

From personal experience (I am a native Russian speaker), I have a feeling that it does, to some extent. To this day, for me, the primary meaning words like "loop" and "string" is that of programming - the first mental association with "string" is text, not an actual string, for example. Surely this has got to change perspective somewhat.

This also has an interesting side effect, in that code doesn't look like mutilated English - it just naturally reads and feels like, well, code. This is not the case when I'm reading a program that uses keywords in my native language (e.g. the 1C language - http://www.asd-dnepr.com/images/v8/two_variants_of_embedded_...) - those just look weird as hell, and very awkward/funny. I have often asked myself if that's what C and Python look like to native English speakers; and if so, then what difference does it make in how we code.

> To this day, for me, the primary meaning words like "loop" and "string" is that of programming

In my case (another non-native English speaker), I had come across 'a piece of string' and such before encountering programming, and so that's the immediate association string brings to mind. 'Loop', however, I hadn't come across before I learnt programming, so it's very strongly associated with that sense in my mind, even though now I know the "other" meaning.

> This is not the case when I'm reading a program that uses keywords in my native language [...] - those just look weird as hell, and very awkward/funny. I have often asked myself if that's what C and Python look like to native English speakers; and if so, then what difference does it make in how we code.

Yep, I too wondered the same thing after finding a programming language in my native language (https://github.com/Ezhil-Language-Foundation/Ezhil-Lang), and seeing how even keywords that are meant to sound natural for their usage get bent awkwardly out of shape by the thousand different contexts we use them in.

>> now after seeing how people verbally communicate programming concepts over the last decade and how that communication has impacted language design itself...I'm not so sure.

This sounds interesting - can you elaborate?