Current state of "D as a better C" (Windows)?
Frank Bauer
y at z.com
Sat Jan 25 18:32:28 PST 2014
On Saturday, 25 January 2014 at 23:01:12 UTC, Jakob Ovrum wrote:
> Setting aside syntax, it's extremely trivial to implement
> C++-style new/delete as function templates.
Fine. Can I use it with Phobos?
> Array functionality *that C and C++ do not have*. D slices are
> plenty useful without the primitives that allocate, such as
> concatenation.
I love D's slices. Super elegant. Can't imagine how one could
ever invent half slices, i.e. array pointers without length ;)
> This very thread is an example of how you're not forced to use
> a runtime that implements these primitives.
We must be in two different threads:
On Wednesday, 22 January 2014 at 02:18:43 UTC, Vladimir Panteleev
wrote:
> - A "standard library" which does not require runtime support,
> but can also be used when using Druntime (as a GC-free
> alternative to Phobos)
On Wednesday, 22 January 2014 at 04:13:41 UTC, Mike wrote:
> Phobos will not be useful to me unless I can find some way to
> make it lighter and GC-Free. ... I would _really_ like to have
> the
> whole concept of a GC decoupled from D. There are many suitable
> memory models to use with D, and the memory model seems like it
> should be a platform feature, not a language feature.
I understand from this thread that we are at a GC-free Hello
World at this point. Well ...
> The GC is a library implementation with language hooks.
No it is not. It is part of the language. Every allocation
*inside* the language (i.e. with new) goes through the GC.
> There aren't that many language features that depend on a GC,
> and the ones that do can be disabled with a custom runtime.
I don't want to miss out on a single language feature of D. Where
is that GC-free runtime?
> druntime/Phobos are designed for a mixed allocation strategy,
> where tracing GC is one of the strategies used. Many Phobos
> types and functions do not rely on a GC.
In theory (which gives me hope), not in practice. Where is that
GC-free Phobos?
> Java and C# do not function well without GC at all
> (disregarding the effort you'd have to go through to get a Java
> or C# implementation without GC).
>
> D definitely *does*.
Again, this gives me hope. Please Walter, Andrei: search all the
forums for "I want D with opt-in GC" (fuzzy search, that is) and
count matches.
More information about the Digitalmars-d
mailing list