Jump to page: 1 229  
Page
Thread overview
Fixing C's Biggest Mistake
Dec 21, 2022
Walter Bright
Dec 21, 2022
Walter Bright
Dec 22, 2022
Dave P.
Dec 22, 2022
Walter Bright
Dec 23, 2022
Greggor
Dec 23, 2022
Walter Bright
Dec 21, 2022
matheus
Dec 21, 2022
Walter Bright
Dec 22, 2022
Walter Bright
Dec 25, 2022
cc
Dec 25, 2022
bachmeier
Dec 25, 2022
cc
Dec 26, 2022
Walter Bright
Dec 27, 2022
Walter Bright
Dec 27, 2022
Max Samukha
Dec 27, 2022
Dukc
Dec 27, 2022
Max Samukha
Dec 27, 2022
Walter Bright
Dec 27, 2022
Walter Bright
Dec 27, 2022
Walter Bright
Dec 28, 2022
Timon Gehr
Dec 29, 2022
Walter Bright
Dec 29, 2022
Adam D Ruppe
Dec 30, 2022
Walter Bright
Dec 30, 2022
Walter Bright
Dec 30, 2022
Timon Gehr
Dec 30, 2022
Hipreme
Dec 30, 2022
Timon Gehr
Dec 30, 2022
Walter Bright
Dec 30, 2022
Timon Gehr
Dec 30, 2022
Timon Gehr
Dec 30, 2022
Nick Treleaven
Dec 31, 2022
Walter Bright
Dec 31, 2022
Adam D Ruppe
Dec 31, 2022
Timon Gehr
Dec 31, 2022
Sebastiaan Koppe
Dec 31, 2022
norm
Dec 31, 2022
cc
Dec 31, 2022
Dom Disc
Jan 01, 2023
Walter Bright
Jan 10, 2023
FeepingCreature
Dec 29, 2022
Timon Gehr
Dec 30, 2022
Walter Bright
Dec 30, 2022
monkyyy
Dec 30, 2022
Walter Bright
Dec 31, 2022
H. S. Teoh
Dec 31, 2022
Walter Bright
Dec 31, 2022
Timon Gehr
Dec 31, 2022
max haughton
Dec 31, 2022
Walter Bright
Dec 31, 2022
monkyyy
Jan 01, 2023
Walter Bright
Jan 05, 2023
cc
Jan 08, 2023
Walter Bright
Jan 14, 2023
Timon Gehr
Jan 09, 2023
RTM
Jan 09, 2023
max haughton
Jan 09, 2023
Walter Bright
Jan 09, 2023
Don Allen
Jan 09, 2023
jmh530
Jan 09, 2023
Don Allen
Jan 09, 2023
jmh530
Jan 09, 2023
bachmeier
Jan 09, 2023
Walter Bright
Jan 09, 2023
bachmeier
Jan 10, 2023
Walter Bright
Jan 10, 2023
Adam D Ruppe
Jan 10, 2023
jmh530
Jan 11, 2023
Don Allen
Jan 11, 2023
Walter Bright
Jan 11, 2023
Don Allen
Jan 11, 2023
Walter Bright
Jan 11, 2023
Don Allen
Jan 11, 2023
Walter Bright
Jan 12, 2023
Don Allen
Jan 12, 2023
Walter Bright
Jan 12, 2023
Don Allen
Jan 12, 2023
Walter Bright
Jan 14, 2023
Timon Gehr
Jan 14, 2023
Walter Bright
Jan 11, 2023
Don Allen
Jan 11, 2023
Walter Bright
Jan 12, 2023
H. S. Teoh
Jan 12, 2023
Walter Bright
Jan 14, 2023
Timon Gehr
Jan 14, 2023
Walter Bright
Jan 14, 2023
Timon Gehr
Jan 15, 2023
Walter Bright
Jan 15, 2023
Tejas
Jan 12, 2023
Don Allen
Jan 12, 2023
Max Samukha
Jan 11, 2023
Walter Bright
Jan 12, 2023
Don Allen
Jan 12, 2023
Walter Bright
Jan 12, 2023
Don Allen
Jan 13, 2023
Dukc
Jan 13, 2023
Adam D Ruppe
Jan 13, 2023
Guillaume Piolat
Dec 30, 2022
Timon Gehr
Dec 30, 2022
Walter Bright
Dec 30, 2022
Timon Gehr
Dec 31, 2022
Walter Bright
Dec 31, 2022
Sebastiaan Koppe
Jan 01, 2023
Walter Bright
Jan 01, 2023
Adam D Ruppe
Jan 01, 2023
Walter Bright
Jan 01, 2023
Timon Gehr
Jan 01, 2023
Walter Bright
Jan 02, 2023
mate
Jan 03, 2023
Walter Bright
Jan 02, 2023
claptrap
Jan 03, 2023
Walter Bright
Jan 03, 2023
claptrap
Jan 03, 2023
Timon Gehr
Jan 01, 2023
Sebastiaan Koppe
Jan 01, 2023
Walter Bright
Jan 01, 2023
kdevel
Jan 02, 2023
Walter Bright
Jan 03, 2023
kdevel
Jan 03, 2023
Walter Bright
Jan 12, 2023
Siarhei Siamashka
Dec 31, 2022
Timon Gehr
Dec 31, 2022
Timon Gehr
Dec 31, 2022
Timon Gehr
Dec 31, 2022
Timon Gehr
Jan 11, 2023
A moo person
Jan 11, 2023
A moo person
Jan 11, 2023
Guillaume Piolat
Jan 11, 2023
Max Samukha
Jan 11, 2023
Dukc
Jan 14, 2023
Max Samukha
Jan 14, 2023
Dukc
Jan 15, 2023
Max Samukha
Dec 30, 2022
Max Samukha
Dec 30, 2022
Walter Bright
Dec 31, 2022
Max Samukha
Jan 02, 2023
Walter Bright
Jan 03, 2023
Max Samukha
Feb 07, 2023
Quirin Schroll
Dec 27, 2022
H. S. Teoh
Dec 27, 2022
RTM
Jan 04, 2023
Salih Dincer
Jan 04, 2023
matheus
Jan 05, 2023
Dom DiSc
Jan 05, 2023
Hipreme
Jan 05, 2023
H. S. Teoh
Jan 05, 2023
Max Samukha
Jan 05, 2023
H. S. Teoh
Jan 05, 2023
IGotD-
Jan 05, 2023
H. S. Teoh
Jan 05, 2023
IGotD-
Jan 05, 2023
H. S. Teoh
Jan 05, 2023
H. S. Teoh
Jan 06, 2023
Patrick Schluter
Jan 06, 2023
H. S. Teoh
Jan 20, 2023
Ki Rill
Jan 20, 2023
kdevel
Jan 05, 2023
H. S. Teoh
Dec 22, 2022
Walter Bright
Dec 22, 2022
deadalnix
Dec 22, 2022
bauss
Dec 21, 2022
Don Allen
Dec 21, 2022
Walter Bright
Dec 21, 2022
Don Allen
Dec 21, 2022
Walter Bright
Dec 21, 2022
Don Allen
Dec 21, 2022
Adam D Ruppe
Dec 21, 2022
Paul Backus
Dec 22, 2022
Walter Bright
Dec 21, 2022
Walter Bright
Dec 21, 2022
IGotD-
Dec 21, 2022
Paul Backus
Dec 22, 2022
Walter Bright
Dec 22, 2022
GrimMaple
Dec 22, 2022
Walter Bright
Dec 22, 2022
Sergey
Dec 22, 2022
Iain Buclaw
Dec 22, 2022
Walter Bright
Dec 23, 2022
Iain Buclaw
Dec 23, 2022
GrimMaple
Dec 23, 2022
Don Allen
Dec 23, 2022
monkyyy
Dec 23, 2022
H. S. Teoh
Dec 23, 2022
matheus
Dec 23, 2022
H. S. Teoh
Dec 23, 2022
H. S. Teoh
Dec 23, 2022
bachmeier
Dec 23, 2022
IGotD-
Dec 23, 2022
Siarhei Siamashka
Dec 23, 2022
IGotD-
Dec 23, 2022
GrimMaple
Dec 23, 2022
Walter Bright
Dec 23, 2022
Hipreme
Dec 23, 2022
Walter Bright
Dec 24, 2022
GrimMaple
Dec 23, 2022
H. S. Teoh
Dec 23, 2022
rikki cattermole
Dec 23, 2022
H. S. Teoh
Dec 24, 2022
GrimMaple
Dec 24, 2022
RTM
Dec 24, 2022
GrimMaple
Dec 24, 2022
RTM
Dec 24, 2022
Siarhei Siamashka
Dec 24, 2022
Iain Buclaw
Dec 24, 2022
Bruce Carneal
Jan 07, 2023
Guillaume Piolat
Dec 21, 2022
monkyyy
Dec 22, 2022
Walter Bright
Dec 22, 2022
H. S. Teoh
Dec 22, 2022
Walter Bright
Dec 22, 2022
Siarhei Siamashka
Dec 22, 2022
Walter Bright
Dec 22, 2022
Don Allen
Dec 22, 2022
H. S. Teoh
Dec 22, 2022
Walter Bright
Dec 22, 2022
Don Allen
Dec 22, 2022
Siarhei Siamashka
Dec 23, 2022
Timon Gehr
Dec 23, 2022
Walter Bright
Dec 23, 2022
rikki cattermole
Dec 23, 2022
Walter Bright
Dec 23, 2022
rikki cattermole
Dec 23, 2022
Walter Bright
Dec 23, 2022
rikki cattermole
Dec 24, 2022
rikki cattermole
Dec 22, 2022
Hipreme
Dec 22, 2022
rikki cattermole
Dec 22, 2022
H. S. Teoh
Dec 22, 2022
Per Nordlöw
Dec 22, 2022
Ali Çehreli
Dec 22, 2022
Walter Bright
Dec 23, 2022
Per Nordlöw
Dec 22, 2022
Dukc
Dec 22, 2022
arandomonlooker
Fixing D's Biggest Mistake when?
Dec 23, 2022
Hipreme
Jan 03, 2023
jonatjano
Jan 04, 2023
Walter Bright
Jan 04, 2023
max haughton
Jan 05, 2023
Dibyendu Majumdar
Jan 05, 2023
H. S. Teoh
Jan 06, 2023
Walter Bright
Jan 06, 2023
RTM
Jan 06, 2023
RTM
December 21, 2022
https://news.ycombinator.com/edit?id=34084894

I'm wondering. Should I just go ahead and implement [..] in ImportC?
December 21, 2022
On 12/21/2022 11:09 AM, Walter Bright wrote:
> https://news.ycombinator.com/edit?id=34084894
> 
> I'm wondering. Should I just go ahead and implement [..] in #ImportC?

Vote here:

https://twitter.com/WalterBright/status/1605642794965483521
December 21, 2022
On Wednesday, 21 December 2022 at 19:09:37 UTC, Walter Bright wrote:
> https://news.ycombinator.com/edit?id=34084894
>
> I'm wondering. Should I just go ahead and implement [..] in ImportC?

Could you please post what's going on for those who can't access the link?

Matheus.
December 21, 2022
On 12/21/2022 11:22 AM, matheus wrote:
> On Wednesday, 21 December 2022 at 19:09:37 UTC, Walter Bright wrote:
>> https://news.ycombinator.com/edit?id=34084894
>>
>> I'm wondering. Should I just go ahead and implement [..] in ImportC?
> 
> Could you please post what's going on for those who can't access the link?

I posted this on Hacker News in response to an article about Microsoft's Checked C.
=======================
Checked C:

    int a[5] = { 0, 1, 2, 3, 4};
    _Array_ptr<int> p : count(5) = a;  // p points to 5 elements.

My proposal for C:

    int a[5] = { 0, 1, 2, 3, 4};
    int p[..] = a;  // p points to 5 elements.

https://www.digitalmars.com/articles/C-biggest-mistake.html

https://github.com/Microsoft/checkedc/wiki/New-pointer-and-a...
December 21, 2022

On 12/21/22 2:09 PM, Walter Bright wrote:

>

https://news.ycombinator.com/edit?id=34084894

I'm wondering. Should I just go ahead and implement [..] in ImportC?

Stop trying to fix C. Fix D instead.

-Steve

December 21, 2022
On Wednesday, 21 December 2022 at 19:09:37 UTC, Walter Bright wrote:
> https://news.ycombinator.com/edit?id=34084894
>
> I'm wondering. Should I just go ahead and implement [..] in ImportC?

I thought the intent of ImportC was primarily to facilitate the use of C libraries, e.g., sqlite, from D without having to manually translate function prototypes and other definitions (such as typedefs).

What you seem to be proposing is an extension to the C language that the ImportC compiler (which is a C compiler) understands. How is fixing a problem in C that the C community hasn't agreed is a problem in a way it hasn't agreed to of benefit to the D community?

Wouldn't it be better to devote ImportC time and effort to extending ImportC's understanding of existing variants of C used in libraries that it currently doesn't understand (I've documented examples of this in a recent bug report that you asked me to file)?

Perhaps I'm missing something here. If so, please enlighten me.

/Don
December 21, 2022
On 12/21/2022 11:38 AM, Don Allen wrote:
> Perhaps I'm missing something here. If so, please enlighten me.

ImportC already has a couple extensions from D to make programming in it easier.

But to address your point, ImportC has been a big success for D. People trying to interface D with C and C++ have many times lamented the lack of dynamic arrays in C and C++, leading to ugly interface hacks.

The advantages are:

1. drawing attention to ImportC, which will draw attention to D

2. D can call ImportC code, and ImportC code can call D code. This will make one of the most-used features of D easy to cross over between the two languages.

3. Help get [..] into the C Standard which will help D, too, by making D easier to interface with C

4. Getting it into C means better C debugger support for D
December 21, 2022
On Wednesday, 21 December 2022 at 19:59:58 UTC, Walter Bright wrote:
> On 12/21/2022 11:38 AM, Don Allen wrote:
>> Perhaps I'm missing something here. If so, please enlighten me.
>
> ImportC already has a couple extensions from D to make programming in it easier.
>
> But to address your point, ImportC has been a big success for D. People trying to interface D with C and C++ have many times lamented the lack of dynamic arrays in C and C++, leading to ugly interface hacks.
>
> The advantages are:
>
> 1. drawing attention to ImportC, which will draw attention to D
>
> 2. D can call ImportC code, and ImportC code can call D code. This will make one of the most-used features of D easy to cross over between the two languages.
>
> 3. Help get [..] into the C Standard which will help D, too, by making D easier to interface with C
>
> 4. Getting it into C means better C debugger support for D

I read your paper/discussion of C's biggest mistake. I'm not prepared to agree that what you discuss is The Biggest, but it's certainly up there in the long list of C's mistakes. So I think your argument is persuasive. But it is far from clear to me that making that argument by implementing your proposed new construct in ImportC is the best way to go about this.

For example, you say

2. D can call ImportC code, and ImportC code can call D code.
This will make one of the most-used features of D easy to cross
over between the two languages.

Again, I thought the intent of ImportC was to facilitate access to useful existing  C libraries. If the C community doesn't have an instant epiphany and adopt your position of making a distinction between arrays and pointers because you added that feature to ImportC, then your effort is going to be greeted with the sound of one hand clapping.

I think it would be much better if you argued for your proposed change to C to the C-powers-that-be and devoted your ImportC efforts to extending its coverage of existing C dialects. I think *that* would be the best way to make ImportC a big win for D. Zig's C translator handles the include files (gtk.h and everything it drags in and sqlite3.h as well) that ImportC does not. I think your goal for ImportC should be to make it as comprehensive as the Zig translator. And your key advantage is that D is here now, production-worthy, whereas Zig won't be ready until 2025, according to Kelley's latest roadmap (and based on what I've seen from watching that project, he might well be optimistic).

December 21, 2022
On 12/21/2022 12:25 PM, Don Allen wrote:
> Again, I thought the intent of ImportC was to facilitate access to useful existing  C libraries. If the C community doesn't have an instant epiphany and adopt your position of making a distinction between arrays and pointers because you added that feature to ImportC, then your effort is going to be greeted with the sound of one hand clapping.

I have some experience implementing things that no sane person wants, and it becoming a game changer. Of course, I can't know this in advance. But I'm not afraid to try.


> I think it would be much better if you argued for your proposed change to C to the C-powers-that-be and devoted your ImportC efforts to extending its coverage of existing C dialects. I think *that* would be the best way to make ImportC a big win for D.
I agree with you on the importance of improving ImportC's abilities to handle common .h files with their wacky use of C extensions. I just did another improvement for that a couple days ago.

December 21, 2022
On Wednesday, 21 December 2022 at 19:59:58 UTC, Walter Bright wrote:
> But to address your point, ImportC has been a big success for D.

How did you determine this? Most people I've talked to either haven't actually used it or have had (predictable) trouble with it. A small minority of D users actually find value in it right now.

As I've been saying for a while, I agree it has some potential, but it has not been a big success yet.
« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10 11