August 25, 2013
On Sunday, 25 August 2013 at 22:27:30 UTC, Walter Bright wrote:
> It's also clear to me that unless D achieves performance parity with C++, D is not going to be considered for a lot of applications.
>
> The good news is that I believe that D is technically capable of beating C++ on performance.

That is probably true for a large part of the existing and potential clientele.

But while performance *is* important to me, my concern happens to not be performance to the max but rather the reliability aspects. Gladly, D delivers - and delivers quite well - in that regard, too.

As for performance, maybe I'm plain old-school, i.e. falling back to asm (or C as a cross platform "asm") for those few really critical sections.

From what I see around here, it seems that D still has quite some minor quirks. With all respect due (and well deserved) I consider it more important to get D really stable and well rounded. Actually, I think, D can afford some time to beat C++ in performance because thanks to it's asm capabilities, it's build in coverage stats and some other goodies, there always *is* some solution for performance.

But then, maybe D's beauty in part lies in the fact that it offers a lot regarding safety/reliabilty - and - very nice performance, too ;)
August 25, 2013
On Sunday, 25 August 2013 at 23:00:21 UTC, bearophile wrote:
> Ramon:
>
>> As for language comparisons or shoot outs, I don't care that
>> much.
>
> In your first post of this thread you have listed some things you like, some things you don't like, listed points (Arrays, Strings, DBC, modern concurrency, GUI, "defer mechanism", Genericity) you have even assigned points. So while you have not written a direct language comparison, you have analysed specific points. In my answer I've given example that shows why Ada has still something good to offer that's lacking in D. Language comparisons can be sterile, or they can be a chance to learn.
>

I think we have a misunderstanding here. I'm *not* against Ada and I think that, of course, comparing languages to a degree is a good thing and sometimes a necessity.

I just don't think that slocs or "language A does it in x ms while language B needs y ms" does tell me a lot about a language.

Referring to Walter Bright in part, I see that the major problem with server software usually is *not* performance but reliability and safety. Furthermore usually the game is influenced by quite different factors such as the concurreny model chosen. You might well end up having some Lua (interpreted!) server beating the sh*t out of apache (C/C++) simply because the former uses, say, libevent based AIO while the latter uses processes.

*That* actually was a major criterion for me (I happen to work a lot in the server world): I wanted a language that offers a sound and elegant "multitask" implementation (à la Ada) as well as *easy* and comfortable access to AIO (which  e.g. in Eiffel carries a considerable performance penalty by using the agent model).

When I discovered vibe.d I smiled and thought "Of course! It comes almost naturally for a D guy to implement that". What a nice proof of D's capabilities.

August 26, 2013
On Sunday, 25 August 2013 at 23:26:19 UTC, Ramon wrote:
> But then, maybe D's beauty in part lies in the fact that it offers a lot regarding safety/reliabilty - and - very nice performance, too ;)

One of the theories as to why there are no bears to be found on the African continent is that they are omnivores - i.e. generalists - which in a hugely competitive environment such as Africa, there is no niche in which they will not be beat out by a more specifically adapted animal. My understanding of D is that is like a bear, trying to be good at everything. (Maybe that's why bearophile likes it so much!)

But the environment for programming is sufficiently competitive that a language which is merely good at everything without being the best at something could be beaten out of the race simply by not having a niche. Therefore I see an emphasis on one thing to be a strategic advantage even if one's ultimate goal is to build something which is actually good at everything.

It certainly seems to turn a lot of heads when D rivals the fastest languages in a performance comparison. Having caught their attention, D can introduce its other advantages. The two which seem most prominent to me are compile time (often 10% of C++'s) and overall expressiveness, but it seems like almost nothing has been completely ignored.

I'm more or less a fanboy, so I'm sort of on-board for better or worse. Even so, I sometimes feel like this community is building some kind of Cyberdyne Systems Terminator in their garage or something.
August 26, 2013
On Monday, 26 August 2013 at 07:32:53 UTC, Zach the Mystic wrote:
> On Sunday, 25 August 2013 at 23:26:19 UTC, Ramon wrote:
>> But then, maybe D's beauty in part lies in the fact that it offers a lot regarding safety/reliabilty - and - very nice performance, too ;)
>
> One of the theories as to why there are no bears to be found on the African continent is that they are omnivores - i.e. generalists - which in a hugely competitive environment such as Africa, there is no niche in which they will not be beat out by a more specifically adapted animal. My understanding of D is that is like a bear, trying to be good at everything. (Maybe that's why bearophile likes it so much!)
>

Human come from Africa. You'll a significant amount of monkey as well.
August 26, 2013
On Monday, 26 August 2013 at 08:01:51 UTC, deadalnix wrote:
> On Monday, 26 August 2013 at 07:32:53 UTC, Zach the Mystic wrote:
>> On Sunday, 25 August 2013 at 23:26:19 UTC, Ramon wrote:
>>> But then, maybe D's beauty in part lies in the fact that it offers a lot regarding safety/reliabilty - and - very nice performance, too ;)
>>
>> One of the theories as to why there are no bears to be found on the African continent is that they are omnivores - i.e. generalists - which in a hugely competitive environment such as Africa, there is no niche in which they will not be beat out by a more specifically adapted animal. My understanding of D is that is like a bear, trying to be good at everything. (Maybe that's why bearophile likes it so much!)
>>
>
> Human come from Africa. You'll a significant amount of monkey as well.

D *does* offer roughly the speed of C++ *and* does compile significantly faster *and* offers reasonable strings and dyn arrays *and* offers DbC *and* offers considerable levels of safety.

I don't see where this "bear" gets beaten up by lions or other kings of an environment.

Yes, it's not yet fully there and still has some quirks. But then, D is not yet a fully grown up bear with decades of a predatory experience. And I for one couldn't care less for 2% less in speed - which I'll more than make up in development time, anyway.
August 26, 2013
On 26/08/13 09:32, Zach the Mystic wrote:
> One of the theories as to why there are no bears to be found on the African
> continent is that they are omnivores - i.e. generalists - which in a hugely
> competitive environment such as Africa, there is no niche in which they will not
> be beat out by a more specifically adapted animal. My understanding of D is that
> is like a bear, trying to be good at everything. (Maybe that's why bearophile
> likes it so much!)

There were bears in North Africa at least, but they died out fairly recently due to human hunting and other bloodsports:
https://en.wikipedia.org/wiki/Atlas_Bear

August 26, 2013
On 26/08/13 10:01, deadalnix wrote:
> Human come from Africa. You'll a significant amount of monkey as well.

With the caveat that I'm not an evolutionary biologist, palaeontologist or other appropriate expert, I'd be surprised if generalism vs. specificity was _the_ reason for the lack of sub-Saharan bear species.

If you bear in mind (ha!) the evolutionary origin of bears in north America, basic geographical obstacles are likely the major factor in the lack of proliferation beyond the north of the continent.  If you dumped a large enough population of bears into the African wild, they'd probably survive and maybe even displace other native species.
August 26, 2013
On Monday, 26 August 2013 at 07:32:53 UTC, Zach the Mystic wrote:
>
> One of the theories as to why there are no bears to be found on the African continent is that they are omnivores - i.e. generalists - which in a hugely competitive environment such as Africa, there is no niche in which they will not be beat out by a more specifically adapted animal. My understanding of D is that is like a bear, trying to be good at everything. (Maybe that's why bearophile likes it so much!)
>
> But the environment for programming is sufficiently competitive that a language which is merely good at everything without being the best at something could be beaten out of the race simply by not having a niche. Therefore I see an emphasis on one thing to be a strategic advantage even if one's ultimate goal is to build something which is actually good at everything.
>
> It certainly seems to turn a lot of heads when D rivals the fastest languages in a performance comparison. Having caught their attention, D can introduce its other advantages. The two which seem most prominent to me are compile time (often 10% of C++'s) and overall expressiveness, but it seems like almost nothing has been completely ignored.
>
> I'm more or less a fanboy, so I'm sort of on-board for better or worse. Even so, I sometimes feel like this community is building some kind of Cyberdyne Systems Terminator in their garage or something.

I don't agree. I first used D exactly because it is an "all-rounder". For me built-in UTF support was as important a factor as native machine code (performance). The reasons why people would perfer C++ to D are probably habit and convenience. If you've used C++ for years why should you bother to learn D? After all, C++ is well established, well-documented, has loads of libraries, will get you a job more eaily etc. Language features and performance are sometimes over-estimated when it comes to analyzing why a language succeeded. There's convenience, marketing (propaganda) etc etc.

Also I don't think that performance alone decides whether a language becomes popular or not. If it were soley down to performance we wouldn't have Java or Python or even Objective-C (which used to be criticized for being too slow). Ease of use, a clear and consistent structure and "write once run everywhere" are very important too. Especially now that developers have to face so many different platforms (Linux, Mac, Windows, Android, iOS) everythnig goes into the direction of "write once ..." That's one of the reasons why Android took off, I think, because developers said "Great, maybe this will put an end to the mobile platform jungle. We'll support Android, less headaches for us!".

D has what it takes to make it. I don't think the language itself is the problem. And of course, you will always hear arguments like "But C++ is 1% faster" from people who want to hold on to what they have spent years learning. It's completely understandable, it's like the song "There's a whole in my bucket" (http://en.wikipedia.org/wiki/There%27s_a_Hole_in_My_Bucket). Any excuse.
August 26, 2013
Zach the Mystic:

> One of the theories as to why there are no bears to be found on the African continent is that they are omnivores - i.e. generalists - which in a hugely competitive environment such as Africa, there is no niche in which they will not be beat out by a more specifically adapted animal.

I presume the actual causes of the lack of bears in Africa to be more historic and more complex. Generalists are not less fit than specialists, their relative fitness changes as conditions change. And in a place as large as Africa nearly everything happens :-)

We could use Kickstarter to fund the introduction of a population of three hundreds sloth bears in Kenya ;-)


> (Maybe that's why bearophile likes it so much!)

I like their omnivorous nature, and indeed my interests are somewhat "omnivore".

There is also a cute story:

http://cunycomposers.wikispaces.com/file/view/Bisson,+Terry+--+Bears+Discover+Fire.pdf

Bye,
bearophile
August 26, 2013
On Monday, 26 August 2013 at 08:18:02 UTC, Joseph Rushton Wakeling wrote:
> There were bears in North Africa at least, but they died out fairly recently due to human hunting and other bloodsports:
> https://en.wikipedia.org/wiki/Atlas_Bear

I'm kind of glad I didn't know this until now. Too much information can get in the way of a good metaphor, in my opinion!