编程语言:什么语言同时具有Python和Python?红宝石的特点?
我发现了这个很棒的 Python 和 Python 之间的比较图表。红宝石。
我正在寻找一种真正混合了 Python 和 Ruby(稍微倾向于 Python)的编程语言。
我真的很喜欢 Ruby,因为一切都是对象(与 Python 不同)。然而,我真的很喜欢 Python 中的事物是不可变的,因此代码维护更加容易,并且内置 Unicode 支持(与 Ruby 不同)。
有谁知道一种兼具 Python 和 Ruby 优点的优秀编程语言吗?
我试图在下面列出一个功能列表。
Language Features
Everything's an Object YES***
Namespaces yes
Constants YES***
Generators yes
Iterators yes
Coroutines yes
Continuations no
Classes
Multiple Inheritance NO***
Interfaces no
Class Includes* no
Nested Classes yes
Properties yes
Operator Overloading yes
Functions
First-Class Functions yes
Anonymous Functions yes
Keyword Arguments yes
Closures yes
Decorators yes
Collection Objects
Tuples NO***
Lists yes
Hashes yes
Strings
String Type yes
Char Type no
Symbol Type no
Immutable yes
Interned yes
Heredocs no
Multiline Strings yes
Unicode Support yes
Regular Expressions
Regex Literal no
Named Groups yes
Lookaheads yes
Lookbehinds yes
Yes/No Pattern yes
Unicode Support yes
Lua 看起来很有趣,尽管我很难找到足够的信息来确定它是否是 Python 和 Ruby 之间的良好中间语言。
I came across this great comparison chart between Python & Ruby.
I'm looking for a programming language that is truly a blend between Python and Ruby (with a slight lean towards Python).
I really like in Ruby that everything is an object (unlike Python). However, I really like in Python that things are immutable, so that code maintenance is much easier as well as built-in Unicode support (unlike Ruby).
Does anyone know of a good programming languages that has the best of both Python and Ruby.
I've attempted to make a feature listing below.
Language Features
Everything's an Object YES***
Namespaces yes
Constants YES***
Generators yes
Iterators yes
Coroutines yes
Continuations no
Classes
Multiple Inheritance NO***
Interfaces no
Class Includes* no
Nested Classes yes
Properties yes
Operator Overloading yes
Functions
First-Class Functions yes
Anonymous Functions yes
Keyword Arguments yes
Closures yes
Decorators yes
Collection Objects
Tuples NO***
Lists yes
Hashes yes
Strings
String Type yes
Char Type no
Symbol Type no
Immutable yes
Interned yes
Heredocs no
Multiline Strings yes
Unicode Support yes
Regular Expressions
Regex Literal no
Named Groups yes
Lookaheads yes
Lookbehinds yes
Yes/No Pattern yes
Unicode Support yes
Lua looks interesting, though I'm having a difficult time finding enough information on it to determine if it's a good middle language between Python and Ruby.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不明白你所说的“一切都是对象”是什么意思,据我所知Python也没有基元(例如,你可以从Python 3中的基本整数类型派生。)
我已经使用了两者,虽然我更喜欢Python,Ruby无疑是一种非常强大的语言,所以与其看图表,不如安装两者,看看你更喜欢用哪一个编程。如果你仍然无法决定,看看周围的环境(标准有多好)库、工具、文档等)
Ruby 和 Python 有不同的“惯用语”和潜在的哲学,这些哲学很可能在某些方面有所不同,这可能值得研究。
I don't understand what you mean by "everything is an object", as far as I know Python has no primitives either (you can derive from the basic integer type in Python 3 for example.)
I've used both, and although I prefer Python, Ruby is no doubt a very potent language, so instead of going by a chart, install both and see which you prefer programming in. If you still can't decide, look at the surrounding environment (how good is the standard library, tools, docs etc.)
Ruby and Python has different "idioms", and underlying philosophies which most probably differs on some points, which might be worth investigating.
查看 groovy。它还具有 Python 和 Ruby 以及其他一些流行语言的强大功能,但大多数动态语言缺乏 IDE 支持(由 NetBeans、Eclipse 和 IDEA 提供)。
与 python 的区别 和 与 ruby 的差异
Check out groovy. Also it has great feature that have Python and Ruby and some other popular langages, but most of dynamic languages lacks - IDE support ( by NetBeans, Eclipse and IDEA ).
Differences from python and differences from ruby