Unused druntime code: Barrier, ReadWriteMutex, Condition
Denis Feklushkin
feklushkin.denis at gmail.com
Tue Jun 16 12:19:27 UTC 2026
On Tuesday, 16 June 2026 at 11:14:25 UTC, Richard (Rikki) Andrew
Cattermole wrote:
> Nobody is compiling for FreeRTOS using upstream druntime if it
> hasn't been ported.
>
> So there is nothing to break.
I claim that this is accidentally added code that has been used
in open source projects ~3 times or so (throughout the history of
GitHub), and PRs what using of this code was rejected twice. Once
code was sucessfully used 8 years ago in some 3rd party open
project.
Your opinion: we don't change our API because it will break user
code.
:-/
At the same time, there is no reason at the present time to make
a cross-platform implementation of this algorithm - writing a
such code "for the future" means planting a bomb under someone
else's code because it will not be properly tested and used now.
(Yes, my personal opinion is that it is not needed at all in std
libraries)
FreeRTOS: I'm only interested in it because it's unlike anything
else we use in D. That is, if we implement support for it, we'll
get a highly abstract druntime, which will make it much easier to
add more traditional OSes/platforms.
Ok, next:
Windows will die in ~10 years (or maybe 15, yeah right! Many of
us already using D more than 15 years, just to orient on the
timeline. Who among us at that time would have believed that
Linux would be built into Windows?)
Posix is a dead end, even for Linux (we could at least allocate
memory not by maloc/free wrappers?)
Obviously, new OSes will emerge on such timeline, at the very
least because new types of hardware (persistent RAM?) will
emerge. These OSes will use different APIs.
How long has the battle for Wasm been going on? (Yes, I know
there's a different problem there.)
There's still no bare metal support, after ~15 years.
Some kind of stagnation?
On GitHub I found only one use of classes mentioned in this tpic,
in code that's 8 years old.
Let's break this classes, especially since it won't disappear,
but will remain in Phobos!
More information about the Digitalmars-d
mailing list