当前位置:网站首页>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
边栏推荐
- Wireshark data analysis and forensics a.pacapng
- 【FPGA教程案例6】基于vivado核的双口RAM设计与实现
- 【C语言】指针与数组笔试题详解
- The industrial scope of industrial Internet is large enough. The era of consumer Internet is only a limited existence in the Internet industry
- [Arduino experiment 17 L298N motor drive module]
- Create your first Kivy program Hello word (tutorial includes source code)
- Learn the five skills you need to master in cloud computing application development
- MySQL
- Using tensorboard to visualize the model, data and training process
- 2022 coal mine gas drainage examination question bank and coal mine gas drainage examination questions and analysis
猜你喜欢
leetcode 2097 — 合法重新排列数对
Using tensorboard to visualize the model, data and training process
C#应用程序界面开发基础——窗体控制(1)——Form窗体
Main features of transport layer TCP and TCP connection
C application interface development foundation - form control (3) - file control
Arduino dy-sv17f automatic voice broadcast
Androd Gradle 对其使用模块依赖的替换
MySQL --- 数据库查询 - 条件查询
【我的OpenGL学习进阶之旅】关于欧拉角、旋转顺序、旋转矩阵、四元数等知识的整理
C#应用程序界面开发基础——窗体控制(3)——文件类控件
随机推荐
wirehark数据分析与取证A.pacapng
[day 29] given an integer, please find its factor number
软考信息系统项目管理师_历年真题_2019下半年错题集_上午综合知识题---软考高级之信息系统项目管理师053
The industrial scope of industrial Internet is large enough. The era of consumer Internet is only a limited existence in the Internet industry
C application interface development foundation - form control (4) - selection control
What is tone. Diao's story
【C语言】指针与数组笔试题详解
Concise analysis of redis source code 11 - Main IO threads and redis 6.0 multi IO threads
数学知识:台阶-Nim游戏—博弈论
MySQL
Now that the teenager has returned, the world's fireworks are the most soothing and ordinary people return to work~
Canvas drawing -- bingdd
2022 coal mine gas drainage examination question bank and coal mine gas drainage examination questions and analysis
tp6快速安装使用MongoDB实现增删改查
MySQL basics 03 introduction to MySQL types
强化学习 Q-learning 实例详解
Tp6 fast installation uses mongodb to add, delete, modify and check
[principles of multithreading and high concurrency: 2. Solutions to cache consistency]
After reading this article, I will teach you to play with the penetration test target vulnhub - drivetingblues-9
看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-9