Jump to page: 1 219  
Page
Thread overview
It is the year 2020: why should I use / learn D?
Nov 14, 2018
lagfra
Nov 14, 2018
Andrej Mitrovic
Nov 14, 2018
Joakim
Nov 14, 2018
Guillaume Piolat
Nov 14, 2018
Bastiaan Veelo
Nov 14, 2018
rikki cattermole
Nov 14, 2018
jmh530
Nov 14, 2018
jmh530
Nov 14, 2018
Walter Bright
Nov 16, 2018
Ali Çehreli
Nov 14, 2018
Eugene Wissner
Nov 14, 2018
jmh530
Nov 14, 2018
Basile B.
Nov 14, 2018
Eugene Wissner
Nov 15, 2018
Nicholas Wilson
Nov 14, 2018
Neia Neutuladh
Nov 14, 2018
sepiasisy
Nov 14, 2018
Dukc
Nov 14, 2018
Laeeth Isharc
Nov 14, 2018
Russel Winder
Nov 14, 2018
Walter Bright
Nov 15, 2018
Russel Winder
Nov 14, 2018
lagfra
Nov 16, 2018
Francesco Mecca
Nov 16, 2018
Nicholas Wilson
Nov 14, 2018
jmh530
Nov 14, 2018
Patrick Schluter
Nov 14, 2018
Walter Bright
Nov 14, 2018
Jonathan M Davis
Nov 14, 2018
H. S. Teoh
Nov 15, 2018
H. S. Teoh
Nov 14, 2018
Walter Bright
Nov 14, 2018
H. S. Teoh
Nov 14, 2018
Walter Bright
Nov 15, 2018
Nicholas Wilson
Nov 15, 2018
Norm
Nov 16, 2018
aliak
Nov 16, 2018
NoMoreBugs
Nov 16, 2018
Nicholas Wilson
Nov 14, 2018
bachmeier
Nov 14, 2018
kinke
Nov 14, 2018
kinke
Nov 14, 2018
Walter Bright
Nov 14, 2018
Walter Bright
Nov 14, 2018
Stefan Koch
Nov 14, 2018
H. S. Teoh
Nov 14, 2018
Jacob Carlborg
Nov 14, 2018
sighoya
Nov 14, 2018
Isaac S.
Nov 15, 2018
MrTypeSafe
Nov 15, 2018
aberba
Nov 15, 2018
Joakim
Nov 15, 2018
Erik van Velzen
Nov 15, 2018
Ali Çehreli
Nov 15, 2018
H. S. Teoh
Nov 15, 2018
Stanislav Blinov
Nov 15, 2018
NoMoreBugs
Nov 16, 2018
H. S. Teoh
Nov 16, 2018
NoMoreBugs
Nov 16, 2018
Nicholas Wilson
Nov 16, 2018
Jonathan M Davis
Nov 16, 2018
Nicholas Wilson
Nov 16, 2018
NoMoreBugs
Nov 15, 2018
H. S. Teoh
Nov 16, 2018
Jonathan M Davis
Nov 16, 2018
H. S. Teoh
Nov 16, 2018
AlCaponeJr
Nov 16, 2018
Jonathan M Davis
Nov 16, 2018
Laeeth Isharc
Nov 16, 2018
Ali Çehreli
Nov 16, 2018
H. S. Teoh
Nov 17, 2018
NoMoreBugs
Nov 17, 2018
Laeeth Isharc
Nov 17, 2018
NoMoreBugs
Nov 20, 2018
Laeeth Isharc
Nov 21, 2018
NoMoreBugs
Nov 21, 2018
Chris
Nov 21, 2018
Joakim
Nov 21, 2018
Chris
Nov 22, 2018
Laeeth Isharc
Nov 22, 2018
Chris
Nov 22, 2018
Nicholas Wilson
Nov 22, 2018
Chris
Nov 24, 2018
welkam
Nov 22, 2018
Chris
Nov 22, 2018
Laeeth Isharc
Nov 22, 2018
H. S. Teoh
Nov 23, 2018
Chris
Nov 23, 2018
Joakim
Nov 23, 2018
Nicholas Wilson
Nov 23, 2018
Chris
Nov 23, 2018
Walter Bright
Nov 24, 2018
Chris
Nov 25, 2018
Walter Bright
Nov 25, 2018
Chris
Nov 24, 2018
H. S. Teoh
Nov 25, 2018
Jon Degenhardt
Nov 24, 2018
welkam
Nov 24, 2018
Stanislav Blinov
Nov 25, 2018
aliak
Nov 25, 2018
Chris
Nov 25, 2018
welkam
Nov 23, 2018
Walter Bright
Nov 24, 2018
H. S. Teoh
Nov 24, 2018
Walter Bright
Nov 24, 2018
Laeeth Isharc
Nov 24, 2018
H. S. Teoh
Nov 24, 2018
Joakim
Nov 24, 2018
H. S. Teoh
Nov 24, 2018
Paolo Invernizzi
Nov 24, 2018
Chris
Nov 24, 2018
welkam
Nov 24, 2018
H. S. Teoh
Nov 24, 2018
welkam
Nov 24, 2018
bachmeier
Nov 24, 2018
welkam
Nov 24, 2018
H. S. Teoh
Nov 24, 2018
Grumpy
Nov 26, 2018
Chris
Nov 26, 2018
12345swordy
Nov 26, 2018
Chris
Nov 26, 2018
welkam
Nov 27, 2018
Chris
Nov 28, 2018
welkam
Nov 28, 2018
Aliak
Nov 29, 2018
bauss
Nov 29, 2018
Chris
Nov 24, 2018
JN
Nov 25, 2018
Walter Bright
Nov 25, 2018
Joakim
Nov 25, 2018
Chris
Nov 25, 2018
rikki cattermole
Nov 25, 2018
Chris
Nov 25, 2018
rikki cattermole
Nov 25, 2018
bachmeier
Nov 23, 2018
Neia Neutuladh
Nov 23, 2018
Joakim
Nov 23, 2018
Dukc
Nov 23, 2018
Neia Neutuladh
Nov 23, 2018
Joakim
Nov 23, 2018
Paulo Pinto
Nov 23, 2018
Chris
Nov 24, 2018
Joakim
Nov 22, 2018
Laeeth Isharc
Nov 22, 2018
NoMoreBugs
Nov 22, 2018
Laeeth Isharc
Nov 22, 2018
NoMoreBugs
Nov 22, 2018
Stanislav Blinov
Nov 22, 2018
NoMoreBugs
Nov 22, 2018
Nicholas Wilson
Nov 22, 2018
Dave Jones
Nov 22, 2018
rikki cattermole
Nov 22, 2018
Dave Jones
Nov 22, 2018
NoMoreBugs
Nov 17, 2018
H. S. Teoh
Nov 17, 2018
NoMoreBugs
Nov 17, 2018
NoMoreBugs
Nov 16, 2018
Bastiaan Veelo
Nov 16, 2018
Jonathan M Davis
Nov 16, 2018
bauss
Nov 16, 2018
Atila Neves
Nov 16, 2018
bauss
Nov 17, 2018
Atila Neves
Nov 16, 2018
Adam D. Ruppe
Nov 16, 2018
H. S. Teoh
Nov 17, 2018
Jonathan M Davis
Nov 17, 2018
Nicholas Wilson
Nov 17, 2018
Atila Neves
Nov 18, 2018
0xEAB
Nov 18, 2018
0xEAB
Nov 18, 2018
welkam
Nov 18, 2018
Tony
Nov 18, 2018
Trailzz
Nov 20, 2018
Emil
Nov 20, 2018
Stefan Koch
Nov 20, 2018
Laeeth Isharc
November 14, 2018
https://www.reddit.com/r/cpp/comments/9vwvbz/2018_san_diego_iso_c_committee_trip_report_ranges/

By 2020 C++ is planning to introduce:

* Ranges
* Contracts
* Concepts (`__traits`)
* Proper constexpr
* Modules
* Reflections
* Green threads

Right now it already has:

* `auto` variables
* Ranged for (`foreach`)
* Lambda expressions and closures
* `nothrow` attributes
* Proper containers
* Proper RAII

In no way this is the usual trollpost (I am a participant of SAoC). What bugs me is the shortening distance regarding what D has to offer with respect to C++. While D for sure has a way better syntax (thinking of template declarations, `immutable`, UDAs) and a GC, what are the advantages of using D vs C++ if my goal is to build a complex system / product?

TL;DR: what will D offer with respect to C++ when almost all key features of D are present in C++20(+)?

November 14, 2018
On Wednesday, 14 November 2018 at 15:07:46 UTC, lagfra wrote:
> https://www.reddit.com/r/cpp/comments/9vwvbz/2018_san_diego_iso_c_committee_trip_report_ranges/

According to https://medium.com/@wrongway4you/brief-article-on-c-modules-f58287a6c64:

"Compilation times are promised to become smaller up to 20%"

I think D's compilation times will still be significantly faster than C++. Especially when you consider that some library authors might even choose not to use C++ modules.. I think this is one place where D will still come ahead.
November 14, 2018
On Wednesday, 14 November 2018 at 15:07:46 UTC, lagfra wrote:
> https://www.reddit.com/r/cpp/comments/9vwvbz/2018_san_diego_iso_c_committee_trip_report_ranges/
>
> By 2020 C++ is planning to introduce:
>
> * Ranges
> * Contracts
> * Concepts (`__traits`)
> * Proper constexpr
> * Modules
> * Reflections
> * Green threads
>
> Right now it already has:
>
> * `auto` variables
> * Ranged for (`foreach`)
> * Lambda expressions and closures
> * `nothrow` attributes
> * Proper containers
> * Proper RAII
>
> In no way this is the usual trollpost (I am a participant of SAoC). What bugs me is the shortening distance regarding what D has to offer with respect to C++. While D for sure has a way better syntax (thinking of template declarations, `immutable`, UDAs) and a GC, what are the advantages of using D vs C++ if my goal is to build a complex system / product?
>
> TL;DR: what will D offer with respect to C++ when almost all key features of D are present in C++20(+)?

Not as many legacy features, such as the C preprocessor; much better syntax as you say, especially templates; no need to navigate enormously complex rules to make sure everything works; stuff they haven't added yet, like UFCS; and almost everything you list is available now, in 2018, so you get a giant head-start. :D
November 14, 2018
On Wednesday, 14 November 2018 at 15:07:46 UTC, lagfra wrote:
> https://www.reddit.com/r/cpp/comments/9vwvbz/2018_san_diego_iso_c_committee_trip_report_ranges/
>
> By 2020 C++ is planning to introduce:
>
> * Ranges
> * Contracts
> * Concepts (`__traits`)
> * Proper constexpr
> * Modules
> * Reflections
> * Green threads
>

Not all implementations are equal.

- Regarding `constexpr`

For example D's CTFE works by having some places where things are forced to be evaluated in CTFE. No syntax.
In C++, you currently have `constexpr` and soon you'll have `consteval` alongside with constexpr (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1073r2.html). No new keyword was used for the D version of CTFE.


Similarly, `if constexpr` is strictly less useful than `static if` since it introduces a scope. See the workaround here: https://stackoverflow.com/questions/46880578/scope-of-variables-declared-inside-if-constexpr-blocks < back to where we were with enable_if in terms of code size.


Regarding modules, they were proposed and reported in two C++ standards already.
Same for concepts.


Ultimately all this doesn't matter much since:
- the C++ culture of using cmake/makefiles over a declarative build system will not change (see the demise of biicode)
- avoiding the latest language addition to keep compatibility is necessary in C++, with divergent frontends
- existing codebases are still C++98 for the most part

D has the chance to have a community :
- for which template meta-programming is simple, well understood and almost boring
- which is willing to build an ecosystem (but not enough)

>
> what are the advantages of using D vs C++ if my goal is to build a complex system / product?

Easy: your struggle to learn the D language will have an ending. Which lead to reduced mental load forever - without compromising anything in power.


> TL;DR: what will D offer with respect to C++ when almost all key features of D are present in C++20(+)?

Sanity.

November 14, 2018
On Wednesday, 14 November 2018 at 15:07:46 UTC, lagfra wrote:
> TL;DR: what will D offer with respect to C++ when almost all key features of D are present in C++20(+)?

Nested functions.
November 15, 2018
On 15/11/2018 4:07 AM, lagfra wrote:
> https://www.reddit.com/r/cpp/comments/9vwvbz/2018_san_diego_iso_c_committee_trip_report_ranges/ 
> 
> 
> By 2020 C++ is planning to introduce:
> 
> * Ranges

Really butchered. From what I can see they never mentioned D in any of the documents (kinda glad tbh). Those documents even question what it should be doing...

And the example code... yikes.
No way that is going to be used.

> * Contracts
> * Concepts (`__traits`)
> * Proper constexpr
> * Modules
> * Reflections
> * Green threads

Skepticism especially when there is 2023 being listed as a conservative estimate on the Reddit post.

November 14, 2018
On Wednesday, 14 November 2018 at 15:33:49 UTC, rikki cattermole wrote:
> [snip]
>
> Really butchered. From what I can see they never mentioned D in any of the documents (kinda glad tbh). Those documents even question what it should be doing...
>

I recall D being briefly mentioned in the Range specification. They rejected D's approach because they wanted to build on existing iterator-based code.
November 14, 2018
On Wednesday, 14 November 2018 at 15:49:48 UTC, jmh530 wrote:
> [snip]
>
> I recall D being briefly mentioned in the Range specification. They rejected D's approach because they wanted to build on existing iterator-based code.

It's actually quite a bit more than I remembered:

https://ericniebler.github.io/std/wg21/D4128.html#iterator-operations-are-primitive
November 14, 2018
On Wednesday, 14 November 2018 at 15:49:48 UTC, jmh530 wrote:
> On Wednesday, 14 November 2018 at 15:33:49 UTC, rikki cattermole wrote:
>> [snip]
>>
>> Really butchered. From what I can see they never mentioned D in any of the documents (kinda glad tbh). Those documents even question what it should be doing...
>>
>
> I recall D being briefly mentioned in the Range specification. They rejected D's approach because they wanted to build on existing iterator-based code.

No, it wasn't the reason. Some algorithms cannot be implemented with ranges as efficient as with iterators.

"In other words, by converting the is_word_boundary from iterators to D-style ranges, the algorithm goes from O(1) to O(N). From this we draw the following conclusion: D’s choice of algorithmic basis operations is inherently less efficient than C++’s."

C++ iterators are more flexible. I think of things like rotate and bringToFront - in C++ you need begin, end and middle iterators. In D you can't have something like a "middle", you have to pass two independent ranges. But since most algorithms require begin and end iterators I like D ranges because they aren't that verbose. But D ranges aren't always nicer, for example SList.insertAfter requires a hack with accepting Take!Range instead of just Range.
November 14, 2018
On Wednesday, 14 November 2018 at 15:07:46 UTC, lagfra wrote:


> TL;DR: what will D offer with respect to C++ when almost all key features of D are present in C++20(+)?

Maybe nothing for some programmers. If C++ suddenly becomes a superior language in the future, I know I can start writing C++ and call my existing D code. That's one of the things that makes me comfortable writing D code today. I'll worry about your scenario when C++ is too tempting to avoid - something that is not true for me today.
« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10 11