blob: 1337d4a6d36e971d3564cbd153b5fcf910c71361 [file] [log] [blame]
Bram Moolenaard1caa942020-04-10 22:10:56 +02001*vim9.txt* For Vim version 8.2. Last change: 2020 Apr 09
Bram Moolenaar8a7d6542020-01-26 15:56:19 +01002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
8
9Vim9 script commands and expressions.
10
11Most expression help is in |eval.txt|. This file is about the new syntax and
12features in Vim9 script.
13
14THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
15
16
171 What is Vim9 script? |vim9-script|
182. Differences |vim9-differences|
193. New style functions |fast-functions|
204. Types |vim9-types|
215. Namespace, Import and Export |vim9script|
22
239. Rationale |vim9-rationale|
24
25==============================================================================
26
271. What is Vim9 script? *vim9-script*
28
29THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
30
31Vim script has been growing over time, while keeping backwards compatibility.
32That means bad choices from the past often can't be changed. Execution is
33quite slow, every line is parsed every time it is executed.
34
35The main goal of Vim9 script is to drastically improve performance. An
36increase in execution speed of 10 to 100 times can be expected. A secondary
37goal is to avoid Vim-specific constructs and get closer to commonly used
38programming languages, such as JavaScript, TypeScript and Java.
39
40The performance improvements can only be achieved by not being 100% backwards
41compatible. For example, in a function the arguments are not available in the
42"a:" dictionary, as creating that dictionary adds quite a lot of overhead.
43Other differences are more subtle, such as how errors are handled.
44
45The Vim9 script syntax and semantics are used in:
46- a function defined with the `:def` command
47- a script file where the first command is `vim9script`
48
49When using `:function` in a Vim9 script file the legacy syntax is used.
50However, this is discouraged.
51
52Vim9 script and legacy Vim script can be mixed. There is no need to rewrite
53old scripts, they keep working as before.
54
55==============================================================================
56
572. Differences from legacy Vim script *vim9-differences*
58
59THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
60
61Vim9 functions ~
62
63`:def` has no extra arguments like `:function` does: "range", "abort", "dict"
64or "closure". A `:def` function always aborts on an error, does not get a
65range passed and cannot be a "dict" function.
66
67In the function body:
68- Arguments are accessed by name, without "a:".
69- There is no "a:" dictionary or "a:000" list. Variable arguments are defined
70 with a name and have a list type: >
71 def MyFunc(...itemlist: list<type>)
72 for item in itemlist
73 ...
74
75
76Variable declarations with :let and :const ~
77
78Local variables need to be declared with `:let`. Local constants need to be
79declared with `:const`. We refer to both as "variables".
80
81Variables can be local to a script, function or code block: >
82 vim9script
83 let script_var = 123
84 def SomeFunc()
85 let func_var = script_var
86 if cond
87 let block_var = func_var
88 ...
89
90The variables are only visible in the block where they are defined and nested
91blocks. Once the block ends the variable is no longer accessible: >
92 if cond
93 let inner = 5
94 else
95 let inner = 0
96 endif
97 echo inner " Error!
98
99The declaration must be done earlier: >
100 let inner: number
101 if cond
102 inner = 5
103 else
104 inner = 0
105 endif
106 echo inner
107
108To intentionally use a variable that won't be available later, a block can be
109used: >
110 {
111 let temp = 'temp'
112 ...
113 }
114 echo temp " Error!
115
Bram Moolenaar560979e2020-02-04 22:53:05 +0100116An existing variable cannot be assigned to with `:let`, since that implies a
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100117declaration. An exception is global variables: these can be both used with
118and without `:let`, because there is no rule about where they are declared.
119
120Variables cannot shadow previously defined variables.
121Variables may shadow Ex commands, rename the variable if needed.
122
Bram Moolenaard1caa942020-04-10 22:10:56 +0200123Global variables must be prefixed with "g:", also at the script level.
124However, global user defined functions are used without "g:". >
125 vim9script
126 let script_local = 'text'
127 let g:global = 'value'
128 let Funcref = ThatFunction
129
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100130Since "&opt = value" is now assigning a value to option "opt", ":&" cannot be
131used to repeat a `:substitute` command.
132
133
134Omitting :call and :eval ~
135
136Functions can be called without `:call`: >
137 writefile(lines, 'file')
Bram Moolenaar560979e2020-02-04 22:53:05 +0100138Using `:call` is still possible, but this is discouraged.
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100139
140A method call without `eval` is possible, so long as the start is an
Bram Moolenaar0c6ceaf2020-02-22 18:36:32 +0100141identifier or can't be an Ex command. It does NOT work for string constants: >
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100142 myList->add(123) " works
143 g:myList->add(123) " works
144 [1, 2, 3]->Process() " works
145 #{a: 1, b: 2}->Process() " works
146 {'a': 1, 'b': 2}->Process() " works
147 "foobar"->Process() " does NOT work
Bram Moolenaar0c6ceaf2020-02-22 18:36:32 +0100148 ("foobar")->Process() " works
149 'foobar'->Process() " does NOT work
150 ('foobar')->Process() " works
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100151
Bram Moolenaar5b1c8fe2020-02-21 18:42:43 +0100152In case there is ambiguity between a function name and an Ex command, use ":"
153to make clear you want to use the Ex command. For example, there is both the
154`:substitute` command and the `substitute()` function. When the line starts
155with `substitute(` this will use the function, prepend a colon to use the
156command instead: >
Bram Moolenaar0c6ceaf2020-02-22 18:36:32 +0100157 :substitute(pattern (replacement (
Bram Moolenaar5b1c8fe2020-02-21 18:42:43 +0100158
Bram Moolenaarcc390ff2020-02-29 22:06:30 +0100159Note that while variables need to be defined before they can be used,
160functions can be called before being defined. This is required to be able
161have cyclic dependencies between functions. It is slightly less efficient,
162since the function has to be looked up by name. And a typo in the function
163name will only be found when the call is executed.
164
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100165
Bram Moolenaard1caa942020-04-10 22:10:56 +0200166Omitting function() ~
167
168A user defined function can be used as a function reference in an expression
169without `function()`. The argument types and return type will then be checked.
170The function must already have been defined. >
171
172 let Funcref = MyFunction
173
174When using `function()` the resulting type is "func", a function with any
175number of arguments and any return type. The function can be defined later.
176
177
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100178No curly braces expansion ~
179
180|curly-braces-names| cannot be used.
181
182
Bram Moolenaar560979e2020-02-04 22:53:05 +0100183No :append, :change or :insert ~
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100184
Bram Moolenaar560979e2020-02-04 22:53:05 +0100185These commands are too quickly confused with local variable names.
186
187
188Comparators ~
189
190The 'ignorecase' option is not used for comparators that use strings.
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100191
192
193White space ~
194
195Vim9 script enforces proper use of white space. This is no longer allowed: >
196 let var=234 " Error!
197 let var= 234 " Error!
198 let var =234 " Error!
199There must be white space before and after the "=": >
200 let var = 234 " OK
201
202White space is required around most operators.
203
204White space is not allowed:
205- Between a function name and the "(": >
206 call Func (arg) " Error!
207 call Func
208 \ (arg) " Error!
209 call Func(arg) " OK
210 call Func(
211 \ arg) " OK
Bram Moolenaar5b1c8fe2020-02-21 18:42:43 +0100212 call Func(
213 \ arg " OK
214 \ )
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100215
216
217Conditions and expressions ~
218
219Conditions and expression are mostly working like they do in JavaScript. A
220difference is made where JavaScript does not work like most people expect.
221Specifically, an empty list is falsey.
222
223Any type of variable can be used as a condition, there is no error, not even
224for using a list or job. This is very much like JavaScript, but there are a
225few exceptions.
226
227 type TRUE when ~
228 bool v:true
229 number non-zero
230 float non-zero
231 string non-empty
232 blob non-empty
233 list non-empty (different from JavaScript)
234 dictionary non-empty (different from JavaScript)
Bram Moolenaard1caa942020-04-10 22:10:56 +0200235 func when there is a function name
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100236 special v:true
237 job when not NULL
238 channel when not NULL
239 class when not NULL
240 object when not NULL (TODO: when isTrue() returns v:true)
241
242The boolean operators "||" and "&&" do not change the value: >
243 8 || 2 == 8
244 0 || 2 == 2
245 0 || '' == ''
246 8 && 2 == 2
247 0 && 2 == 0
248 [] && 2 == []
249
250When using `..` for string concatenation the arguments are always converted to
251string. >
252 'hello ' .. 123 == 'hello 123'
253 'hello ' .. v:true == 'hello true'
254
255In Vim9 script one can use "true" for v:true and "false" for v:false.
256
257
258==============================================================================
259
2603. New style functions *fast-functions*
261
262THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
263
264 *:def*
265:def[!] {name}([arguments])[: {return-type}
266 Define a new function by the name {name}. The body of
267 the function follows in the next lines, until the
268 matching `:enddef`.
269
Bram Moolenaard77a8522020-04-03 21:59:57 +0200270 When {return-type} is omitted or is "void" the
271 function is not expected to return anything.
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100272
273 {arguments} is a sequence of zero or more argument
274 declarations. There are three forms:
275 {name}: {type}
276 {name} = {value}
277 {name}: {type} = {value}
278 The first form is a mandatory argument, the caller
279 must always provide them.
280 The second and third form are optional arguments.
281 When the caller omits an argument the {value} is used.
282
Bram Moolenaar560979e2020-02-04 22:53:05 +0100283 NOTE: It is possible to nest `:def` inside another
284 `:def`, but it is not possible to nest `:def` inside
285 `:function`, for backwards compatibility.
286
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100287 [!] is used as with `:function`.
288
289 *:enddef*
290:enddef End of a function defined with `:def`.
291
292
Bram Moolenaar5b1c8fe2020-02-21 18:42:43 +0100293If the script the function is defined in is Vim9 script, then script-local
294variables can be accessed without the "s:" prefix. They must be defined
295before the function. If the script the function is defined in is legacy
296script, then script-local variables must be accessed with the "s:" prefix.
297
298
Bram Moolenaarebdf3c92020-02-15 21:41:42 +0100299 *:disa* *:disassemble*
300:disa[ssemble] {func} Show the instructions generated for {func}.
301 This is for debugging and testing.
Bram Moolenaarcc390ff2020-02-29 22:06:30 +0100302 Note that for command line completion of {func} you
303 can prepend "s:" to find script-local functions.
Bram Moolenaarebdf3c92020-02-15 21:41:42 +0100304
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100305==============================================================================
306
3074. Types *vim9-types*
308
309THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
310
311The following builtin types are supported:
312 bool
313 number
314 float
315 string
316 blob
Bram Moolenaard77a8522020-04-03 21:59:57 +0200317 list<{type}>
318 dict<{type}>
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100319 job
320 channel
Bram Moolenaarb17893a2020-03-14 08:19:51 +0100321 func
Bram Moolenaard1caa942020-04-10 22:10:56 +0200322 func: {type}
Bram Moolenaard77a8522020-04-03 21:59:57 +0200323 func({type}, ...)
324 func({type}, ...): {type}
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100325
326Not supported yet:
Bram Moolenaard77a8522020-04-03 21:59:57 +0200327 tuple<a: {type}, b: {type}, ...>
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100328
Bram Moolenaard77a8522020-04-03 21:59:57 +0200329These types can be used in declarations, but no value will have this type:
330 {type}|{type}
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100331 void
332 any
333
Bram Moolenaard77a8522020-04-03 21:59:57 +0200334There is no array type, use list<{type}> instead. For a list constant an
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100335efficient implementation is used that avoids allocating lot of small pieces of
336memory.
337
Bram Moolenaard77a8522020-04-03 21:59:57 +0200338A partial and function can be declared in more or less specific ways:
339func any kind of function reference, no type
Bram Moolenaard1caa942020-04-10 22:10:56 +0200340 checking for arguments or return value
Bram Moolenaard77a8522020-04-03 21:59:57 +0200341func: {type} any number and type of arguments with specific
342 return type
Bram Moolenaard1caa942020-04-10 22:10:56 +0200343func({type}) function with argument type, does not return
Bram Moolenaard77a8522020-04-03 21:59:57 +0200344 a value
Bram Moolenaard1caa942020-04-10 22:10:56 +0200345func({type}): {type} function with argument type and return type
346func(?{type}) function with type of optional argument, does
347 not return a value
348func(...{type}) function with type of variable number of
349 arguments, does not return a value
350func({type}, ?{type}, ...{type}): {type}
351 function with:
352 - type of mandatory argument
353 - type of optional argument
354 - type of variable number of arguments
355 - return type
Bram Moolenaard77a8522020-04-03 21:59:57 +0200356
357If the return type is "void" the function does not return a value.
358
359The reference can also be a |Partial|, in which case it stores extra arguments
360and/or a dictionary, which are not visible to the caller. Since they are
361called in the same way the declaration is the same.
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100362
363Custom types can be defined with `:type`: >
364 :type MyList list<string>
365{not implemented yet}
366
367And classes and interfaces can be used as types: >
368 :class MyClass
369 :let mine: MyClass
370
371 :interface MyInterface
372 :let mine: MyInterface
373
374 :class MyTemplate<Targ>
375 :let mine: MyTemplate<number>
376 :let mine: MyTemplate<string>
377
378 :class MyInterface<Targ>
379 :let mine: MyInterface<number>
380 :let mine: MyInterface<string>
381{not implemented yet}
382
383
384Type inference *type-inference*
385
386In general: Whenever the type is clear it can be omitted. For example, when
387declaring a variable and giving it a value: >
388 let var = 0 " infers number type
389 let var = 'hello' " infers string type
390
391
392==============================================================================
393
3945. Namespace, Import and Export
395 *vim9script* *vim9-export* *vim9-import*
396
397THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
398
399A Vim9 script can be written to be imported. This means that everything in
400the script is local, unless exported. Those exported items, and only those
401items, can then be imported in another script.
402
403
404Namespace ~
405 *:vim9script* *:vim9*
Bram Moolenaar560979e2020-02-04 22:53:05 +0100406To recognize a file that can be imported the `vim9script` statement must
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100407appear as the first statement in the file. It tells Vim to interpret the
408script in its own namespace, instead of the global namespace. If a file
409starts with: >
410 vim9script
411 let myvar = 'yes'
412Then "myvar" will only exist in this file. While without `vim9script` it would
413be available as `g:myvar` from any other script and function.
414
415The variables at the file level are very much like the script-local "s:"
416variables in legacy Vim script, but the "s:" is omitted.
417
418In Vim9 script the global "g:" namespace can still be used as before.
419
420A side effect of `:vim9script` is that the 'cpoptions' option is set to the
421Vim default value, like with: >
422 :set cpo&vim
423One of the effects is that |line-continuation| is always enabled.
424The original value of 'cpoptions' is restored at the end of the script.
425
426
427Export ~
428 *:export* *:exp*
429Exporting one item can be written as: >
430 export const EXPORTED_CONST = 1234
431 export let someValue = ...
432 export def MyFunc() ...
433 export class MyClass ...
434
435As this suggests, only constants, variables, `:def` functions and classes can
436be exported.
437
438Alternatively, an export statement can be used to export several already
439defined (otherwise script-local) items: >
440 export {EXPORTED_CONST, someValue, MyFunc, MyClass}
441
442
443Import ~
444 *:import* *:imp*
445The exported items can be imported individually in another Vim9 script: >
446 import EXPORTED_CONST from "thatscript.vim"
447 import MyClass from "myclass.vim"
448
449To import multiple items at the same time: >
450 import {someValue, MyClass} from "thatscript.vim"
451
Bram Moolenaar560979e2020-02-04 22:53:05 +0100452In case the name is ambiguous, another name can be specified: >
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100453 import MyClass as ThatClass from "myclass.vim"
454 import {someValue, MyClass as ThatClass} from "myclass.vim"
455
456To import all exported items under a specific identifier: >
457 import * as That from 'thatscript.vim'
458
459Then you can use "That.EXPORTED_CONST", "That.someValue", etc. You are free
460to choose the name "That", but it is highly recommended to use the name of the
461script file to avoid confusion.
462
463The script name after `import` can be:
464- A relative path, starting "." or "..". This finds a file relative to the
465 location of the script file itself. This is useful to split up a large
466 plugin into several files.
467- An absolute path, starting with "/" on Unix or "D:/" on MS-Windows. This
468 will be rarely used.
469- A path not being relative or absolute. This will be found in the
470 "import" subdirectories of 'runtimepath' entries. The name will usually be
471 longer and unique, to avoid loading the wrong file.
472
473Once a vim9 script file has been imported, the result is cached and used the
474next time the same script is imported. It will not be read again.
475 *:import-cycle*
476The `import` commands are executed when encountered. If that script (directly
477or indirectly) imports the current script, then items defined after the
478`import` won't be processed yet. Therefore cyclic imports can exist, but may
479result in undefined items.
480
481
482Import in an autoload script ~
483
484For optimal startup speed, loading scripts should be postponed until they are
Bram Moolenaar560979e2020-02-04 22:53:05 +0100485actually needed. A recommended mechanism:
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100486
4871. In the plugin define user commands, functions and/or mappings that refer to
488 an autoload script. >
489 command -nargs=1 SearchForStuff call searchfor#Stuff(<f-args>)
490
491< This goes in .../plugin/anyname.vim. "anyname.vim" can be freely chosen.
492
4932. In the autocommand script do the actual work. You can import items from
494 other files to split up functionality in appropriate pieces. >
495 vim9script
496 import FilterFunc from "../import/someother.vim"
497 def searchfor#Stuff(arg: string)
498 let filtered = FilterFunc(arg)
499 ...
500< This goes in .../autoload/searchfor.vim. "searchfor" in the file name
501 must be exactly the same as the prefix for the function name, that is how
502 Vim finds the file.
503
5043. Other functionality, possibly shared between plugins, contains the exported
505 items and any private items. >
506 vim9script
507 let localVar = 'local'
508 export def FilterFunc(arg: string): string
509 ...
510< This goes in .../import/someother.vim.
511
512
513Import in legacy Vim script ~
514
515If an `import` statement is used in legacy Vim script, for identifier the
516script-local "s:" namespace will be used, even when "s:" is not specified.
517
518
519==============================================================================
520
5219. Rationale *vim9-rationale*
522
523The :def command ~
524
525Plugin writers have asked for a much faster Vim script. Investigation have
Bram Moolenaar560979e2020-02-04 22:53:05 +0100526shown that keeping the existing semantics of function calls make this close to
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100527impossible, because of the overhead involved with calling a function, setting
528up the local function scope and executing lines. There are many details that
529need to be handled, such as error messages and exceptions. The need to create
530a dictionary for a: and l: scopes, the a:000 list and several others add too
531much overhead that cannot be avoided.
532
533Therefore the `:def` method to define a new-style function had to be added,
534which allows for a function with different semantics. Most things still work
535as before, but some parts do not. A new way to define a function was
536considered the best way to separate the old-style code from Vim9 script code.
537
538Using "def" to define a function comes from Python. Other languages use
539"function" which clashes with legacy Vim script.
540
541
542Type checking ~
543
544When compiling lines of Vim commands into instructions as much as possible
545should be done at compile time. Postponing it to runtime makes the execution
546slower and means mistakes are found only later. For example, when
547encountering the "+" character and compiling this into a generic add
548instruction, at execution time the instruction would have to inspect the type
549of the arguments and decide what kind of addition to do. And when the
550type is dictionary throw an error. If the types are known to be numbers then
551an "add number" instruction can be used, which is faster. The error can be
552given at compile time, no error handling is needed at runtime.
553
554The syntax for types is similar to Java, since it is easy to understand and
555widely used. The type names are what was used in Vim before, with some
556additions such as "void" and "bool".
557
558
559JavaScript/TypeScript syntax and semantics ~
560
561Script writers have complained that the Vim script syntax is unexpectedly
562different from what they are used to. To reduce this complaint popular
563languages will be used as an example. At the same time, we do not want to
Bram Moolenaar560979e2020-02-04 22:53:05 +0100564abandon the well-known parts of legacy Vim script.
Bram Moolenaar8a7d6542020-01-26 15:56:19 +0100565
566Since Vim already uses `:let` and `:const` and optional type checking is
567desirable, the JavaScript/TypeScript syntax fits best for variable
568declarations. >
569 const greeting = 'hello' " string type is inferred
570 let name: string
571 ...
572 name = 'John'
573
574Expression evaluation was already close to what JavaScript and other languages
575are doing. Some details are unexpected and can be fixed. For example how the
576|| and && operators work. Legacy Vim script: >
577 let result = 44
578 ...
579 return result || 0 " returns 1
580
581Vim9 script works like JavaScript, keep the value: >
582 let result = 44
583 ...
584 return result || 0 " returns 44
585
586On the other hand, overloading "+" to use both for addition and string
587concatenation goes against legacy Vim script and often leads to mistakes.
588For that reason we will keep using ".." for string concatenation. Lua also
589uses ".." this way.
590
591
592Import and Export ~
593
594A problem of legacy Vim script is that by default all functions and variables
595are global. It is possible to make them script-local, but then they are not
596available in other scripts.
597
598In Vim9 script a mechanism very similar to the Javascript import and export
599mechanism is supported. It is a variant to the existing `:source` command
600that works like one would expect:
601- Instead of making everything global by default, everything is script-local,
602 unless exported.
603- When importing a script the symbols that are imported are listed, avoiding
604 name conflicts and failures if later functionality is added.
605- The mechanism allows for writing a big, long script with a very clear API:
606 the exported function(s) and class(es).
607- By using relative paths loading can be much faster for an import inside of a
608 package, no need to search many directories.
609- Once an import has been used, it can be cached and loading it again can be
610 avoided.
611- The Vim-specific use of "s:" to make things script-local can be dropped.
612
613
614Classes ~
615
616Vim supports interfaces to Perl, Python, Lua, Tcl and a few others. But
617these have never become widespread. When Vim 9 was designed a decision was
618made to phase out these interfaces and concentrate on Vim script, while
619encouraging plugin authors to write code in any language and run it as an
620external tool, using jobs and channels.
621
622Still, using an external tool has disadvantages. An alternative is to convert
623the tool into Vim script. For that to be possible without too much
624translation, and keeping the code fast at the same time, the constructs of the
625tool need to be supported. Since most languages support classes the lack of
626class support in Vim is then a problem.
627
628Previously Vim supported a kind-of object oriented programming by adding
629methods to a dictionary. With some care this could be made to work, but it
630does not look like real classes. On top of that, it's very slow, because of
631the use of dictionaries.
632
633The support of classes in Vim9 script is a "minimal common functionality" of
634class support in most languages. It works mostly like Java, which is the most
635popular programming language.
636
637
638
639 vim:tw=78:ts=8:noet:ft=help:norl: