by spc476 · 9y ago · 0 comments
xn = (A * y) * x * (1 - x)
was actually stored as: id17 = (id1 * id11) * id10 * (1 - id10)
and there was a mapping of internal IDs to visible names: id1 A
id2 B
...
id10 x
id11 y
...
id17 xn
The upshot---you could change the name of a variable anywhere in the editor and the code would still work because the "name" picked by the programmer was not the actual "name" used by the system. I often wonder if that can't even extend to keywords in a language as well, translating this [2]: medan not_done
börja
för x:= 1 till 5 gör
börja
om person^.age = 120 så
too_old(person);
om person^.age > 130 så
gåtill person_should_be_dead;
slut;
slut;
into: while not_done
begin
for x := 1 to 5 do
begin
if person^.age = 120 then
too_old(person);
if person^.age > 130 then
return person_should_be_dead;
end
end
Or heck, while we're at it: while(not_done)
{
for (x = 1 ; x <= 5 ; x++)
{
if (person->age = 120)
too_old(person);
if (person->age > 130)
return person_should_be_dead;
}
}
But I'm not holding my breath on this.[1] Yes, the company that made all the text adventure games.
#! /usr/local/bin/perl -w
use Lingua::Romana::Perligata;
adnota Illud Cribrum Eratothenis
maximum tum val inquementum tum biguttam tum stadium egresso scribe.
vestibulo perlegementum da meo maximo .
maximum tum novumversum egresso scribe.
da II tum maximum conscribementa meis listis.
dum damentum nexto listis decapitamentum fac sic
lista sic hoc tum nextum recidementum cis vannementa da listis.
next tum biguttam tum stadium tum nextum tum novumversum
scribe egresso.
cisFor 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.
1. http://lispnyc.org/blog/euske/what-if-lisp-was-invented-by-t...
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.
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.
I mean, even without the "internal IDs" you're basically talking about creating a Pascal code generator and hooking it up to an early stage in the existing Håstad compiler. A first year CS student could do that as a course project. It's not that complicated.
But there are a few reasons we don't do that.
Like the Sean Conner article argues, the specific keyword symbols we use barely matter. Sure, you can come up with pathological cases with obviously bad choices of keywords, but all reasonable choices can be learned in a matter of minutes and then you're good. As long as a for loop behaves like a for loop it really doesn't matter if we write "for", "för", "meanwhile", or "සදහා". We'll learn to recognise the symbol, whatever its etymology.
Because of the above, when we "transpile" (which is apparently what the kids call compilation these days) we tend to want to do it to a language that is sufficiencly different (i.e.not a language whose only difference is that the keywords are made up of different symbols). And when you do that, you'll get code that uses idioms from one language but syntax from the other. And in your attempt to go from 100 people being able to read your code to 100,000 people, you accidentally went to 0 people.
https://en.wikipedia.org/wiki/Non-English-based_programming_...