Re: Adding Modules to C in 10 Lines of Code

2022-06-08 Thread mee6 via Digitalmars-d-announce
On Sunday, 5 June 2022 at 22:41:41 UTC, Walter Bright wrote: On 6/5/2022 7:26 AM, mee6 wrote: On Saturday, 4 June 2022 at 19:26:27 UTC, Walter Bright wrote: On 6/4/2022 5:29 AM, Paulo Pinto wrote: I guess going around the horn is a synonym for lets pretend there wasn't prior art and keep

Re: Adding Modules to C in 10 Lines of Code

2022-06-07 Thread Walter Bright via Digitalmars-d-announce
On 6/5/2022 10:49 PM, Paulo Pinto wrote: On Sunday, 5 June 2022 at 22:41:14 UTC, Walter Bright wrote: That are *C* compilers doing imports for *C* code? https://clang.llvm.org/docs/Modules.html And I am out of this thread. I had thought that was just for ObjectiveC. It seems it does work

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 6 June 2022 at 11:23:44 UTC, Daniel N wrote: So Object-C can import C, but *C* cannot import *C*. Objective-C is a proper superset of C AFAIK.

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Dom Disc via Digitalmars-d-announce
On Monday, 6 June 2022 at 03:17:34 UTC, forkit wrote: cannot have encapsulation unless it is put into a super type (the module), all by its self (with no friends). It can have friends - they just need to be in the same file (module). And a class without its friend is really only half a type -

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Daniel N via Digitalmars-d-announce
On Monday, 6 June 2022 at 05:49:55 UTC, Paulo Pinto wrote: On Sunday, 5 June 2022 at 22:41:14 UTC, Walter Bright wrote: On 6/4/2022 10:54 PM, Paulo Pinto wrote: That paper had a real implementation to follow along, I didn't see it. while Lucid and IBM products were real things one could

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 6 June 2022 at 11:02:32 UTC, Ola Fosheim Grøstad wrote: Yes, Objective-C has added modules to C since forever… Just rename your .c file to .m I guess that would be the first. Or maybe not… you still use .h, so it depends on the implementation. Pointless discussion really.

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 6 June 2022 at 05:49:55 UTC, Paulo Pinto wrote: https://clang.llvm.org/docs/Modules.html And I am out of this thread. Yes, Objective-C has added modules to C since forever… Just rename your .c file to .m I guess that would be the first.

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 6 June 2022 at 01:05:38 UTC, zjh wrote: On Monday, 6 June 2022 at 00:19:16 UTC, zjh wrote: Because it's fun to be first! Yes, `'d'` is always independent. [C++'s moudle](https://www.oschina.net/news/198583/c-plus-plus-23-to-introduce-module-support) `D`, hurry up and get

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread claptrap via Digitalmars-d-announce
On Monday, 6 June 2022 at 03:17:34 UTC, forkit wrote: On Monday, 6 June 2022 at 00:19:16 UTC, zjh wrote: On Sunday, 5 June 2022 at 22:41:41 UTC, Walter Bright wrote: But yes, as far as i know, D is the first to do this - i.e. turn the class into a pseudo type, that cannot have encapsulation

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread zjh via Digitalmars-d-announce
On Monday, 6 June 2022 at 05:01:27 UTC, forkit wrote: The addidtion of a little character, @, to word private, could change this: @private // Compiler says: oh. so you really want private to mean private? ok. I'll do it for you. no problem. You need a `DIP`.

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread forkit via Digitalmars-d-announce
On Monday, 6 June 2022 at 05:48:14 UTC, Ali Çehreli wrote: Now, that is trolling. Ali juvenalian satire, perhaps. I'd accept that. But trolling? Really?

Re: Adding Modules to C in 10 Lines of Code

2022-06-06 Thread forkit via Digitalmars-d-announce
On Monday, 6 June 2022 at 05:48:14 UTC, Ali Çehreli wrote: Now, that is trolling. Ali Well, I could argue, correctly, that trolling is when someone picks only part of your argument, and uses only that part to support their own agenda - which is to destroy your argument by making it out to

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread Paulo Pinto via Digitalmars-d-announce
On Sunday, 5 June 2022 at 22:41:14 UTC, Walter Bright wrote: On 6/4/2022 10:54 PM, Paulo Pinto wrote: That paper had a real implementation to follow along, I didn't see it. while Lucid and IBM products were real things one could buy. That are *C* compilers doing imports for *C* code?

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread Ali Çehreli via Digitalmars-d-announce
On 6/5/22 22:01, forkit wrote: > I have no doubt that many in the D community would also love to remove > the class abstraction from the langauge, completely, and then they could > force people into thinking 'the D way'. I must accept that "you have no doubt" but that claim is baseless. > I

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread forkit via Digitalmars-d-announce
On Monday, 6 June 2022 at 03:28:07 UTC, zjh wrote: On Monday, 6 June 2022 at 03:17:34 UTC, forkit wrote: Some new languages have even gone out of there way to get rid of the class type completely! At least D hasn't gone that far.. yet. I suspect there are many in the D community that would

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread zjh via Digitalmars-d-announce
On Monday, 6 June 2022 at 03:28:07 UTC, zjh wrote: `Rust` seems no class. These people are too radical. It is easy to `make mistakes` if you take big `changes`.

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread zjh via Digitalmars-d-announce
On Monday, 6 June 2022 at 03:17:34 UTC, forkit wrote: Some new languages have even gone out of there way to get rid of the class type completely! At least D hasn't gone that far.. yet. I suspect there are many in the D community that would welcome that ;-) I don't know many other

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread forkit via Digitalmars-d-announce
On Monday, 6 June 2022 at 00:19:16 UTC, zjh wrote: On Sunday, 5 June 2022 at 22:41:41 UTC, Walter Bright wrote: Because it's fun to be first! Yes, `'d'` is always independent. For example, `'d'` is the `first one` without `class encapsulation`. To be fair, the encapsulation of a class can

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread zjh via Digitalmars-d-announce
On Monday, 6 June 2022 at 00:19:16 UTC, zjh wrote: Because it's fun to be first! Yes, `'d'` is always independent. [C++'s moudle](https://www.oschina.net/news/198583/c-plus-plus-23-to-introduce-module-support) `D`, hurry up and get nervous.

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread zjh via Digitalmars-d-announce
On Sunday, 5 June 2022 at 22:41:41 UTC, Walter Bright wrote: Because it's fun to be first! Yes, `'d'` is always independent. For example, `'d'` is the `first one` without `class encapsulation`.

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread Walter Bright via Digitalmars-d-announce
On 6/4/2022 10:54 PM, Paulo Pinto wrote: That paper had a real implementation to follow along, I didn't see it. while Lucid and IBM products were real things one could buy. That are *C* compilers doing imports for *C* code? What C compilers have imports: gcc - nope clang - nope VC - nope

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread Walter Bright via Digitalmars-d-announce
On 6/5/2022 7:26 AM, mee6 wrote: On Saturday, 4 June 2022 at 19:26:27 UTC, Walter Bright wrote: On 6/4/2022 5:29 AM, Paulo Pinto wrote: I guess going around the horn is a synonym for lets pretend there wasn't prior art and keep arguing D did it first, as usual. Writing a paper is not doing

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread mee6 via Digitalmars-d-announce
On Saturday, 4 June 2022 at 19:26:27 UTC, Walter Bright wrote: On 6/4/2022 5:29 AM, Paulo Pinto wrote: I guess going around the horn is a synonym for lets pretend there wasn't prior art and keep arguing D did it first, as usual. Writing a paper is not doing it first. Why do you care so

Re: Adding Modules to C in 10 Lines of Code

2022-06-05 Thread Paulo Pinto via Digitalmars-d-announce
On Sunday, 5 June 2022 at 04:42:44 UTC, claptrap wrote: On Saturday, 4 June 2022 at 12:29:59 UTC, Paulo Pinto wrote: On Saturday, 4 June 2022 at 07:40:36 UTC, Walter Bright wrote: On 5/29/2022 11:13 PM, Paulo Pinto wrote: Precompiled headers for C and C++ were certainly a module-like system

Re: Adding Modules to C in 10 Lines of Code

2022-06-04 Thread Paulo Pinto via Digitalmars-d-announce
On Saturday, 4 June 2022 at 19:26:27 UTC, Walter Bright wrote: On 6/4/2022 5:29 AM, Paulo Pinto wrote: I guess going around the horn is a synonym for lets pretend there wasn't prior art and keep arguing D did it first, as usual. Writing a paper is not doing it first. That paper had a real

Re: Adding Modules to C in 10 Lines of Code

2022-06-04 Thread claptrap via Digitalmars-d-announce
On Saturday, 4 June 2022 at 12:29:59 UTC, Paulo Pinto wrote: On Saturday, 4 June 2022 at 07:40:36 UTC, Walter Bright wrote: On 5/29/2022 11:13 PM, Paulo Pinto wrote: Precompiled headers for C and C++ were certainly a module-like system (I know because I wrote one), but they are horrific

Re: Adding Modules to C in 10 Lines of Code

2022-06-04 Thread Walter Bright via Digitalmars-d-announce
On 6/4/2022 5:29 AM, Paulo Pinto wrote: I guess going around the horn is a synonym for lets pretend there wasn't prior art and keep arguing D did it first, as usual. Writing a paper is not doing it first.

Re: Adding Modules to C in 10 Lines of Code

2022-06-04 Thread Paulo Pinto via Digitalmars-d-announce
On Saturday, 4 June 2022 at 07:40:36 UTC, Walter Bright wrote: On 5/29/2022 11:13 PM, Paulo Pinto wrote: [...] Not the same as C doing the importing of C code. [...] Going around the horn, really doing it the hard way. Besides, writing a paper is not the same thing as implementing a

Re: Adding Modules to C in 10 Lines of Code

2022-06-04 Thread Walter Bright via Digitalmars-d-announce
On 5/29/2022 11:13 PM, Paulo Pinto wrote: Stepstone did it for Objective-C with #import, Not the same as C doing the importing of C code. and Apple with module maps for C and Objective-C, the modules design that preceeded C++ modules on clang. Then we have those failed attempts at fixing C

Re: Adding Modules to C in 10 Lines of Code

2022-05-30 Thread Paulo Pinto via Digitalmars-d-announce
On Tuesday, 3 May 2022 at 01:54:16 UTC, forkit wrote: On Friday, 22 April 2022 at 19:54:13 UTC, Walter Bright wrote: On 4/17/2022 1:12 PM, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. Slides: https://nwcpp.org/talks/2022/modules_in_c.pdf Video:

Re: Adding Modules to C in 10 Lines of Code

2022-05-27 Thread Jack via Digitalmars-d-announce
On Tuesday, 3 May 2022 at 01:54:16 UTC, forkit wrote: On Friday, 22 April 2022 at 19:54:13 UTC, Walter Bright wrote: On 4/17/2022 1:12 PM, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. Slides: https://nwcpp.org/talks/2022/modules_in_c.pdf Video:

Re: Adding Modules to C in 10 Lines of Code

2022-05-02 Thread forkit via Digitalmars-d-announce
On Friday, 22 April 2022 at 19:54:13 UTC, Walter Bright wrote: On 4/17/2022 1:12 PM, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. Slides: https://nwcpp.org/talks/2022/modules_in_c.pdf Video: https://www.youtube.com/watch?v=2ImfbGm0fls Here is the

Re: Adding Modules to C in 10 Lines of Code

2022-04-22 Thread Matheus via Digitalmars-d-announce
Invidious instances: https://invidious.flokinet.to/watch?v=2ImfbGm0fls https://invidious.namazso.eu/watch?v=2ImfbGm0fls https://vid.puffyan.us/watch?v=2ImfbGm0fls https://inv.riverside.rocks/watch?v=2ImfbGm0fls https://invidious.weblibre.org/watch?v=2ImfbGm0fls

Re: Adding Modules to C in 10 Lines of Code

2022-04-22 Thread Walter Bright via Digitalmars-d-announce
On 4/17/2022 1:12 PM, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. Slides: https://nwcpp.org/talks/2022/modules_in_c.pdf Video: https://www.youtube.com/watch?v=2ImfbGm0fls

Re: Adding Modules to C in 10 Lines of Code

2022-04-22 Thread ezneh via Digitalmars-d-announce
On Tuesday, 19 April 2022 at 12:41:18 UTC, jmh530 wrote: On Sunday, 17 April 2022 at 20:12:38 UTC, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. Will there be a recording available? Here it is: https://www.youtube.com/watch?v=2ImfbGm0fls

Re: Adding Modules to C in 10 Lines of Code

2022-04-19 Thread Walter Bright via Digitalmars-d-announce
On 4/19/2022 5:41 AM, jmh530 wrote: Will there be a recording available? Yes. NWCPP routinely posts the video a few days later.

Re: Adding Modules to C in 10 Lines of Code

2022-04-19 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 19 April 2022 at 12:46:16 UTC, Mike Parker wrote: [snip] Talks from past NWCPP meetups are on their YouTube channel here: https://www.youtube.com/user/NWCPP/videos I assume this one will be there, too. Thanks.

Re: Adding Modules to C in 10 Lines of Code

2022-04-19 Thread Mike Parker via Digitalmars-d-announce
On Tuesday, 19 April 2022 at 12:41:18 UTC, jmh530 wrote: On Sunday, 17 April 2022 at 20:12:38 UTC, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. Will there be a recording available? Talks from past NWCPP meetups are on their YouTube channel here:

Re: Adding Modules to C in 10 Lines of Code

2022-04-19 Thread jmh530 via Digitalmars-d-announce
On Sunday, 17 April 2022 at 20:12:38 UTC, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. Will there be a recording available?

Re: Adding Modules to C in 10 Lines of Code

2022-04-19 Thread user1234 via Digitalmars-d-announce
On Sunday, 17 April 2022 at 20:12:38 UTC, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. I thought to that when you made this, a few weeks ago, for importC: "that's 10 lines because module system is already backed by D system of scopes, symbol lookups(,

Re: Adding Modules to C in 10 Lines of Code

2022-04-17 Thread Walter Bright via Digitalmars-d-announce
On 4/17/2022 5:40 PM, Ali Çehreli wrote: On 4/17/22 13:12, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. (My earlier post disappeared.) April 20 is Wednesday. Ali Gak! My bad. You're right.

Re: Adding Modules to C in 10 Lines of Code

2022-04-17 Thread Ali Çehreli via Digitalmars-d-announce
On 4/17/22 13:12, Walter Bright wrote: https://nwcpp.org/ An online presentation. Monday at 7PM PST. (My earlier post disappeared.) April 20 is Wednesday. Ali

Adding Modules to C in 10 Lines of Code

2022-04-17 Thread Walter Bright via Digitalmars-d-announce
https://nwcpp.org/ An online presentation. Monday at 7PM PST.