Objavljen Vim v9.0 sa novim Vim9 script

https://www.vim.org/vim90.php link-img
avatar

Vim 9.0 released

After many years of gradual improvement Vim now takes a big step with a major release. Besides many small additions the spotlight is on a new incarnation of the Vim script language: Vim9 script.

The previous release was version 8.2 in December 2019. Since the latest source code is always available on GitHub, many have already picked up later patch versions (there are more than 5000 of them!). Therefore the changes have already been tried out by many users. On top of that bugs have been fixed, security issues have been addressed, and many tests have been added. Code coverage has been dramatically increased. This version is more reliable than any before.

Why Vim9 Script

A new script language, what is that needed for? Vim script has been growing over time, while preserving backwards compatibility. That means bad choices from the past often can’t be changed and compatibility with Vi restricts possible solutions. Execution is quite slow, each line is parsed every time it is executed.

The main goal of Vim9 script is to drastically improve performance. This is accomplished by compiling commands into instructions that can be efficiently executed. An increase in execution speed of 10 to 100 times can be expected.

A secondary goal is to avoid Vim-specific constructs and get closer to commonly used programming languages, such as JavaScript, TypeScript and Java.

The performance improvements can only be achieved by not being 100% backwards compatible. For example, making function arguments available by creating an “a:” dictionary involves quite a lot of overhead. In a Vim9 function this dictionary is not available. Other differences are more subtle, such as how errors are handled.

For those with a large collection of legacy scripts: Not to worry! They will keep working as before. There are no plans to drop support for legacy script. No drama like with the deprecation of Python 2.

1

ULOGUJ SE I DODAJ KOMENTAR


Registruj ili prijavi.

VIDI POPULARNE POSTOVE


1
avatar Bojan pre 5 sati
Gledam
1
avatar Vukašin pre 4 dana
Čitam
1
avatar Vukašin pre 8 dana
1
avatar Stefan pre 8 dana