3 ms·
An ambition of mine is a programming language where the program structure is decoupled from its visual/textual appearance (model-view separation). One nice resu
by pshc 13y ago
An ambition of mine is a programming language where the program structure is decoupled from its visual/textual appearance (model-view separation). One nice result of this scheme is, for example, you could work on a program in English and another person could collaborate on the exact same source in French.
Although I suspect that if this did get written and translated around a lot, many non-English speakers would still pick the English surface syntax due to network effects...
(Edited for clarity)
- dragandj 13y agoI believe that you described lisp :)
- pshc 13y agoI get the joke :) Although, taken literally, this is not the case. The existence of a variable in Lisp is not decoupled from its human-string-name, as Lisp source is textual. If you were to rename a variable, anything that referred to it (binding sites) would be broken. The human names in Lisp source code are crucial to program execution, unlike, for example, compiled native binaries without dynamic linking.
- ruricolist 13y agoSymbol macros.
- kalleboo 13y agoAppleScript works like this. When you save a script it's compiled down to a system representation, and when you reopen it it's transformed back into the english script language. This means: * Formatting isn't preserved and the file is retabbed each time you save it. * Earlier versions had French and Japanese compilers/decompilers * Each application can add AppleScript syntax (like VBA/OLE or whatever). If a script uses commands for an application you don't have installed, you see the raw FourCC codes in the code instead. It's actually a quite interesting language. http://en.wikipedia.org/wiki/AppleScript http://en.wikipedia.org/wiki/AppleScript
- Zarel 13y agoTI-Basic 68k (the one used on the TI-89, TI-92, and Voyage 200 series calculators) also does this, except formatting is preserved. It also uses the same file type for tokenized and untokenized programs: untokenized programs are tokenized when run, and tokenized programs are untokenized when opened with the built-in text editor. Short of opening the file with some external program like a hex editor, there's no way to tell whether the program is tokenized or not. Which, of course, can cause problems if you send an untokenized program to a calculator set to a different language.
- icebraining 13y agoHow would that work for human-defined names? The second programmer would see a jumble of words in different languages (e.g., keywords in native language, variables and function names in the original). Even if they could be translated, that would still require the programmer to perfectly understand them in the first place, and then, why bother wasting the time to translate? Frankly, as a non-native speaker, I absolutely dread localized source.