Wandering Thoughts archives

2016-12-12

Some of my views on Naftali Harris's 'Python 2.8'

Naftali Harris recently wrote Why I'm Making Python 2.8, which served to also announce his 'Python 2.8' project (which has subsequently been renamed until the dust settles). His goals are straightforward:

[...] because I want to give all the people who use Python 2 access to the Python 3 language features, which I think are actually pretty cool. [...]

His opinions on the whole situation and evolutionary process of Python 3 are a fairly good match with mine, including on the relative (non-)gains to be had from porting perfectly good working code to Python 3. And many of the Python 3 features that his Python 2.8 adopts are quite nice in quiet ways (no-argument super(), for example).

So I ought to really like the idea of this sort of Python 2.8, and to a certain degree I do. But at the same time I don't feel all that interested in it or compelled by it, which has surprised me. After thinking about it for a while I think I understand why I feel this way and thus I have some views.

If you have a Python 2 code base that you're actively developing, changing, and evolving, then the new features are attractive. As you work on the code you'll get a chance to start using them and they'll make your life better, and it might even make sense to do a global refactoring to switch to nicer versions of things across your entire code base. Some of the new features will enable you to do more in your Python 2 code than you could before.

(I'm magically assuming that there are no support or other issues with Harris's version, that everyone loves it and adopts it in place of Python 2.7 and it gets solid support.)

But not all Python 2 code bases are like that. Some are basically static now; they just work and no one is touching them apart from bug fixes (hopefully minor) and other necessary but minimal updates. For these code bases, the big concern with Python 2 is simply whether it will continue to work and work well. You're very unlikely to go through such static code to rewrite bits of it to use new features adopted from Python 3, even if that would make the code clearer, because the current code works even if it's not as great as it could be.

If you're writing new greenfield code from scratch, even Harris concedes that Python 3 is a better language than Python 2 (and I'd maintain better than even his 'Python 2.8'). So you should really use Python 3 for that; it's even better than Harris's work even in the best case for the latter and there is no downside of existing code. I'm reasonably positive about Python 3 for new things after recent experiences.

The reason why I feel only lukewarm about Harris's work is simply that I don't really have any Python 2 code bases that I'm still actively developing. The closest that I come to one is DWiki, and that has only one real feature I expect to ever add to the current code (some form of good tag support, which I haven't done anything on for years). Everything else is essentially frozen, including my other substantial Python program.

(Oh, we have one Django application, but the Python 2 versus 3 fate of that is tied very closely to Django's support or lack thereof for Python 2.)

PS: Regardless of what the official schedule is, I believe that Python 2.7 will stick around well after 2020 and is unlikely to have problems. But if 'Python 2.8' extends that lifetime, it'll save me some amount of hassle and so I'm all for it. And if it wants to improve Python 2.7's performance too, sure, I'll take that as well.

python/Python28Feelings written at 23:20:10; Add Comment

Realizing that I'm not actively attracted to FreeBSD for my desktop

Right now, I'm in a mood where I'm disgruntled with Fedora on my desktop and more broadly with systemd's recent evolution. When I'm in these sorts of moods, my mind turns towards making real changes in what my personal machines run, and if I'm going to do that, why, maybe I should not just change Linux distributions but go all of the way to FreeBSD. After all I run a completely custom window manager environment using programs I build myself, and things like fvwm and so on are not Linux specific. At least in theory it shouldn't be difficult to get a version of my desktop up on FreeBSD.

So I thought about it for a bit and came to a realization. While I could run my desktop on FreeBSD and everything would probably work out, there's almost nothing that actively makes me want to run FreeBSD for my desktop instead of Linux. Perhaps this is a testament to the interchangeability of Unixes in the modern era, or perhaps this says more about how little I use the system's tools and so on. Or perhaps I'm just living in ignorance of some really cool FreeBSD features that I'd really love.

(I doubt it, though. I can't really think of anything that would change my life, partly because I do so relatively little on my desktops. I'm not developing software or running daemons that need deep inspection with DTrace or anything like that; if I'm honest, at least 80% of my usage is xterm, ssh and Firefox. With that said, yes, FreeBSD would give me ZFS for everything. I like ZFS, but I can mostly get it on Linux and I'm not quite 100% sure I trust ZFS with my root filesystem on anything except OmniOS.)

There's definitely a part of me that dislikes this realization; despite what I've written before, part of me thinks that it would be neat and cool to use FreeBSD instead of Linux, and it sure would prove that I'm not a Linux-only person. Using FreeBSD often feels like what a long-term Unix person should be doing, and I'm definitely a long-term Unix person. To put it one way, FreeBSD is the romantic choice.

But that's all it would be for me, and I know that there would be various practical disadvantages to taking the road less traveled (sorry, FreeBSD people, but it's unfortunately true). So I guess I'll be staying with some form of Linux on my desktop, although I have no idea what exactly that will be in the long term.

(FreeBSD is not the first Unix and Unix-like thing that I have had a romantic attraction to that was eventually smothered by practical considerations. Back in the days, I really kind of wanted to run Plan 9 because it seemed so cool (cf).)

(This elaborates on a tweet or two of mine.)

PS: Servers are another matter entirely, especially for ZFS fileservers. FreeBSD is very much in the running for the next generation of those, although probably not for servers in general.

PPS: I do sort of admire people who run FreeBSD on their desktops for hand-waving reasons beyond the scope of this entry but that partly get mentioned here. You're taking the road less traveled and I salute you for it; Unix needs people like that to keep us all honest and to keep Linux on its toes.

unix/FreeBSDNotActivelyAttracted written at 00:48:47; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.