[Info-vax] Safer programming languages (and walking :-) ), was: Re: 8-bit characters
Arne Vajhøj
arne at vajhoej.dk
Tue Nov 16 14:31:18 EST 2021
On 11/16/2021 2:19 PM, Simon Clubley wrote:
> On 2021-11-16, Bill Gunshannon <bill.gunshannon at gmail.com> wrote:
>> It would seem to me that bare metal coding isn't a compiler thing,
>> it's a library thing. Create the necessary libraries for your bare
>> metal and have at it.
>
> For one simple example, can you turn off garbage collection in a
> language when running in bare metal mode ? (Go is a GC language)
>
> How much of the language do you lose if you can do that ?
Bare metal and GC is not a problem.
Hard real time and GC is a problem.
But if your bare metal is also hard real time, then ...
It was not what Go was designed for.
But there are options available.
You can disable automatic and call GC when you want to.
There are external libraries available like:
https://github.com/teh-cmc/mmm
> Go is also reported not to support low-level features such as
> pointer arithmetric.
They strongly recommends against doing it.
But there is an unsafe package if you want to shoot yourself in the
foot.
> There's also the fact that at the very lowest levels, you need to
> be able to write code that does not need a runtime because there
> isn't an operating system under that code to support that runtime.
> It wasn't clear to me if you can actually do that with Go.
It is not designed for that.
But see one of the links I sent in the other post.
It looks doable.
Recommended? Questionable!
Arne
More information about the Info-vax
mailing list