alternative to C for Nvim core
This is a *tracking issue*, not a manifesto. Corrections welcome unless they are nit-picks. # Problem The C core of nvim has been armored by a lot of static analysis and compiler flags, which has greatly improved quality. But C still has these problems: - crashes from invalid pointers, arrays not bounds-checked - nul-terminated strings are awkward and have a perf cost - memory management takes effort and asan doesn't detect all the leaks - lack of modern language abstractions (e.g. generics) makes particular parts of the code over complicated and specialized (e.g. marktree, Lua/vimscript bridge). # Goal The strategy of Nvim has always been to lift logic out of C and into Lua where possible. And that still looks like a productive path. But if there is a "better C" which allows us to completely *freeze* the remaining C bits and shift to the "better C", at near-zero cost, then we should consider that. C gives us the following benefits: - broad cross-platform support - fast builds - leverage existing C codebase # Proposal This issue evaluates whether we can maintain the above benefits, while gaining new ones, by leveraging: ## rust - pros - tooling - rich type system - borrow checker gives strong guarantees - language level macros - large collection of libraries - cons - slow build times - interop with C libraries has nonzero friction - mediocre cross-compiling support ## odin - pros - Simpler language (vs zig) - Easy interop
Posted by justinmk on Oct 5, 2024, 5:34 PM
Tags
Related issues
- >Beef is already too expensive for most people.
- I gave this a go a couple of years ago.
- I haven't seen any use cases around me, although I'm not that advanced user.
- [BUG] Pro Max 5x Quota Exhausted in 1.5 Hours Despite Moderate Usage
- > Unfortunately it doesn't offer free hosting for hobbyists.
- Still the same HID remapping project from last month (I was hoping to be done by now, but hardware is hard): https://github.co...
Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments
pricing (Software)
>Beef is already too expensive for most people.
I gave this a go a couple of years ago.
I haven't seen any use cases around me, although I'm not that advanced user.
[BUG] Pro Max 5x Quota Exhausted in 1.5 Hours Despite Moderate Usage
> Unfortunately it doesn't offer free hosting for hobbyists.
Still the same HID remapping project from last month (I was hoping to be done by now, but hardware is hard): https://github.co...
This criticism seems like a complete non-sequitur to me.
Bring back the GitHub Copilot in the CLI commands to not break workflows
alternative to C for Nvim core
This is a *tracking issue*, not a manifesto. Corrections welcome unless they are nit-picks. # Problem The C core of nvim has been armored by a lot of static analysis and compiler flags, which has greatly improved quality. But C still has these problems: - crashes from invalid pointers, arrays not bounds-checked - nul-terminated strings are awkward and have a perf cost - memory management takes effort and asan doesn't detect all the leaks - lack of modern language abstractions (e.g. generics) makes particular parts of the code over complicated and specialized (e.g. marktree, Lua/vimscript bridge). # Goal The strategy of Nvim has always been to lift logic out of C and into Lua where possible. And that still looks like a productive path. But if there is a "better C" which allows us to completely *freeze* the remaining C bits and shift to the "better C", at near-zero cost, then we should consider that. C gives us the following benefits: - broad cross-platform support - fast builds - leverage existing C codebase # Proposal This issue evaluates whether we can maintain the above benefits, while gaining new ones, by leveraging: ## rust - pros - tooling - rich type system - borrow checker gives strong guarantees - language level macros - large collection of libraries - cons - slow build times - interop with C libraries has nonzero friction - mediocre cross-compiling support ## odin - pros - Simpler language (vs zig) - Easy interop
Comments (0)
No comments yet. Start the discussion.