July 25, 2018
On Tuesday, 24 July 2018 at 07:19:21 UTC, Paolo Invernizzi wrote:
> If I'm not wrong, Python has grown up really slowly and quietly, till the recent big success in the scientific field.

Python replaced Perl and to some extent Php... Two very questionable languages, which was a good starting-point. C++98 was a similarly questionable starting-point, but nobody got the timing right when that window was open.

The success of Python in scientific computing is to a large extent related to C though.

July 25, 2018
On Wednesday, 25 July 2018 at 20:24:39 UTC, bpr wrote:
> On Wednesday, 25 July 2018 at 17:23:40 UTC, Ecstatic Coder wrote:
>> But don't be too optimistic about BetterC...
>
> I'm too old to get optimistic about these things. In the very best case, D has quite an uphill battle for market share. Any non mainstream language does. If I were a betting man, I'd bet on Rust.
>
>> Honestly, considering D's leadership current priorities, I don't see how it could become soon a true C++ or Go competitor, even with the half-baked BetterC initiative...
>
> There are a few ways I can see, and doubtless others can see different ones. Here's one: use Mir and BetterC to write a TensorFlow competitor for use in developing and deploying ML models. I'm sure you can shoot holes in that idea, but you get the point. Try lots of things and see what works, and keep doing more of those things. Worked for Python.
>
>> For instance, I've suggested they consider using reference counting as an alternative default memory management scheme, and add it to the lists of scolarship and crowdsourced project, and of course they have added all the other suggestion, but not this one. What a surprise ;)
>
> I'm pretty sure D leadership is pursuing such things. In fact,
>
> https://wiki.dlang.org/Vision/2018H1
>
> rather prominently mentions it.
>
>> Despite this is probably one of the most used allocation management scheme in typical C++ development, as this drastically reduces the risks of memory leaks and dangling pointers...
>
>> Anyway, meanwhile D remains a fantastic strongly-typed scripting language for file processing and data analysis, and its recent adoption at Netflix has once again clearly proved it...
>
> For this and similar uses, tracing GC is fine, better in fact than the alternatives. I'm only making noise about betterC for the cases where C++ dominates and tracing GC is a showstopper.
>
> In an alternative timeline, DasBtterC would have been released before D with GC, and the main libraries would have been nogc, and maybe there'd be a split between raw pointers and traced refs (like Nim and Modula-3) and then maybe there'd have been no strong desire for Rust since D could have filled that niche.

+1
July 25, 2018
On Wednesday, 25 July 2018 at 21:16:40 UTC, Walter Bright wrote:
> On 7/24/2018 4:53 AM, Ecstatic Coder wrote:
>>      str = str1 + " " + str2;
>
> But you have to be careful how it is written:
>
>     str = "hello" + "world";
>     str = "hello" + "world" + str1;
>
> don't work, etc.

Yeah. That's exactly there where D shines, and C++ s*cks...

C++ string constants are stupid pointers, no size etc. Indeed one big C++ silly thing that Walter fixed perfectly. He is the only language designed who found and applied the perfect solution for strings, arrays and slices. Big respect to him...
July 25, 2018
On Tuesday, 24 July 2018 at 00:41:54 UTC, RhyS wrote:
> On Monday, 23 July 2018 at 22:45:15 UTC, Walter Bright wrote:
>> I've predicted before that what will kill C is managers and customers requiring memory safety because unsafeness costs them millions. The "just hire better programmers" will never work.
>
> I have yet to see a company Walter where higher ups will take correct actions to resolve issues.

It might be that you are working for the wrong companies.  Half the companies in the world are below average and few are excellent.

> And most manager are not going to rock the boat and stick their necks out. Not when they can simply blame issues on programmer incompetence or "it has always been like that with programming languages". I have yet to see managers really taking responsibility beyond guiding the projects so they do not get fired and hope to rack in bonuses. Issues can always be blamed on the tools or programmers.

That's a good point, but the nice thing about not having dominant market share is it's easy to grow it.  You don't need to convince most managers.  Just a few more people who are on the edge already anyway.  Quality is better than quantity because the former concentrate power.

> And frankly, good luck convincing any company to convert millions of C code into D code.

The point is with betterC you don't need to.

And on the other hand if you did, libclang would take quite a lot of the pain out once you did a bit of work upfront.  See DPP

> I am sorry to say but to succeed as a language beyond being a small or hobby language it takes: Being established already or having a big name to hype behind your "product".

I don't agree.  We are in a time of positive disruption when old heuristics break down.

All D has to do is to keep compounding its adoption and what average people think of D is completely irrelevant.  What's important is what the best people amongst those who are principals rather than agents think of D.  There's no point selling it to a committee, but who wants to deal with committees anyway - life is too short for that if one possibly has the choice.


> Its the same reason why PHP despite being a good language ( for what it is )

!

, still keeps
> getting the exact same crude on forums.
>
> If i am honest, DasBetterC is a for me unreliable D product because using specific D library function can be GC. Or DasBetterC needs to be sold as C only, ever, forget about everything else that is D ( library, packages, ... ). Until everything is 100% GC free, your going to run into this. And even when its 100% GC free, people have long memories.

Don't use it if you don't want to.  But making predictions is a tricky thing and mostly of not much value.  I think it's more interesting to be the change you wish to see in the world.


July 25, 2018
On Wed, Jul 25, 2018 at 11:27:45PM +0000, Laeeth Isharc via Digitalmars-d wrote:
> On Tuesday, 24 July 2018 at 00:41:54 UTC, RhyS wrote:
[...]
> > I am sorry to say but to succeed as a language beyond being a small or hobby language it takes: Being established already or having a big name to hype behind your "product".
> 
> I don't agree.  We are in a time of positive disruption when old heuristics break down.
> 
> All D has to do is to keep compounding its adoption and what average people think of D is completely irrelevant.  What's important is what the best people amongst those who are principals rather than agents think of D.  There's no point selling it to a committee, but who wants to deal with committees anyway - life is too short for that if one possibly has the choice.

+1.


[...]
> > If i am honest, DasBetterC is a for me unreliable D product because using specific D library function can be GC. Or DasBetterC needs to be sold as C only, ever, forget about everything else that is D ( library, packages, ... ). Until everything is 100% GC free, your going to run into this. And even when its 100% GC free, people have long memories.
> 
> Don't use it if you don't want to.  But making predictions is a tricky thing and mostly of not much value.  I think it's more interesting to be the change you wish to see in the world.
[...]

+1!!!  Predictions rarely come true, as history proves.

And for the amount of effort put into naysaying, so much more could have done productively.  But hey, if that's what people like doing, then what is one to say.


T

-- 
Being able to learn is a great learning; being able to unlearn is a greater learning.
July 26, 2018
On Wednesday, 25 July 2018 at 21:16:40 UTC, Walter Bright wrote:
> On 7/24/2018 4:53 AM, Ecstatic Coder wrote:
>>      str = str1 + " " + str2;
>
> But you have to be careful how it is written:
>
>     str = "hello" + "world";
>     str = "hello" + "world" + str1;
>
> don't work, etc.

Well, like everything in C++, there is always a way.

     str = "hello"s + "world";
     str = "hello"s + "world" + str1;

Spot the difference. :)
July 26, 2018
On Thursday, 26 July 2018 at 06:04:33 UTC, Paulo Pinto wrote:
> On Wednesday, 25 July 2018 at 21:16:40 UTC, Walter Bright wrote:
>> On 7/24/2018 4:53 AM, Ecstatic Coder wrote:
>>>      str = str1 + " " + str2;
>>
>> But you have to be careful how it is written:
>>
>>     str = "hello" + "world";
>>     str = "hello" + "world" + str1;
>>
>> don't work, etc.
>
> Well, like everything in C++, there is always a way.
>
>      str = "hello"s + "world";
>      str = "hello"s + "world" + str1;
>
> Spot the difference. :)

It's just synctactic sugar for a constructed string. You can't even use C++14 string constants to initialize a string view, or you have a dangling pointer, as it's NOT a true constant. Ridiculous...
July 26, 2018
On Wednesday, 25 July 2018 at 17:23:40 UTC, Ecstatic Coder wrote:
> On Wednesday, 25 July 2018 at 16:39:51 UTC, bpr wrote:
>> On Tuesday, 24 July 2018 at 17:24:41 UTC, Seb wrote:
>>> On Tuesday, 24 July 2018 at 17:14:53 UTC, Chris M. wrote:
>>>> On Tuesday, 24 July 2018 at 16:15:52 UTC, bpr wrote:
>>>>> On Tuesday, 24 July 2018 at 14:07:43 UTC, Ecstatic Coder wrote:
>>>>>> [...]
>>>>>
>>>>> No. For many C++ users, tracing GC is absolutely not an option. And, if it were, D's GC is not a shining example of a good GC. It's not even precise, and I would bet that it never will be. If I'm able to tolerate a GC, there are languages with much better GCs than the D one, like Go and Java.
>>>>>
>>>>> [...]
>>>>
>>>> There was a precise GC in the works at one point, no clue what happened to it.
>>>
>>> The newest PR is:
>>>
>>> https://github.com/dlang/druntime/pull/1977
>>>
>>> Though there's already a bit of precise scanning on Windows, e.g. https://github.com/dlang/druntime/pull/1798 and IIRC Visual D uses a precise GC too.
>>
>> Well, this is a big problem with D IMO. There are a lot of unfinished, half baked features which linger in development for years. How long for precise GC now, over 5 years? I don't think D was really designed to be friendly to GC, and it just isn't realistic to expect that there will *ever* be a production quality precise GC for all of D. Maybe giving up on some things and finishing/fixing others would be a better strategy? I think so, which is why I think DasBetterC is the most appealing thing I've seen in D lately.
>
> +1
>
> But don't be too optimistic about BetterC...
>
> Honestly, considering D's leadership current priorities, I don't see how it could become soon a true C++ or Go competitor, even with the half-baked BetterC initiative...
>
> For instance, I've suggested they consider using reference counting as an alternative default memory management scheme, and add it to the lists of scolarship and crowdsourced project, and of course they have added all the other suggestion, but not this one. What a surprise ;)

The scholarship list is an idea list that is community-maintained. Let me quote Mike:

"Thanks to everyone for the project ideas, but I put the list on the Wiki for a reason. I'm always pressed for time, so if you have an idea for a project suggestion, it would help me tremendously if you can just summarize it on the Wiki rather than here."

The crowdsourced project was an experiment and the most popular item of the state of D survey that had someone who could be contacted and was more than willing to work for a scholarship salary, was picked.

As Mike has already announced in the blog, it wasn't known before that essentially only one goal could be selected.
In the future, it will be possible to select the project(s) you are most interested in when donating.

> Despite this is probably one of the most used allocation management scheme in typical C++ development, as this drastically reduces the risks of memory leaks and dangling pointers...

Agreed, but it's easily implemented in a library like RefCounted (automem has good implementation too: https://github.com/atilaneves/automem).
For example, std.stdio.File is reference-counted ;-)

core.rc will come, but at the moment only Martin is planning to work on it and he's busy with a lot of other things (e.g. the release process, maintaining the project tester, migrating code.dlang.org to a highly-available cluster, fixing DMD regressions, ...)

It's the same story as always, just from complaining, things won't get magically better... (though it would be great if the world worked that way because then maybe my relationships would be more successful :O)
July 26, 2018
On Tuesday, 24 July 2018 at 13:52:20 UTC, Ecstatic Coder wrote:
> On Tuesday, 24 July 2018 at 12:13:27 UTC, Atila Neves wrote:
>> Same in D, it's just that nobody's bothered writing a string class/struct.
>>
>> Atila
>
> Indeed...

Better late than never:

https://forum.dlang.org/post/fsjspoewhdooowjotgok@forum.dlang.org
July 26, 2018
On Tuesday, 24 July 2018 at 16:15:52 UTC, bpr wrote:
> Besides having more betterC libraries, I'd like to see some kind of restricted approach to exception handling, like the ones being investigated in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r1.pdf. If you want a better C++, look at what people who have to use C++ use it for, and where the pain points are.

I'd say because of default initialization exceptions in constructors are less necessary in D than in C++.