November 17, 2021

On Tuesday, 16 November 2021 at 21:00:48 UTC, Robert Schadek wrote:

>

A Long Term Vision for the D programming language

D -- The best programming language!

[...]

I really want to reply to this in detail but as it turns out my DConf talk does a lot of that already. Which is weird for something I wrote and recorded last week :P

I obviously love the compiler daemon idea, but I don't know how that's practically feasible given the codebase we have right now.

November 18, 2021

On Wednesday, 17 November 2021 at 20:36:10 UTC, JN wrote:

>

On Tuesday, 16 November 2021 at 21:00:48 UTC, Robert Schadek wrote:

>

betterC

betterC is, at best, a waste-by-product, if we have to use betterC to write
something for WASM, or anything significant, we might as well start learning
rust right now.

I think Zig will be a more powerful competitor in the future than Rust. Rust appeals more to C++ programmers, but Zig is targeting C programmers more. I've been looking at Zig lately, and I have to say I think it's a very interesting language. It has optional standard library and bring-your-own-allocator memory management design, which is very tempting for C folks who like to manage their own memory.

Zig is targeting former Objective-C developers with @ everywhere, has module system based on JavaScript AMD model with its @import, and doesn't fix use-after-free.

C folks like to manage their own memory and they get it wrong most of the time.

https://support.apple.com/en-us/HT212869

November 18, 2021

On Wednesday, 17 November 2021 at 21:58:17 UTC, Atila Neves wrote:

>

On Tuesday, 16 November 2021 at 21:00:48 UTC, Robert Schadek wrote:

>

A Long Term Vision for the D programming language

D -- The best programming language!

[...]

I really want to reply to this in detail but as it turns out my DConf talk does a lot of that already. Which is weird for something I wrote and recorded last week :P

I do not think I said anything new.
I believe I have been saying the same things as long as I have been part of the quarterly industry meetings.

>

I obviously love the compiler daemon idea, but I don't know how that's practically feasible given the codebase we have right now.

The dmd codebase will have to compile the new codebase, and serve as a reference for the language.
Nothing more. This is a rewrite!

November 18, 2021

On Thursday, 18 November 2021 at 07:50:44 UTC, Robert Schadek wrote:

>

The dmd codebase will have to compile the new codebase, and serve as a reference for the language.
Nothing more. This is a rewrite!

Yep. I'd keep the DMD parser. (Just because I think writing parsers is a pain in the butt.)
But the rest is going to be an informed rewrite to avoid mistakes of the past.
(Which are reasonable since we didn't know what D would become back then.)

As I said previously I am already working on a prototype.
I am going to announce it as soon as it can compile more than a simple test.

November 18, 2021

On Thursday, 18 November 2021 at 06:54:33 UTC, Paulo Pinto wrote:

>

C folks like to manage their own memory and they get it wrong most of the time.

god help us all, if that assertion is true. (which of course, it's not).

'some of the time', sure, even the best, but 'most of the time'.. that is hyperbole - except perhaps, in the case of novices.

The tools we have available these days, to assist C programmers, is something to factored in when speaking about the C language.

btw. C powers the world.

https://www.toptal.com/c/after-all-these-years-the-world-is-still-powered-by-c-programming

November 18, 2021

On Thursday, 18 November 2021 at 09:08:43 UTC, Stefan Koch wrote:

>

On Thursday, 18 November 2021 at 07:50:44 UTC, Robert Schadek wrote:

>

The dmd codebase will have to compile the new codebase, and serve as a reference for the language.
Nothing more. This is a rewrite!

Yep. I'd keep the DMD parser. (Just because I think writing parsers is a pain in the butt.)
But the rest is going to be an informed rewrite to avoid mistakes of the past.
(Which are reasonable since we didn't know what D would become back then.)

As I said previously I am already working on a prototype.
I am going to announce it as soon as it can compile more than a simple test.

Very excited to see that prototype :D

Just curious, how do you find the time for this? You're working on newCTFE, core.reflect/codegen, a JIT, taskifying dmd and this was there as well? What's your secret to this ultra productive programming output?

November 18, 2021

On Thursday, 18 November 2021 at 09:28:08 UTC, forkit wrote:

>

On Thursday, 18 November 2021 at 06:54:33 UTC, Paulo Pinto wrote:

>

C folks like to manage their own memory and they get it wrong most of the time.

god help us all, if that assertion is true.

It is. It always has been, and decades and many tools later, it still is. This isn't a matter of opinion, it's provable fact.

>

(which of course, it's not).

Huge if true.

>

'some of the time', sure, even the best, but 'most of the time'..

All of the time, if one only counts projects of a certain size and up. Of course it's trivial to get it right in a 50 line program.

>

that is hyperbole - except perhaps, in the case of novices.

Is Walter a novice? Am I? Is Andrei? Is <insert name here>...?

I have no idea how or why this myth of the "sufficiently competent C programmer" persists. They don't exist.

>

The tools we have available these days, to assist C programmers, is something to factored in when speaking about the C language.

I've used them.

>

btw. C powers the world.

So does burning coal, but I wouldn't recommend that either.

November 18, 2021

On Thursday, 18 November 2021 at 09:28:08 UTC, forkit wrote:

>

On Thursday, 18 November 2021 at 06:54:33 UTC, Paulo Pinto wrote:

>

C folks like to manage their own memory and they get it wrong most of the time.

god help us all, if that assertion is true. (which of course, it's not).

'some of the time', sure, even the best, but 'most of the time'.. that is hyperbole - except perhaps, in the case of novices.

The tools we have available these days, to assist C programmers, is something to factored in when speaking about the C language.

btw. C powers the world.

https://www.toptal.com/c/after-all-these-years-the-world-is-still-powered-by-c-programming

Unfortunely,

"~70% of the vulnerabilities Microsoft assigns a CVE each year continue to be memory safety issues"

https://msrc-blog.microsoft.com/2019/07/16/a-proactive-approach-to-more-secure-code/

"As part of our continuous commitment to improve the security of the Android ecosystem, we are partnering with Arm to design the memory tagging extension (MTE). Memory safety bugs, common in C and C++, remain one of the largest vulnerabilities in the Android platform and although there have been previous hardening efforts, memory safety bugs comprised more than half of the high priority security bugs in Android 9."

https://security.googleblog.com/2019/08/adopting-arm-memory-tagging-extension.html

C only powers the world, because lawsuits due to security exploits still aren't a common practice in software like in other industries, where liability is legally enforced.

The day this changes, C won't power anything for much longer.

November 18, 2021
On Thu, Nov 18, 2021 at 02:59:24PM +0000, Paulo Pinto via Digitalmars-d wrote:
> On Thursday, 18 November 2021 at 09:28:08 UTC, forkit wrote:
[...]
> > btw. C powers the world.
> > 
> > https://www.toptal.com/c/after-all-these-years-the-world-is-still-powered-by-c-programming
> 
> Unfortunely,
> 
> "~70% of the vulnerabilities Microsoft assigns a CVE each year continue to be memory safety issues"
> 
> https://msrc-blog.microsoft.com/2019/07/16/a-proactive-approach-to-more-secure-code/
> 
> "As part of our continuous commitment to improve the security of the Android ecosystem, we are partnering with Arm to design the memory tagging extension (MTE). Memory safety bugs, common in C and C++, remain one of the largest vulnerabilities in the Android platform and although there have been previous hardening efforts, memory safety bugs comprised more than half of the high priority security bugs in Android 9."
> 
> https://security.googleblog.com/2019/08/adopting-arm-memory-tagging-extension.html
> 
> C only powers the world, because lawsuits due to security exploits still aren't a common practice in software like in other industries, where liability is legally enforced.
> 
> The day this changes, C won't power anything for much longer.

Exactly what I said.  The day will come when the world realizes just how much of a liability an inherently-unsafe language is, and how much it's costing businesses, and the tables will turn.


T

-- 
Being forced to write comments actually improves code, because it is easier to fix a crock than to explain it. -- G. Steele
November 18, 2021
On Thursday, 18 November 2021 at 17:52:44 UTC, H. S. Teoh wrote:
> Exactly what I said.  The day will come when the world realizes just how much of a liability an inherently-unsafe language is, and how much it's costing businesses, and the tables will turn.
>
>
> T

A shame we didn't get @safe by default pushed through, because (from what I recall) extern(C) functions were for some reason also considered @safe by default, which caused too much backlash.

And to quote a similar post I made before "fuck it, let's just scrap it so everyone looses out instead" is essentially what I remember happening.