PS:
1
akaHenry OP |
2
iluolSNS 232 天前
很棒 如果能打开就更好了
|
4
ZX576 224 天前
昨天仔细看了 mojo 的介绍,看楼主在布道,有几个疑问能帮忙解答一下么?
> It should not be limited in its ability to introduce new keywords or grammar productions merely to maintain compatibility 我的理解是其实算是一门新的语言,python 程序员迁移仍然需要学习成本,考虑到很多地方借鉴了 rust 设计,所以推测学习成本还不低? > We utilize CPython to run all existing Python 3 code without modification and use its runtime, unmodified, for full compatibility with the entire ecosystem mojo 内置 Cpython 去支持 python 代码,可以理解为 mojo 并没有解决 python 的性能问题对吧?如果需要性能的领域,需要使用 mojo 语法进行实现 >We will provide a mechanical migration tool that provides very good compatibility for people who want to migrate code from Python to Mojo. 为 python 提速就是把 python 代码转为 mojo 代码? |
5
akaHenry OP @ZX576
1. 学习成本不高, chris 并不会增加太多新语法. 语法复杂度远小于 rust. 100% 兼容 python, 目前比 python 扩充的特性, 都比较符合直觉. 并不难理解. 2. 当前 mojo 执行 纯 python 代码 or import python lib 时, 会调用 cpython. (当前依赖 cpython, 未来会去掉依赖, 纯 mojo) 目前对 python codes or libs, 性能上, 应该没啥提升.(只是对齐 python 阶段, 未来 去除 cpython 依赖时, 会有提升. 画饼, 是个长期目标) 当前如果想提升性能, 是需要手动改写 python 代码到 mojo 来优化. 不过官方正在实现 python2mojo 工具(自动翻译), 估计很快就会发布. 到这个阶段, 即使不学 mojo, 只会 python 也能利用 mojo 来提升性能.(当成一个外挂) 3. 是的. 提升 python 性能, 需要转换为 mojo. 当前是手转, 可能比较快就会有工具自动转了. |