3 ms·
> why, after so many years, are programmers still programming by the mere editing of dumb text files? Well, there's nothing wrong with text per se. Text is eas
by krapp 12y ago
> why, after so many years, are programmers still programming by the mere editing of dumb text files?
Well, there's nothing wrong with text per se. Text is easy, it's simple, it's persistent and platform-agnostic. Text based source code is portable, because it's human readable. You could print it on paper or write it on a napkin if you wanted. Alternatives have the potential of locking programming, and programming knowledge, into some company's particular black box.
- wtallis 12y agoThe 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]
- pjmlp 12y ago> Text is easy, it's simple, it's persistent and platform-agnostic. You never moved away from cozy 7 bit ASCII in one single human language, I imagine.
- commentzorro 12y ago"The United States of America is awesome. We are awesome, but we've had this discussion. The reason you want to have this discussion is not to show how awesome we are; rather, you want to have this discussion to show us how we're not awesome." --TantarosZorro
- krapp 12y agoYou would be correct, in that I have never seen source code written in Unicode in multiple languages. However, i'm trying to make an argument that text is fundamentally more free than the alternatives. When I say "simple, persistent, and platform-agnostic" I mean, literally, you don't even need a computer to deal with it, much less an IDE. Source code is a means of communication between people, as well as between people and a machine. Imagine how restricted the development of the early web would have been if you couldn't just bang together some html and javascript and put it on a server?
- pjmlp 12y agoI don't need to imagine it. Just went through the wonderful world of codepages, codemaps, ASCII 7 and 8 bit, EBCDIC and many other formats. Text formats on mainframes, mini-computers, home micros and many other hardware and OSes. Text, easy?!? No it ain't.