Hacker News new | ask | show | jobs
by akashakya 3269 days ago
But this will solve the problem only for the languages which are similar to English, because they share the same grammatical structure differing mainly only in the keywords. This is trivial to fix with approach you mentioned, But for the rest of the family of languages this require more change, (Sometimes change in the whole programming model)

For example in Kannada language (or any other Dravidian language) sentence formation itself is different. In English you can read 'if' statement as a proper sentence ("If a equals to Zero") but in Kannada conjunction appear at the end, 'if' sentence is more like "a equals to zero 'then'", so these kind of changes requires non-trivial changes to programming languages. As an example I was trying to 'alias' basic functions (if, for, define... etc) to Kannada languages in Lisp (because its easy in lisp!), but these kind changes breaks "S-Expression" format due to change of the position of the function in the list.

And typing in these languages in typical US-en keyboard is whole new problem in itself!

But I believe that some problems can be expressed better in languages with different structure or at least better to its native speaker.

2 comments

Regarding Lisp's ordering, this has come up in the article "What if Lisp was invented by the Japanese?"[1]. Note also that in the comments to that article[2], I mentioned that "Japanese Lisp" is something I find easier to read and would prefer to write, even as a native English speaker.

1. http://lispnyc.org/blog/euske/what-if-lisp-was-invented-by-t...

2. https://news.ycombinator.com/item?id=2213012

If Lisp had been invented in Japan, maybe the main connective of an expression would have ended up as the last item visually: (1 1 +). Maybe.

However, it would still be the first element of the list in the abstract data structure: i.e. the equivalent of (car '(1 1 +)) -> +. (Or, rather, of course, ((1 1 +)' car) -> +. Let's use the fantasy read syntax.)

The main point is not that + is leftmost or rightmost, but that it's at a fixed position in the data structure, and that it is the first/most accessible position.

Well, grammar doesn't have to map strictly one to one.

Microsofts LINQ is a good example of this. Instead of using SQLs natural language "select foo from bar", they reversed it into "from bar select foo". Just for autocompletion to work better (you don't know which columns are available until you've selected table). This doesn't make it any harder to understand than SQL, except maybe the very first time you read a query but you'll get over it in 5 minutes.

Most programming languages also require you to write seconds(10) instead of "10 seconds". It's no major problem.