PhobosV3+ Fundamental Elements
Kapendev
alexandroskapretsos at gmail.com
Sun Aug 30 04:30:41 UTC 2026
On Thursday, 27 August 2026 at 22:39:04 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> The following document is a collaboration between Adam Wilson
> and Richard (Rikki) Andrew Cattermole.
>
> The PhobosV3+ work, is comprised of multiple components.
> The first of these is ``based``, this is a low level component
> that comprises of target specific elements to druntime,
> druntime is the platform specific elements and may contain
> target independent code.
>
> The PhobosV2 replacement elements comprises of a base library,
> and auxiliary libraries built on top.
>
> ```
> GUI toolkit | web service framework
> --------------------------------------------------
> Event loop/windowing
> --------------------------------------------------
> PhobosV3 base
> --------------------------------------------------
> druntime
> --------------------------------------------------
> based
> ```
Random thought: it would be nice if there could be an "IO layer"
or something that abstracts over system libraries. Something to
keep the Phobos part pure D in a way. Phobos currently tends to
call some system libraries directly, for example. This is
probably what BASED might be based on the "target specific
elements" comment?
Also, when I say IO layer, I don't mean what the Zig guys are
doing with passing a vtable around at runtime. Just a basic
compile-time abstraction layer.
> One of the key design elements that is wanted, is to remove the
> requirement for templates where possible. Templates are
> expensive, especially if they are not needed to solve a problem.
It's easy to go crazy with compile-time stuff in any language
really, from what I have seen.
Just a guide like "start with no templates or generics and then
maybe" could help a lot.
Same guide should apply to RTTI related things, if that will be a
thing.
Both RTTI and templates add complexity that make code harder to
read or document.
---
> To add or not to add? Umm, I only have one life and templates
> are fun anyway - Monkyyy
More information about the Digitalmars-d
mailing list