Patch 9.0.1188

2023-01-12 Fir de Conversatie Bram Moolenaar
Patch 9.0.1188 Problem:Return value of type() for class and object unclear. Solution: Add v:t_object and v:t_class. Files: runtime/doc/builtin.txt, runtime/doc/eval.txt, src/evalvars.c, src/vim.h, src/testdir/test_vim9_class.vim ***

Patch 9.0.1187

2023-01-12 Fir de Conversatie Bram Moolenaar
Patch 9.0.1187 Problem:Test for using imported class fails. Solution: Skip over rest of type. Files: src/vim9type.c *** ../vim-9.0.1186/src/vim9type.c 2023-01-12 17:06:24.136720890 + --- src/vim9type.c 2023-01-12 20:01:59.856393723 + *** *** 1310,1316

Re: Choices for Vim9 class implementation

2023-01-12 Fir de Conversatie skywind3000
- declaring a class inside a function allows me put related code together - can be used to simulate a closure function. example for java: button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { AsyncTaskRunner runner = new

Re: Choices for Vim9 class implementation

2023-01-12 Fir de Conversatie Bram Moolenaar
> One more thing about vim9 class: > > can we define a named or anonymous class inside a function ? > That can be used to simulate a closure, It can be made possible, but the usefulness might be minimal. Perhaps you can give an example (possibliy in another language) of what you want to do.

Patch 9.0.1186

2023-01-12 Fir de Conversatie Bram Moolenaar
Patch 9.0.1186 Problem:Imported class does not work when used twice in a line. Solution: Fix the type parsing. Files: src/evalvars.c, src/testdir/test_vim9_class.vim *** ../vim-9.0.1185/src/evalvars.c 2023-01-12 17:06:24.136720890 + --- src/evalvars.c 2023-01-12

Re: vim 9 dictionary keys cannot be dictionaries, lists, funcrefs or objects

2023-01-12 Fir de Conversatie Bram Moolenaar
> Just wondering is there is a chance that a future version of vim will allow > dictionary keys to be not just strings but dictionaries, lists, funcrefs or > other objects? > > Other languages do allow this, such as Emacs Lisp, Python, Javascript, Lua, > C (like GLib). Well, in the long

Re: Choices for Vim9 class implementation

2023-01-12 Fir de Conversatie skywind3000
One more thing about vim9 class: can we define a named or anonymous class inside a function ? That can be used to simulate a closure, And maybe, someday, we can translate javascript or lua to vim9script with this feature. 在2022年12月28日星期三 UTC+8 00:29:24 写道: > > > > > This following currently

Patch 9.0.1185

2023-01-12 Fir de Conversatie Bram Moolenaar
Patch 9.0.1185 Problem:Using class from imported script not tested. Solution: Add tests. Implement what is missing. Files: src/vim9type.c, src/evalvars.c, src/proto/evalvars.pro, src/vim9class.c, src/testdir/test_vim9_class.vim *** ../vim-9.0.1184/src/vim9type.c

Patch 9.0.1184

2023-01-12 Fir de Conversatie Bram Moolenaar
Patch 9.0.1184 Problem:Interface of an object is not recognized when checking type. Solution: Use the interface implemented by an object. Files: src/vim9type.c, src/structs.h, src/vim9class.c, src/testdir/test_vim9_class.vim *** ../vim-9.0.1183/src/vim9type.c

nvim + vim9script: how Rust made it happen

2023-01-12 Fir de Conversatie Doug Kearns
Here's an update on the vim9script -> lua transpiler that TJ Devries has been working on for some time. https://www.youtube.com/watch?v=zPQSST-M3fM Nice work TJ. Regards, Doug -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are

Patch 9.0.1183

2023-01-12 Fir de Conversatie Bram Moolenaar
Patch 9.0.1183 Problem:Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11805) Files: src/if_cscope.c, src/if_lua.c, src/if_mzsch.c, src/if_python.c, src/if_python3.c, src/if_ruby.c,