跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 迁移一个开源 Python Flask 的项目,选 Go 还是 Rust

发表于

我本人写过多年 Go 和 Rust ,自由职业开源从业者 。

之前是想招人用 Go 写,还特地发帖招人,效果不佳,现在决定自己写,反正闲着也是闲着,省下的钱可以改善生活。

我起初的想法是 Go ,但是这个项目有个特殊点在于高度依赖 Pandas 的 DataFrame ,Go 倒是有平替,但是质量不行而且年久失修,相比而言,Rust 的 Polars 就强大很多,而且 Polars 有 Python 版本,更加方便重用原有的插件系统(大量传递 DataFrame )。

其他方面的比较各有优劣,比如 Mixin Go 更好做,而 Rust 要么抛弃 Mixin ,要么就用不大友好的宏来做。同样还有很多 Decorator ,Rust 还是宏, Go 好像只能推倒 Decorator 了。Go 的插件系统好做些,但是考虑到 Polars 和支持 Python 插件,这个优势又不大明显了。

至于 Flask 本身平替这块,Rust 这几年在这方面发展很快,我感觉基本追平 Go ,要啥也都有啥。但是我还是相信这方面 Go 写起来生产效率更高一些,人也更好找。

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.