6 ms·
Let's talk about Python 3.0
- tdavis 18y agoAmen. It's going to be a huge pain the ass to convert stuff, but worth it for a much needed language "cleansing."
- tptacek 18y agoBecause as we all know, "clean" code outsells "working" code every time.
- enomar 18y agoClean code is easier to understand, maintain and keep working. Dirty code is harder to change and eventually gets thrown out and rewritten.
- ubernostrum 18y agoWhy not have both?
- tptacek 18y agoBecause you don't have a time machine, and you do have features to build.
- jodrellblank 18y agoBut if nobody ever cleans up, you end up with a horrible place to be.
- gaius 18y agoTechnical debt, this is called.
- tptacek 18y agoThat's a loaded term. Technical debt also describes the design shortcuts that you take to get a product out the door, and those are much scarier than whether "range()" does the right thing or whether "print" is a function.
- ubernostrum 18y agoYes, which is why I always love the fact that people cherry-pick examples like that and ignore things like, oh, unifying the type system, going Unicode-only for strings, adding optional annotations for type analysis... Picking on changes like "print()" all too often betrays either ignorance of what's in Python 3.0, or a desire to misinform others about the same. I hope neither of those is your intention here.
- tptacek 18y agoYeah, I'm secretly a shill for the Tcl cabal, "ubernostrum".
- tptacek 18y agoI don't think this article has aged well: http://www.joelonsoftware.com/articles/fog0000000069.html http://www.joelonsoftware.com/articles/fog0000000069.html because it chose a really bad example. But the points it makes are where I'm coming from too. "Cleanliness" is highly overrated.
- newt0311 18y agoSeems a bit late in the conversation to mention this but there is no need to rewrite code to port from python 2.x to 3.0. Basically, move to python 2.6 -- largely an incremental change. Then use the -3 switch to find all the warnings and then incrementally get rid of them. Then the 2to3 tool should take care of most of the grunt work. Switching will be hard (all switches are) but it will not be as all-encompassing as a complete rewrite.
- mechanical_fish 18y agoFrom the original article: I think Python 3.0 is and will be a good thing even though it’ll create a staggering amount of work for me, my co-workers and my friends and colleagues (since I deal with two large Python 2.x codebases on a daily basis, the migration is not going to be simple or short for me). So. Not a complete rewrite, but merely "a staggering amount of work"?
- ubernostrum 18y agoA number of smallish changes, applied across multiple large codebases? Yeah, that's a lot of work. Our software won't have to be completely scrapped and started over, but we will have to spend quite a lot of time porting. In other words, if you have five hundred instances of `print "foo"` which all need to change to `print("foo")`, it's not that you have to "completely rewrite", but you _do_ have five hundred changes to make. And since applying a change is almost never as simple as a single search/replace/rename, it means work.
- shutter 18y ago
- kaens 18y agoIt does in major versions of programming languages that are largely against having "dirty" code, at least in my book.
- halo 18y agoThe problem is that it's harder to write good working code in an unclean language. Look at the Unicode situation for example.
- deleted 18y ago[deleted]
- shadytrees 18y agoThere's a flaw in the analogy: Very few of the original monkeys have been removed from the Python community. What Python programmers think are annoying has always simultaneously bugged the hell out of the people working on the language.
- nuclear_eclipse 18y agoI think the author was targetting the analogy at the people who are complaining about the changes: they don't want things to break, even if it means a subpar implementation, because that's the way it has always been.
- etal 18y agoThat's probably why the Python community was able to pull this off.
- epall 18y agoI've been meaning to learn Python for a while, and this seems like a good chance to jump in. Are there any books out on Python 3.0 yet?