Earlier quoted context omitted.
D seems like a more useful Rust, or is that completely wrong?
D is garbage-collected, but can be opted out of. Rust has no garbage collector.
D Language accepted for inclusion in GCC
31–40 of 235 posts
Re: D Language accepted for inclusion in GCC
#32Re: D Language accepted for inclusion in GCC
#33Earlier quoted context omitted.
> The reference backend was only Open Source (not freely redistributable). Free redistributibility is part of the Open Source Definition. It is literally the first item: https://opensource.org/osd-annotated
I think they meant lower case "open source" (as in the source is open (anyone can read/compile it)). There are plenty of software that are open source but not freely distributable, such as Unreal Engine.
Re: D Language accepted for inclusion in GCC
#34Earlier quoted context omitted.
Most useful C++ code is either not templates or it's templates which can be instantiated a finite number of times and then used like non-templated code. Most "header-only"/header-heavy C++ libraries which present the problem you mention solve problems like C++'s smart for loop working like "for x in xs" does in Python but not working like "for x,y in zip(xs,ys)" does or like "for i,x for enumerate(xs)" does etc.; you…
That sounds ..wrong. what about the C++ standard library? Neither vector or sort sounds like that?
So you have a C++ file that uses vector, vector, vector, vector, etc. once and then you can link to them from D code.
The only case where that doesn't work is when you have lots of one-off instantiations, where requiring an instantiation in C++ code for each use in D would get annoying quickly.
Re: D Language accepted for inclusion in GCC
#35Earlier quoted context omitted.
I think they meant lower case "open source" (as in the source is open (anyone can read/compile it)). There are plenty of software that are open source but not freely distributable, such as Unreal Engine.
"open source", no matter the capitalization, means what the OSI has defined. Unreal Engine is neither Open Source nor open source. It is simply proprietary. To say otherwise is a practice known as "open washing" that companies use to appear community friendly when in fact they are not.
Re: D Language accepted for inclusion in GCC
#36I have read many posts saying D was better than C++ as a language but there were no libraries for use case X. Now this may help popularise the language.
D seems like a more useful Rust, or is that completely wrong?
Re: D Language accepted for inclusion in GCC
#37Re: D Language accepted for inclusion in GCC
#38Earlier quoted context omitted.
D seems like a more useful Rust, or is that completely wrong?
In my experience, D is like more powerful and feature-packed C#. It doesnt impose any limitations on you and your coding style/paradigm and strives to be "the one to rule them all" tool which has everything and can be used for everything from scripting to systems programming (when stdlib will be more @nogc friendly). And yes, templates are so much better in D than in C++ or in C# :)
How does @nogc work in D? Is it easy to keep track of what needs freeing and what does not or is it easy to mix up and get hard bugs? Also, what do these bugs look like? Is use-after-free possible or how is the failure mode i that case? Is it possible to call free on an object after it's been garbage collected?
Re: D Language accepted for inclusion in GCC
#39Re: D Language accepted for inclusion in GCC
#40Earlier quoted context omitted.
The reference compiler got open sourced about 2 months ago. https://news.ycombinator.com/item?id=14060846
How does this work exactly from a licensing perspective? Will they merge the dmd sources into the gcc tree? Does this mean that the D compiler in gcc will now be GPL(v?) licensed? This is certainly possible since dmd is licensed permissively. https://github.com/dlang/dmd/blob/master/LICENSE.txt I don't mean this to start a fight over licenses I'm just curious how it works when gcc lets other projects in.