Sunday, December 31, 2023

Re: Building a Reactive Library from Scratch in Vim 9 Script

On 2023-12-30, Steve Litt <slitt@troubleshooters.com> wrote:
> I had a chuckle when you called Vimscript a "sane language". I'm more
> of a Lua or Python or C guy myself. But looking at your code, it looks
> like the Vim9 script language is a big improvement over that old viml
> stuff.

That was basically the sense of my post. I consider Vim 9 script the
last gift, and one of the most precious ones, Bram left us. My post
expresses my appreciation for the effort of the developers who are
building up on that gift: things are getting really really good! I was
pleasantly surprised that Vim did not crash or misbehave when fed with
some weird snippets such as that Russellian Subscribe() function :)

> Anyway, could you please summarize what you see as the benefits of
> reactive programming?

I can't really speak of the merits (or lack thereof) of reactive
programming. I have just started rewriting the style picker of my
Colortemplate plugin in Vim 9 script. There, the main problem is keeping
the attributes of a highlight group in sync with a bunch of UI widgets,
so it seemed to me like a good chance to explore some alternative
approaches.

From what I have seen so far, a reactive approach has some potential to
simplify my code both in terms of the amount needed and in terms of
correctness. The devil's in the details, of course, so maybe I will
eventually hit some wall and scratch everything. But I'm learning new
things and having fun, and that's what matters to me at the end of the
day.

Life.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/umruq4%247vp%241%40ciao.gmane.io.

No comments:

Post a Comment