当前位置:网站首页>VIM 9.0 is officially released! The execution speed of the new script can be increased by up to 100 times
VIM 9.0 is officially released! The execution speed of the new script can be increased by up to 100 times
2022-07-03 01:33:00 【The way of Python data】
Produce | OSC The open source community (ID:oschina2013)
take Vim 9.0 Version dedicated to Sven Guckes, He is in 2022 year 2 The month passed away .Sven yes Vim Core maintainer of , He registered vim.org Domain name and created the first Vim Website , We will commemorate him with this .
After years of gradual improvement ,Vim Now there is an important version , A big step forward . In addition to many small additions and improvements , The focus of this release is Vim A new change in scripting language :Vim9 Script.
The last version was 2019 year 12 Released on 8.2 edition . Because the latest source code will always be in GitHub The provision of , Therefore, many users have already installed the later patch version ( There are more than 5000 individual ), These changes have been tried by many users . stay 8.2 On the basis of , Many errors have been fixed 、 The security problem has been solved , Code coverage has been greatly improved . This version is more reliable than any previous version .
Vim9 Script
Vim The script for has evolved over time , While preserving backward compatibility . This means that the wrong choices of the past often cannot be changed , And Vi Compatibility also limits possible solutions . So the execution speed is quite slow , Each row should be parsed at each execution .
Vim9 Script The main goal of is to dramatically improve performance . This is achieved by compiling commands into instructions that can be effectively executed , The speed of implementation is expected to increase 10 To 100 times .
Vim9 Script Our secondary goal is to avoid Vim Unique structure , Make it closer to common programming languages , Such as JavaScript、TypeScript and Java.
Performance can only be improved by not 100% Backward compatibility . for example , By creating a "a:" Dictionaries make function parameters available with considerable overhead , stay Vim9 Function , This dictionary is no longer available .
For developers who have a lot of traditional scripts, don't worry too much , These scripts can still be used as before . There are currently no plans to abandon support for traditional scripts , Change will not be like Python 2 To Python 3 So violent .
Interesting features
To benefit from acceleration , A function must use def To define , Parameters and return types must be specified . This is not just to make execution faster , It also helps to detect errors early when functions are compiled into bytecode . Variables need to use var To declare the , And there is also a type , It can be specific , It can also be inferred from the assigned value .
The continuation of a line does not require the use of backslashes , This is the mechanism used in traditional scripts .
Function calls do not require call, Assignment does not require let, The expression does not need to be evaluated eval. This makes Vim9 Script Looks more like most programming languages .
Breaking up a large script into smaller pieces is now much easier . In a script , export Used to make specific functions and variables available to other scripts , Then use... Where you need to use the exported project import. Combined with automatic loading mechanism , This provides a flexible and powerful way to implement large plug-ins .
Now comment with # start . The old double quotation mark grammar came from the old Vi, Will interfere with the use of strings . In many other languages , for example Python and shell Script , We all know # The meaning of .
Future work
stay Vim9 Script One of my plans is to add classes , Although you can use a dictionary to simulate , But this is far from ideal . Most programmers are familiar with classes , stay Vim9 Script Such things should also be added to , Currently the keyword has been reserved .
More details can be found at :https://www.vim.org/vim90.php
边栏推荐
- Niu Ke swipes questions and clocks in
- What is tone. Diao's story
- Concise analysis of redis source code 11 - Main IO threads and redis 6.0 multi IO threads
- C#应用程序界面开发基础——窗体控制(4)——选择类控件
- [shutter] animation animation (the core class of shutter animation | animation | curvedanimation | animationcontroller | tween)
- 一位苦逼程序员的找工作经历
- 数学知识:Nim游戏—博弈论
- 【我的OpenGL学习进阶之旅】关于欧拉角、旋转顺序、旋转矩阵、四元数等知识的整理
- 对非ts/js文件模块进行类型扩充
- Arduino DY-SV17F自动语音播报
猜你喜欢
随机推荐
MySQL foundation 05 DML language
MySQL - database query - condition query
【面试题】1369- 什么时候不能使用箭头函数?
C application interface development foundation - form control (3) - file control
传输层 TCP主要特点和TCP连接
C application interface development foundation - form control (4) - selection control
MySQL --- 数据库查询 - 基本查询
d,ldc構建共享庫
给你一个可能存在 重复 元素值的数组 numbers ,它原来是一个升序排列的数组,并按上述情形进行了一次旋转。请返回旋转数组的最小元素。【剑指Offer】
Niu Ke swipes questions and clocks in
wirehark数据分析与取证A.pacapng
Button wizard play strange learning - go back to the city to buy medicine and add blood
kivy教程之在 Kivy App 中使用 matplotlib 的示例
Test shift right: Elk practice of online quality monitoring
Basic concept and implementation of overcoming hash
2022 Jiangxi Provincial Safety Officer B certificate reexamination examination and Jiangxi Provincial Safety Officer B certificate simulation examination question bank
d. LDC build shared library
Database SQL language 02 connection query
How is the mask effect achieved in the LPL ban/pick selection stage?
Vim 9.0正式发布!新版脚本执行速度最高提升100倍



![[Androd] Gradle 使用技巧之模块依赖替换](/img/5f/968db696932f155a8c4a45f67135ac.png)





