V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
codigger
V2EX  ›  Vim

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

  •  
  •   codigger · 132 天前 · 867 次点击
    这是一个创建于 132 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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.

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1217 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 18:01 · PVG 02:01 · LAX 10:01 · JFK 13:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.