www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - What languages did influence D notably

reply Jack <jckj33 gmail.com> writes:

languages?
Sep 02 2022
next sibling parent reply tsbockman <thomas.bockman gmail.com> writes:
On Saturday, 3 September 2022 at 03:32:35 UTC, Jack wrote:

 languages?
The top influences are of course C++ and C. Walter Bright intended D1 as an improvement over C++, whose quirks and faults he became very familiar with while working on his commercial C++ compiler. C is also explicitly a major influence, given that much of D's basic semantics and syntax were chosen with the goal that C code should be easily translatable into D by non-experts, with the obvious translation either having compatible semantics, or failing at compile time. D's ABI compatiblity through `extern(C)`, use of the C runtime library, and `-betterC` mode are further evidence that C is the dominant influence, along side C++.
Sep 03 2022
parent Abdulhaq <alynch4048 gmail.com> writes:
On Saturday, 3 September 2022 at 16:19:26 UTC, tsbockman wrote:
 On Saturday, 3 September 2022 at 03:32:35 UTC, Jack wrote:

 languages?
The top influences are of course C++ and C. Walter Bright intended D1 as an improvement over C++, whose quirks and faults he became very familiar with while working on his commercial C++ compiler. C is also explicitly a major influence, given that much of D's basic semantics and syntax were chosen with the goal that C code should be easily translatable into D by non-experts, with the obvious translation either having compatible semantics, or failing at compile time. D's ABI compatiblity through `extern(C)`, use of the C runtime library, and `-betterC` mode are further evidence that C is the dominant influence, along side C++.
I see it differently. There are more knowledgeable people here for sure but my understanding is that Walter, having written a C++ compiler (and BTW at some point a Java compiler) saw how C++ could be both simplified and also made more powerful (better templating etc.). Now, C++ supported C as part of the C++ philosophy, presumably to help ease adoption of C++, interoperating with the kernel (libc etc), and to leverage all those pre-existing C libraries. Walter also stuck with the idea to try to maintain compatibility with C, for much the same reasons. Hence I say that D was primarily influenced by C++, and only indirectly by C. Putting it into other words, if C++ had not supported C, then D would also not have done so. -betterC came relatively recently as a quick and easy win to get converts from the C community (amongst other reasons). It doesn't necessarily indicate that D was directly influenced by C or its philosophy. When I read TDPL I did gain a sense that Python had also somewhat influenced the design, but maybe that was my imagination. I'm thinking of imports and the 'turtles all the way down' philosophy.
Sep 03 2022
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 9/2/2022 8:32 PM, Jack wrote:

Origins of the D programming language, Proceedings of the ACM on..., Volume 4, Issue HOPL https://dl.acm.org/doi/abs/10.1145/3386323
Sep 03 2022