Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2024 08:25:26 +0100
From:      David Chisnall <theraven@freebsd.org>
To:        Stefan Esser <se@freebsd.org>
Cc:        Bob Bishop <rb@gid.co.uk>, freebsd-hackers@freebsd.org
Subject:   Re: Rust: kernel vs user-space
Message-ID:  <88AC3419-2BD0-4664-80E8-368360E143B4@freebsd.org>
In-Reply-To: <40836902-cb68-45e0-b4ec-623c21aa47ba@FreeBSD.org>
References:  <40836902-cb68-45e0-b4ec-623c21aa47ba@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 4 Sep 2024, at 17:42, Stefan Esser <se@freebsd.org> wrote:
> 
> The LUA version is much shorter and easier to understand (if you know
> LUA)

I am far from a Lua expert. I started using it quite recently because the best choice for a build system for the RTOS I maintain was written in Lua. I find it overly verbose at times, but, in spite of this, I rarely have problems reading other people’s Lua code.

It took me about an hour to go from never having written any Lua to writing some Lua code that actually worked (and that we still use). I see that as a huge advantage. There’s a lot of C code in the base system that took me ages to understand. Some, such as rtld, because it’s intrinsically complicated (though the fact that the authors are allergic to documentation doesn’t help: there are subtle phase ordering things there that should not have been committed without comments explaining what invariants future changes must preserve) but a lot of command-line tools are doing things that are fairly simple but the code is significantly complicated by the fact that C lacks abstractions for them and so implementation detail of data structures is interleaved with algorithms.

David


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?88AC3419-2BD0-4664-80E8-368360E143B4>