4 ms·
I like to imagine a world, a worse one, where programming languages were localised. This might initially have been a versioning nightmare, with different compi
by asgerhb 11mo ago
I like to imagine a world, a worse one, where programming languages were localised.
This might initially have been a versioning nightmare, with different compiler binaries for each localisation.
Later, it could become standard practice to ship a single compiler containing all supported localisations, the correct one being chosen from either system language, a project-wide setting, a preprocessor flag in each file, or some combination of these.
Everyone would have to learn a little Polish, and "Source Code Translator" would be a profession.
- cenamus 11mo agoYou mean excel?
- hiccuphippo 11mo agoHah! Reminds me of the first time I tried Excel in English (might have been Google Spreadsheet) and the searchv function was nowhere to be found, not knowing it was actually called vlookup ("buscarv" in Spanish).
- widdershins 11mo agoI think if this were the case, we would have quickly moved on from storing source code as text, and begun storing it as ASTs which could be 'viewed' in any localised version of the programming language. This may have had wider benefits than just reading source code in your preferred language.
- zozbot234 11mo agoYou can serialize ASTs very easily as S-expressions, or slightly fancier versions thereof. That's still "text" and quite easily readable by humans, but somewhat less oriented to direct editing.
- scotty79 11mo agoI would love for the block delimiters to be also a preference, like the language in that world. I'd edit every language with Python style blocks.