3 ms·
The only thing there that actually distinguishes text is the natural canonical printable representation. Text-based source code is not inherently more portable
by wtallis 12y ago
The only thing there that actually distinguishes text is the natural canonical printable representation. Text-based source code is not inherently more portable or resistant to lock-in; binary formats can be standardized or proprietary just as easily as text formats.
- krapp 12y agoTrue, but having that representation available is what makes it portable. In particular, being able to write it in any text editor, as well as read it.
- CookWithMe 12y agohttps://github.com/HPI-SWA-Teaching/SwaLint https://github.com/HPI-SWA-Teaching/SwaLint This is a Smalltalk/Squeak program I worked on in University back in 2008. Apparently, it is still maintained and on GitHub now. As you can see, it's all text files, e.g. here is a simple asString method: https://github.com/HPI-SWA-Teaching/SwaLint/blob/master/packages/SwaLint-Core.package/SLResult.class/instance/asString.st https://github.com/HPI-SWA-Teaching/SwaLint/blob/master/pack... I wouldn't call it exactly portable, as you need a Squeak image to run it. Then again, I wouldn't call a C-program written against the Win32 API portable, just because it is saved in text-files ;-)
- wtallis 12y agoOk, so you're using the loosest and least useful definition of "portable". And ignoring any issues about character encoding. And the advantages you're citing still aren't inherent to textual formats, they're just due to the widespread availability (on Unix systems, at least) of basic tools for manipulating text files.
- adestefan 12y agoWhen people say "text files are universal" what they really mean is 8-bit ascii is all text files should be.
- krapp 12y agoThat's not what i'm saying at all. I'm not saying text files are universal, or that they should only be ASCII, i'm saying text is (practically) universal. No one owns "text" as a format, or a medium of communication. No one has to pay a license fee in order to use "text." There's no "text" working group which makes the one tool that anyone can use to display "text" or pass "text" around. Complain all you want about unicode support, or the lack thereof, there are a million different uses for character sets, which means textual communication is likely to be around in ten or twenty years, which means support for text-based programming is more future-proof. The encoding used is really entirely irrelevant to the point i am (apparently failing) to make. Source code isn't merely a way to pass instructions to a compiler, it's also a way of preserving knowledge, both technical and historical, and I believe that making that accessible to as many people as possible is important. It is a means of communication between humans as well - and I believe making it easy to facilitate this communication is important.
- alayne 12y agoThere are numerous tools that work on text files without knowing a specific structure. Some tools are more sophisticated with their knowledge of formats and can do more with the text files. Binary files don't allow for this extremely useful range of functionality.
- deleted 12y ago[deleted]