digitalmars.D - Wiki page: Coming From C++
- Jakob Ovrum (13/13) Apr 11 2015 I've done some preliminary work on a wiki page that attempts to
- ponce (3/17) Apr 11 2015 You should mention stack variables and members initialized by
- ponce (4/6) Apr 11 2015 Also:
- ponce (3/9) Apr 11 2015 And the improved resolution of name conflicts and the fact order
- David Nadlinger (3/4) Apr 11 2015 *Un*signed integer overflow isn't undefined in C/C++ either.
- Jakob Ovrum (4/8) Apr 11 2015 I removed the section on undefined behaviour for now, I'm not
- Laeeth Isharc (8/22) Apr 11 2015 Thanks for doing this. Maybe link to Andrei's talks and articles
- Jakob Ovrum (8/8) Apr 11 2015 Thanks for the feedback, I think I've incorporated all the
- anonymous (2/7) Apr 12 2015 It's a warning.
- Jakob Ovrum (7/7) Apr 27 2015 I moved it out of draft status since I think it's respectable
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.
Apr 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.
Apr 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.
Apr 11 2015
On Saturday, 11 April 2015 at 11:02:47 UTC, ponce wrote:And the improved resolution of name conflicts and the fact order of declaration is by and large not important.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.
Apr 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
Apr 11 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: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.http://wiki.dlang.org/Coming_From/C_Plus_Plus_WIP_article*Un*signed integer overflow isn't undefined in C/C++ either. — David
Apr 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.
Apr 11 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
Apr 11 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/336It's a warning.
Apr 12 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
Apr 27 2015