What are the things you would like improved in the Ruby language?

*爱你&永不变心* 提交于 2019-12-02 20:49:30

I wish people would consider backward compatibility between minor releases as an unbreakable rule when releasing a new language (or library or framework) version.

I wish that some of the lesser used modules of the standard library were documented.

Make require-ing files less painful. Don't ask me how, but maybe have one file dedicated to knowing the paths involved and just get rid of the relative path crud from everything else.

Getting rid of the artificial distinction between Modules and Classes would be nice.

Both Modules and Classes are Namespaces. Modules are also Mixins, while Classes aren't. Classes can also be instantiated while Modules can't. This distinction is unnecessary. Just get rid of Modules and allow Classes to be used as Mixins.

An example of a language where this works is Newspeak.

I'd appreciate being able to install ruby 1.9 as an RPM rather than having to use the source.

Make Ruby completely Message Sending based, get rid of everything that is not a message send: local variables, global variables, instance variables, class hierarchy variables, constants, magic globals, magic constants, builtin operators, builtin keywords, even literals. See Self, Ioke or Newspeak for the incredible power and elegance this gains.

I wish they would get rid of the predefined variables: $!, $&, $+, etc.

I would like to have support for static compile-time metaprogramming. The Converge Programming Language might be a good starting point.

Replace the Mixin system with a Traits system.

Replace Exceptions with a Common Lisp style Conditions system.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!