Thread overview
Wiki page: Coming From C++
Apr 11, 2015
Jakob Ovrum
Apr 11, 2015
ponce
Apr 11, 2015
ponce
Apr 11, 2015
ponce
Apr 11, 2015
David Nadlinger
Apr 12, 2015
Jakob Ovrum
Apr 11, 2015
Laeeth Isharc
Apr 12, 2015
Jakob Ovrum
Apr 12, 2015
anonymous
Apr 27, 2015
Jakob Ovrum
April 11, 2015
I've done some preliminary work on a wiki page that attempts to convince C++ programmers who are on the fence about D, who need to know what D provides over C++11 and C++14.

http://wiki.dlang.org/Coming_From/C_Plus_Plus_WIP_article

I don't know if a Coming_From page is the right place for this kind of information. What is the target audience for Coming_From - programmers who are already learning D, or programmers who are investigating D to decide whether or not to try it? If the former, where should we place information for the latter?

Contributions to the page are very welcome. I think D's syntax is intuitive enough for C++ programmers that we can use commented D code examples. I could need some help filling up the sections and proposing new sections.
April 11, 2015
On Saturday, 11 April 2015 at 10:24:53 UTC, Jakob Ovrum wrote:
> I've done some preliminary work on a wiki page that attempts to convince C++ programmers who are on the fence about D, who need to know what D provides over C++11 and C++14.
>
> http://wiki.dlang.org/Coming_From/C_Plus_Plus_WIP_article
>
> I don't know if a Coming_From page is the right place for this kind of information. What is the target audience for Coming_From - programmers who are already learning D, or programmers who are investigating D to decide whether or not to try it? If the former, where should we place information for the latter?
>
> Contributions to the page are very welcome. I think D's syntax is intuitive enough for C++ programmers that we can use commented D code examples. I could need some help filling up the sections and proposing new sections.

You should mention stack variables and members initialized by default. This avoids many release-only bugs.
April 11, 2015
> You should mention stack variables and members initialized by default. This avoids many release-only bugs.

Also:

    if (cond); // D won't allow that, but C++ will
        statement();

Almost every C++ programmer encounter this in its carreer.
April 11, 2015
On Saturday, 11 April 2015 at 11:02:47 UTC, ponce wrote:
>> You should mention stack variables and members initialized by default. This avoids many release-only bugs.
>
> Also:
>
>     if (cond); // D won't allow that, but C++ will
>         statement();
>
> Almost every C++ programmer encounter this in its carreer.

And the improved resolution of name conflicts and the fact order
of declaration is by and large not important.
April 11, 2015
On Saturday, 11 April 2015 at 10:24:53 UTC, Jakob Ovrum wrote:
> http://wiki.dlang.org/Coming_From/C_Plus_Plus_WIP_article

*Un*signed integer overflow isn't undefined in C/C++ either.

 — David
April 11, 2015
On Saturday, 11 April 2015 at 10:24:53 UTC, Jakob Ovrum wrote:
> I've done some preliminary work on a wiki page that attempts to convince C++ programmers who are on the fence about D, who need to know what D provides over C++11 and C++14.
>
> http://wiki.dlang.org/Coming_From/C_Plus_Plus_WIP_article
>
> I don't know if a Coming_From page is the right place for this kind of information. What is the target audience for Coming_From - programmers who are already learning D, or programmers who are investigating D to decide whether or not to try it? If the former, where should we place information for the latter?
>
> Contributions to the page are very welcome. I think D's syntax is intuitive enough for C++ programmers that we can use commented D code examples. I could need some help filling up the sections and proposing new sections.

Thanks for doing this.  Maybe link to Andrei's talks and articles (and Ali's book) on iterators and ranges.

Learning D vs investigating whether to try it is not such a binary choice because many people who try a language give up early.  Maybe start with the selling points and have a second section below - 'here is how to do stuff'.  Some examples, and links to other relevant material.
April 12, 2015
Thanks for the feedback, I think I've incorporated all the suggested changes.

Also added a section on how D deals with object slicing.

I can't seem to get the compiler to error on dangling else. I tried the examples in the original PR[1], but they seem to compile without error with DMD 2.067. Is anyone able to make the compiler error on dangling else?

[1] https://github.com/D-Programming-Language/dmd/pull/336
April 12, 2015
On Saturday, 11 April 2015 at 16:02:53 UTC, David Nadlinger wrote:
> On Saturday, 11 April 2015 at 10:24:53 UTC, Jakob Ovrum wrote:
>> http://wiki.dlang.org/Coming_From/C_Plus_Plus_WIP_article
>
> *Un*signed integer overflow isn't undefined in C/C++ either.
>
>  — David

I removed the section on undefined behaviour for now, I'm not familiar enough with it to really write something convincing. Help would be appreciated.
April 12, 2015
On Sunday, 12 April 2015 at 03:51:50 UTC, Jakob Ovrum wrote:
> I can't seem to get the compiler to error on dangling else. I tried the examples in the original PR[1], but they seem to compile without error with DMD 2.067. Is anyone able to make the compiler error on dangling else?
>
> [1] https://github.com/D-Programming-Language/dmd/pull/336

It's a warning.
April 27, 2015
I moved it out of draft status since I think it's respectable enough as it is[1], but improvements and additions should still be made.

However, the Coming From pages seem to have been renamed "D for X programmers". I don't think this article fits that moniker.

From where should we link this kind of article?

[1] http://wiki.dlang.org/Coming_From/C_Plus_Plus