C and memory safety comments by me

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Fri May 19 07:18:33 PDT 2017


On Friday, May 19, 2017 1:35:07 PM PDT Tobias Mueller via Digitalmars-d 
wrote:
> I don't really understand why there is so much bashing of other
> languages on this forum (not just Rust, but also Java, C, C++,
> etc). For me personally, this leaves a bad taste and makes the D
> community look unfriendly.

Well, for languages like Java, C, and C++, it's mostly a result of folks
using those languages and being unhappy with them (which is then often why
they end up using D - it addresses a number of their complaints about thos
languages). As for complaining about Rust, from what I've seen, it's mostly
either being unhappy with Rust's syntax - which is a perfectly valid reason
not to like a language. The problem comes in if you start complaining about
the users of such languages, and occasionally there's bashing in here about
that, which isn't good. But there certainly could be plenty more complaining
about Rust here that I haven't seen. I suspect that there is some resentment
floating around here though about the massive attention that Rust has
gotten, whereas D generally hasn't gotten all that much attention by the
programming community at large.

Another thing to keep in mind about language bashing though, is that the D
community tends to do a lot of bashing about D. Much as we love D, there's a
lot of complaining about various aspects that aren't perfect (I think in
part because mant came to D hoping for their perfect language, and seeing it
get really close to where you want but not quite there can be quite
frustrating). So, it's not like the D community is constantly bashing other
languages, claiming that D is perfect. We tend to bash any aspect of any
language that we don't like - D included.

> There's room for both, Rust and D. Some just don't want a GC, for
> whatever valid or invalid reason. And some like it. Some like the
> terseness of D and others the explicitness of Rust. Some prefer
> the declarative nature of Rust, others the introspection of D.
> As I see it, Rust and D might target similar problems, but as a
> language they are quite different.

I think that there's totally room for multiple languages out there -
including both D and Rust, but that doesn't mean that folks aren't going to
complain about the aspects languages that they don't like. And ultimately,
the fact that we have variety helps give folks the opportunity to find a
language that fits their tastes.

I think that D vs Go is an even greater example of this (and before folks
were comparing Rust and D, they really liked to compare Go and D). D and Go
are drastically different languages to ther point that about the only
reasons that they were compared so much are because the were both new, and
because Go inititally called itself a systems programming language like
C/C++ and D do - but the Go guys meant something completely different by
system (which is why they eventually stopped calling themselves that). D and
Go clearly both have followings, but because of how different they are, odds
are that someone who really likes one is not going to be a fan of the other.
They're simply too different. But there's no reason why they can't both
exist and thrive.

> If another language get's a good feature, the comments here are
> almost always negative. Why? Programming languages are tools, not
> religions (at least for most programmers). If the tools are
> getting better it's better for everyone. If other languages are
> including features of D, be happy about it, not angry.

I haven't usually seen complaints about other languages getting new
features. The only thing along those lines that I've seen much of is some
folks getting annoyed because C++ added a feature that D had had for quite a
while, and the D community almost never gets credit for ite Now, sometimes,
those ideas really were arrived at separately, but some are so uniquely D
that the odds of them having not been inspired by D are _very_ low. So,
there's sometimes resentment over that. But if anything, the fact that
that's happening just goes to show that D has some cool stuff that other
languages might want too. Regardless, I don't recall anyone complaining
simply because another language was improved in some way.

> And similarly, D should try to learn from other languages and
> maybe even include some of their features it it fits.

A _lot_ of D's featues have been inspired by other languages (e.g. slicing
dynamic arrays and nested functions both exist in D, because Walter saw them
in other langauges and liked them), and there have been plenty of occasions
where another language's feature has been discussed for inclusion in D (e.g.
a cleaner lambda syntax was added to D based on C#'s syntax, and User
Defined Attributes were added, because folks had seen them in other
languages and wanted them in D). In some respects, D is the poster child
language of learning from other langauges, because so much of what we have
was inspired by other languages or is explicitly an improvement over
something that another langauge did (e.g. there are a lot of things in D
that are there to learn from and improve on C, C++, Java, and C#).

- Jonathan M Davis



More information about the Digitalmars-d mailing list