3 ms·
Never understood how putting up roadblocks for developers trying to copy-paste code was deemed acceptable, or GVR (and others) thought the solution to poorly fo
by bobbylarrybobby 1y ago
Never understood how putting up roadblocks for developers trying to copy-paste code was deemed acceptable, or GVR (and others) thought the solution to poorly formatted code was making formatting carry semantics instead of just writing an auto formatter.
- Night_Thastus 1y agoI agree. Autoformatters are everywhere and easy to use. I'd far rather do that (plus maybe a pre-commit hook) than have to deal with whitespace in the language.
- adiabatty 1y agoTo be fair to GvR, autoformatters weren’t commonplace in the late 80s and early 90s. Were there even any? Ever since Go got big, though, everyone else is discovering how fantastically nice they are, and that’s a good thing.
- mdasen 1y agoYea, in the 90s significant whitespace seemed great because it meant that you got readable code. The amount of code that you might see copy/pasted with terrible formatting/indentation in other languages could make you want to scream. Now, when you paste code and things are wrong, an auto formatter cleans it up for you. Before, you'd just end up with an unreadable codebase. It's definitely an odd choice to make now.
- cb321 1y agoGNU indent was already at version 1.9.1 by 1994: https://ftp.gnu.org/gnu/indent/ https://ftp.gnu.org/gnu/indent/ If you grab that version and unpack it and look at /OChangelog then it seems to date back until at least 1989, same as Python itself. That was for C source, of course. I expect there were pre-GNU indent variants, perhaps posted on comp.sources.unix and maybe some commercial things as part of very expensive compiler packages. I would say that running autoformatters in any kind of routine way was pretty rare. EDIT: but I think ascribing the language design to commonality or not is probably ahistorical. Even today it's a rather passionate debate. And even at the time, Lisp - the poster child of copy-paste friendly PLangs - was routinely autoformatted within Emacs', but that was not enough for people to not find Lisp code "ugly".
- jibal 1y agoWhile formatters for non-C languages may have existed, no auto formatters existed. And yes, this discussion is completely ahistorical.
- jibal 1y agoWell of course that's completely ahistorical. The motivator was eliminating block terminators. Python's predecessor, ABC, was a teaching language; programs were small and refactoring was not a thing. Heck, copy-paste was hardly a thing, and there certainly were no auto formatters. Indented code was a step up from BASIC, the teaching language prevalent at the time.