calibre(电子书管理工具)作者说:老子自己维护 Python 2 :doge:

2018-04-16 11:55:49 +08:00
 est
https://bugs.launchpad.net/calibre/+bug/1714107


牛逼了。。
14473 次点击
所在节点    Python
68 条回复
dorentus
2018-04-16 14:12:25 +08:00
@xuboying 我觉得还是 2-3 过渡得不好


@kmahyyg 库和完整的程序还是不一样的。

作者在上面给出链接里面也说了,代码量太大,而且他觉得 python3 也没有提供切实的好处,反而会有性能损耗,于是不愿意改。

作为最终用户,为什么要**那么**关心别人的程序是用什么语言写的呢?
msg7086
2018-04-16 14:13:09 +08:00
@noNOno 此处应有 gif。
holmesabc
2018-04-16 14:15:56 +08:00
歪个楼:Kovid 也是个三哥?
bojackhorseman
2018-04-16 14:19:45 +08:00
突然发现作者给的介绍视频里有一本奇怪的书![图片]( )
x7395759
2018-04-16 14:22:42 +08:00
@locktionc
@xuboying
@kmahyyg
@noNOno

1) Waaaaay too much work -- calibre has half a MILLION lines of python and python extension code

2) calibre has lots and lots of code that deals with bytes -- network protocols, binary file formats, etc. Python 3 is simply worse than python 2 for this use case. It has a crippled bytes type among other unfelicities.

3) calibre has lots and lots of native code that interfaces with external native code. On windows, all this code uses UTF-16 encoded strings. All that interface code would need to be re-written and would also become less efficient since in python 2 string are stored internall in UTF-16 whereas in python 3 they would need to be cross-converted.

4) There is absolutely nothing in python 3 that makes it worth the effort. If python 3 ever grows something that makes it worth the effort, I will simply backport it to python 2. I already maintain my own python 2 fork for windows (see my github repos).

The only case in which I will accept patches for python 3 is if they have:

a) negligible runtime cost
b) minimal code complexity/maintainability cost
c) Low probability of breakage -- either the patches are dead simply or they come with lots of tests
x7395759
2018-04-16 14:23:10 +08:00
有理有据,你们看过?
blaxmirror
2018-04-16 14:23:41 +08:00
@bojackhorseman 哈哈哈哈,没毛病
youxiachai
2018-04-16 14:24:33 +08:00
说那么多干嘛...
看不惯作者的..

打钱..或者帮忙移植啊...
wizardforcel
2018-04-16 14:30:18 +08:00
@hxndg 运筹学是理论数学???

让我再笑一会儿。
est
2018-04-16 14:32:21 +08:00
@bojackhorseman 亮了。。。
xuboying
2018-04-16 14:39:47 +08:00
@x7395759 #25 打嘴跑没意义,谁让作者用 utf16 的,留下了如此麻烦的后遗症。py 党自己去争吧。看不惯的大牛自己用 py3 写一个好了。编码问题肯定是没了。
其实最终用户也不关心是什么版本,或者是不是 python
YvesX
2018-04-16 14:39:57 +08:00
我的想法就是别人作者爱用啥用啥,能维护好就 WOW 一下,不是很懂有啥“抵制时代”和“耻辱”的。且不说 Python2 顶多是不值得再去新学,没有什么特别古旧的缺点,就算是上古代码,别人能维护得 works well 不比拿新技术对着文档写 hello world 厉害多了?
zhicheng
2018-04-16 15:45:11 +08:00
Python 官方实现太守旧了,用的竟然是 C,而且还是 C99 不是 C11,天呐这个标准都快 20 年了,一群守旧的老顽固。他们应该用 Go 或者 Rust 重写一遍 Python 官方实现,哪怕不用 Go/Rust 也应该用 C++/Java 重写。

而 Linus 应该被烧死,因为 Linux 还在用 C89。
est
2018-04-16 15:50:26 +08:00
@xuboying JVM 现在也是 ucs2。。。。
goodryb
2018-04-16 15:59:29 +08:00
calibre 收费吗,如果不收费,凭什么 BB
cnbobolee
2018-04-16 17:20:11 +08:00
2 到 3 迁移成本太大,况且代码那么多,而且 2->3 过渡本来就做的不好,3 几乎不兼容 2。
zyqf
2018-04-16 17:26:45 +08:00
🐶🐷🐮🐟🐻👻🐱🐯📖🌳🐀🐔🐍
Antidictator
2018-04-16 17:29:17 +08:00
@shansing #3 V2EX plus 插件
noNOno
2018-04-16 17:56:28 +08:00
@x7395759 哈哈,看是看了,不过要放松点嘛,反正我们帮不上忙
sunzhenyucn
2018-04-16 18:41:04 +08:00
@zhicheng 高级黑 23333

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/447147

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX