跳转到内容
彼岸论坛
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[Vim] The ObjectSense Programming Language : An object-oriented reincarnation of VimL


小天管理

已推荐帖子

ObjectSense is a superset of VimL8, and has all the main features of a modern object-oriented language, such as data encapsulation, polymorphism, inheritance, etc. On top of the language implementation, rose - a module manager is provided, which is also built into the language runtime. It's very developer friendly, especially for those who already have a working knowledge of VimL8 can effortlessly expand their skills to code in ObjectSense.

As a bonus feature, polyglot programming is easily doable in ObjectSense. Currently vim8 and vim9 are supported, with minimal work the list can grow longer to include other languages, such as, python, ruby, lua, etc. However, as far as the operating system is concerned, only Linux and MacOS are supported at the moment. There is a user-defined command, UT, for doing unit tests of the current class. It's very convenient for accessing class data in unit tests. No need for finding workaround to the language barrier when accessing such data in white box testing. Every component can be properly tested! Pure and simple! By following a few simple conventions and thanks to the built-in modular mechanism in the language runtime, ObjectSense programs are very scalable and development work can be distributed comfortably among team members.

In a more programming linguistic point of view, ObjectSense is of imperative paradigm on the surface, but carries functional programming abilities. In the language runtime, each object has its own data and functions, there's nothing shared. An object is entirely in its own universe just like functional programming. Because the lack of time, we haven't explored such property of the language much. Hopefully, the community can shed new lights on such nice combination.

This is a strong demonstration of what VimL8 is capable of. ObjectSense takes less than 5000 lines of code for the core of the language implementation. Although it's a superset of an existing language, it's very hard to imagine using such little code for implementing a non-trivial programming language. VimL8 has a lot of unrealised potentials, people really shouldn't jump off the bandwagon too quickly.

The best argument for vim9 is performance. We have found a way kind of 'compile' or speedup the load time for ObjectSense. In practice, we could really compile such code into binary and wire it with the language runtime, and without asking developers to learn a completely new language, i.e., being 100% compatible with existing VimL8 syntax and have the acclaimed performance at the same time. However, in our scenario ObjectSense performance issues have been tackled by the semi-compile approach, so no effort was directed to do the real compiling work which could bloat the code base exponentially.

意见的链接
分享到其他网站

加入讨论

您现在可以发表并稍后注册. 如果您是会员,请现在登录来参与讨论.

游客
回复主题...

×   粘贴为富文本.   粘贴为纯文本来代替

  只允许使用75个表情符号.

×   您的链接已自动嵌入.   显示为链接来代替

×   您之前的内容已恢复.   清除编辑器

×   您无法直接粘贴图片.要从网址上传或插入图片.

  • 游客注册

    游客注册

  • 会员

  • 最新的状态更新

    没有最新的状态更新
  • 最近查看

    • 没有会员查看此页面.
×
×
  • 创建新的...