Re: D as a Better C

2017-09-07 Thread twkrimm via Digitalmars-d-announce
On Thursday, 31 August 2017 at 13:17:36 UTC, Claude wrote: I think "betterC" can be a good tool to use D on embedded systems, keep as few dependencies as possible, a low ROM footprint and a good C interoperability. I'll try to find some time to play with it. I agree, embedded systems is one

Re: D as a Better C

2017-09-07 Thread Kagamin via Digitalmars-d-announce
On Monday, 28 August 2017 at 22:45:01 UTC, Parke wrote: When I write "hello world" in C, the executable is 8,519 bytes. When I write "hello world" in D, the executable is 100 times larger: 865,179 bytes. Interestingly, "hello world" in C, compiled statically, yields 908,608 bytes. And

Re: D as a Better C

2017-09-01 Thread Azi Hassan via Digitalmars-d-announce
On Wednesday, 30 August 2017 at 22:48:45 UTC, Adam D. Ruppe wrote: On Wednesday, 30 August 2017 at 22:22:23 UTC, Azi Hassan wrote: extern(C) int main(int argc, char*[] argv, char*[] env) That's a D array of pointers. A D array is larger than a C "array" argument, thus you're skipping past

Re: D as a Better C

2017-08-31 Thread Claude via Digitalmars-d-announce
I think "betterC" can be a good tool to use D on embedded systems, keep as few dependencies as possible, a low ROM footprint and a good C interoperability. I'll try to find some time to play with it.

Re: D as a Better C

2017-08-30 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 30 August 2017 at 22:22:23 UTC, Azi Hassan wrote: extern(C) int main(int argc, char*[] argv, char*[] env) That's a D array of pointers. A D array is larger than a C "array" argument, thus you're skipping past it. The correct declaration is (int argc, char** argv, char** env).

Re: D as a Better C

2017-08-30 Thread Azi Hassan via Digitalmars-d-announce
On Wednesday, 30 August 2017 at 22:22:23 UTC, Azi Hassan wrote: How should command-line arguments be used in better C ? Looping through argv seems to print environment variables : import core.stdc.stdio; extern(C) int main(int argc, char*[] argv, char*[] env) { foreach(i; 0 .. argc)

Re: D as a Better C

2017-08-30 Thread Azi Hassan via Digitalmars-d-announce
How should command-line arguments be used in better C ? Looping through argv seems to print environment variables : import core.stdc.stdio; extern(C) int main(int argc, char*[] argv, char*[] env) { foreach(i; 0 .. argc) printf("arg %d: %s\n", i, argv[i]); return

Re: D as a Better C

2017-08-30 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 30 August 2017 at 02:19:21 UTC, Michael V. Franklin wrote: As you can see it is not a polished experience and gets much worse when you start employing more features of D. This could be improved, and in fact, with GDC you need even less useless boilerplate in object.d and may end

Re: D as a Better C

2017-08-30 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 30 August 2017 at 00:29:19 UTC, Parke wrote: But my original question was about what you (Kagamin) called "intermediate D". I was trying to understand what "intermediate D" is, and whether or not I could use "intermediate D" (whatever it is) to produce small(er) executables.

Re: D as a Better C

2017-08-29 Thread Parke via Digitalmars-d-announce
On Tue, Aug 29, 2017 at 7:19 PM, Michael V. Franklin via Digitalmars-d-announce wrote: > For example, the following is the most minimal "Hello World" I can make with > D that does not require the -betterC switch, and does not use the official D > runtime.

Re: D as a Better C

2017-08-29 Thread Michael V. Franklin via Digitalmars-d-announce
On Wednesday, 30 August 2017 at 00:29:19 UTC, Parke wrote: But my original question was about what you (Kagamin) called "intermediate D". I was trying to understand what "intermediate D" is, and whether or not I could use "intermediate D" (whatever it is) to produce small(er) executables.

Re: D as a Better C

2017-08-29 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 30 August 2017 at 00:29:19 UTC, Parke wrote: The above D code yields 445,187 bytes when compiled with -release -betterC. DMD64 D Compiler 2.075.0-b2 on Linux on x86-64. -betterC does virtually nothing on that version of dmd... But my original question was about what you

Re: D as a Better C

2017-08-29 Thread Parke via Digitalmars-d-announce
> On Monday, 28 August 2017 at 22:45:01 UTC, Parke wrote: >> When I write "hello world" in C, the executable is 8,519 bytes. >> When I write "hello world" in D, the executable is 100 times larger: >> 865,179 bytes. On Tue, Aug 29, 2017 at 8:26 AM, Kagamin via Digitalmars-d-announce

Re: D as a Better C

2017-08-29 Thread Kagamin via Digitalmars-d-announce
On Monday, 28 August 2017 at 22:45:01 UTC, Parke wrote: When I write "hello world" in C, the executable is 8,519 bytes. When I write "hello world" in D, the executable is 100 times larger: 865,179 bytes. You mean the examples from the blog post

Re: D as a Better C

2017-08-28 Thread Parke via Digitalmars-d-announce
> On Friday, 25 August 2017 at 18:08:06 UTC, Parke wrote: >> Is there any documentation on how to access and use the minimal runtime? On Mon, Aug 28, 2017 at 5:22 AM, Kagamin via Digitalmars-d-announce wrote: > Runtime implements language features like

Re: D as a Better C

2017-08-28 Thread Kagamin via Digitalmars-d-announce
On Friday, 25 August 2017 at 18:08:06 UTC, Parke wrote: Is there any documentation on how to access and use the minimal runtime? Runtime implements language features like boundschecking, it's not used explicitly in the code.

Re: D as a Better C

2017-08-25 Thread Michael V. Franklin via Digitalmars-d-announce
On Friday, 25 August 2017 at 23:13:53 UTC, Mengu wrote: On Friday, 25 August 2017 at 00:24:14 UTC, Michael V. Franklin wrote: On Thursday, 24 August 2017 at 19:21:31 UTC, Walter Bright wrote: [...] Great! I look forward to seeing improvements and hope to help. [...] i believe that should

Re: D as a Better C

2017-08-25 Thread Mengu via Digitalmars-d-announce
On Friday, 25 August 2017 at 00:24:14 UTC, Michael V. Franklin wrote: On Thursday, 24 August 2017 at 19:21:31 UTC, Walter Bright wrote: [...] Great! I look forward to seeing improvements and hope to help. [...] i believe that should be an opt-out. what about newcomers? will they have to

Re: D as a Better C

2017-08-25 Thread Jolly James via Digitalmars-d-announce
On Friday, 25 August 2017 at 15:29:54 UTC, Swoorup Joshi wrote: On Friday, 25 August 2017 at 08:54:02 UTC, Kagamin wrote: On Thursday, 24 August 2017 at 19:09:58 UTC, Parke wrote: What is "intermediate D"? D with minimal runtime. 5 years later... D - BetterC++ (no gc) D - BetterJava (full

Re: D as a Better C

2017-08-25 Thread Parke via Digitalmars-d-announce
> On Thursday, 24 August 2017 at 19:09:58 UTC, Parke wrote: >> What is "intermediate D"? On Fri, Aug 25, 2017 at 1:54 AM, Kagamin via Digitalmars-d-announce wrote: > D with minimal runtime. Is there any documentation on how to access and use the minimal

Re: D as a Better C

2017-08-25 Thread Swoorup Joshi via Digitalmars-d-announce
On Friday, 25 August 2017 at 08:54:02 UTC, Kagamin wrote: On Thursday, 24 August 2017 at 19:09:58 UTC, Parke wrote: What is "intermediate D"? D with minimal runtime. 5 years later... D - BetterC++ (no gc) D - BetterJava (full on gc + other goodie tissue) D - BetterRust (full

Re: D as a Better C

2017-08-25 Thread Basile B. via Digitalmars-d-announce
On Friday, 25 August 2017 at 10:01:25 UTC, Basile B. wrote: On Friday, 25 August 2017 at 09:50:39 UTC, Suliman wrote: On Friday, 25 August 2017 at 08:54:02 UTC, Kagamin wrote: On Thursday, 24 August 2017 at 19:09:58 UTC, Parke wrote: What is "intermediate D"? D with minimal runtime. How

Re: D as a Better C

2017-08-25 Thread Basile B. via Digitalmars-d-announce
On Friday, 25 August 2017 at 09:50:39 UTC, Suliman wrote: On Friday, 25 August 2017 at 08:54:02 UTC, Kagamin wrote: On Thursday, 24 August 2017 at 19:09:58 UTC, Parke wrote: What is "intermediate D"? D with minimal runtime. How to pass to dub -betterC flag? { ... "dflags" :

Re: D as a Better C

2017-08-25 Thread Suliman via Digitalmars-d-announce
On Friday, 25 August 2017 at 08:54:02 UTC, Kagamin wrote: On Thursday, 24 August 2017 at 19:09:58 UTC, Parke wrote: What is "intermediate D"? D with minimal runtime. How to pass to dub -betterC flag?

Re: D as a Better C

2017-08-25 Thread Kagamin via Digitalmars-d-announce
On Thursday, 24 August 2017 at 19:09:58 UTC, Parke wrote: What is "intermediate D"? D with minimal runtime.

Re: D as a Better C

2017-08-24 Thread Michael V. Franklin via Digitalmars-d-announce
On Thursday, 24 August 2017 at 19:21:31 UTC, Walter Bright wrote: On 8/24/2017 11:56 AM, Walter Bright wrote: I find -betterC to be somewhat of a copout for avoiding the hard work of improving D's implementation. On the contrary, I view it as providing motivation for dealing with those

Re: D as a Better C

2017-08-24 Thread Michael V. Franklin via Digitalmars-d-announce
On Thursday, 24 August 2017 at 18:26:37 UTC, H. S. Teoh wrote: For instance, a D project targeting STM board, makes heavy use of classes and templates, resultant code segment is 3k. https://github.com/JinShil/stm32f42_discovery_demo#the-good To be fair, though, the above-mentioned project

Re: D as a Better C

2017-08-24 Thread jmh530 via Digitalmars-d-announce
On Thursday, 24 August 2017 at 18:56:25 UTC, Walter Bright wrote: There is a PR to make it only on demand, https://github.com/dlang/dmd/pull/6561 but it is mired in problems that are not in the D test suite and for which no test cases exist. C++ compilers also have a switch, like

Re: D as a Better C

2017-08-24 Thread Walter Bright via Digitalmars-d-announce
On 8/24/2017 11:56 AM, Walter Bright wrote: I find -betterC to be somewhat of a copout for avoiding the hard work of improving D's implementation. On the contrary, I view it as providing motivation for dealing with those issues. The PR above is stalled for lack of motivation. -betterC also

Re: D as a Better C

2017-08-24 Thread Parke via Digitalmars-d-announce
On Wed, Aug 23, 2017 at 10:17 AM, Kagamin via Digitalmars-d-announce wrote: > Not a better C, but intermediate D has small footprint for me too. What is "intermediate D"? -Parke > 7.5kb totext.exe (encodes stdin to base64 and writes to stdout) - wrote it >

Re: D as a Better C

2017-08-24 Thread 12345swordy via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 13:12:04 UTC, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm personally happy to see the love this feature is

Re: D as a Better C

2017-08-24 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 5:35 PM, Michael V. Franklin wrote: Consider this:  Rust doesn't need a special switch to make it interoperable with C.  What's wrong with D's implementation that requires such things?  Granted, D is not Rust, but D's implementation could be improved to make it more competitive

Re: D as a Better C

2017-08-24 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Aug 24, 2017 at 08:13:29PM +0200, Iain Buclaw via Digitalmars-d-announce wrote: [...] > The GDC camp concurs with the sentiment of betterC being a waste of > time. My particular stance on the matter is that it should not be an > all or nothing switch, granular control is fine. The

Re: D as a Better C

2017-08-24 Thread Iain Buclaw via Digitalmars-d-announce
On 23 August 2017 at 19:44, Jonathan M Davis via Digitalmars-d-announce wrote: > On Wednesday, August 23, 2017 13:12:04 Mike Parker via Digitalmars-d- > announce wrote: >> To coincide with the improvements to -betterC in the upcoming DMD >> 2.076, Walter has

Re: D as a Better C

2017-08-24 Thread twkrimm via Digitalmars-d-announce
On Thursday, 24 August 2017 at 03:31:02 UTC, Swoorup Joshi wrote: On Wednesday, 23 August 2017 at 17:44:31 UTC, Jonathan M Davis wrote: On Wednesday, August 23, 2017 13:12:04 Mike Parker via Digitalmars-d- announce wrote: [...] I confess that I tend to think of betterC as a waste of time.

Re: D as a Better C

2017-08-24 Thread Jacob Carlborg via Digitalmars-d-announce
On 2017-08-24 02:55, H. S. Teoh via Digitalmars-d-announce wrote: One thing that would help is if things like TypeInfo, ModuleInfo, etc., are only emitted on-demand I think that would be quite difficult if we want to keep all the existing features. Combining separate compilation, runtime

Re: D as a Better C

2017-08-24 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 17:43:27 UTC, Steven Schveighoffer wrote: I thought "closure" means allocating the stack onto the heap so you can return the delegate with its context intact. I understood closure as capture of variables from external context. They are divided into upward

Re: D as a Better C

2017-08-24 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 22:45:27 UTC, sarn wrote: I haven't tried the latest iteration of betterC yet, but the longstanding problem is that the compiler generates TypeInfo instances for structs LDC doesn't generate TypeInfo for structs until it's required for some features like array

Re: D as a Better C

2017-08-23 Thread Swoorup Joshi via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 17:44:31 UTC, Jonathan M Davis wrote: On Wednesday, August 23, 2017 13:12:04 Mike Parker via Digitalmars-d- announce wrote: [...] I confess that I tend to think of betterC as a waste of time. Clearly, there are folks who find it useful, but it loses so much

Re: D as a Better C

2017-08-23 Thread 9il via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 13:12:04 UTC, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm personally happy to see the love this feature is

Re: D as a Better C

2017-08-23 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Aug 24, 2017 at 12:35:22AM +, Michael V. Franklin via Digitalmars-d-announce wrote: [...] > Consider this: Rust doesn't need a special switch to make it > interoperable with C. What's wrong with D's implementation that > requires such things? Granted, D is not Rust, but D's

Re: D as a Better C

2017-08-23 Thread Michael V. Franklin via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 17:44:31 UTC, Jonathan M Davis wrote: I confess that I tend to think of betterC as a waste of time. Clearly, there are folks who find it useful, but it loses so much that I see no point in using it for anything unless I have no choice. As long as attempts to

Re: D as a Better C

2017-08-23 Thread sarn via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 17:44:31 UTC, Jonathan M Davis wrote: I confess that I tend to think of betterC as a waste of time. The overwhelming majority of programmers don't need betterC. At all. But today we live in a world where practically everything just builds on top of C, and we

Re: D as a Better C

2017-08-23 Thread sarn via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 16:17:57 UTC, SrMordred wrote: No structs in -betterC ??? I haven't tried the latest iteration of betterC yet, but the longstanding problem is that the compiler generates TypeInfo instances for structs, and TypeInfos are classes, which inherit from Object,

Re: D as a Better C

2017-08-23 Thread Moritz Maxeiner via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 17:43:27 UTC, Steven Schveighoffer wrote: On 8/23/17 11:59 AM, Walter Bright wrote: On 8/23/2017 7:37 AM, Steven Schveighoffer wrote: How do dynamic closures work without the GC? They don't allocate the closure on the GC heap. (Or do I have static/dynamic

Re: D as a Better C

2017-08-23 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 17:39:00 UTC, Walter Bright wrote: On 8/23/2017 10:26 AM, jmh530 wrote: Am I correct that betterC requires main to be extern(C) and must act like a C main (i.e. no void return)? Yes. This might be added to http://dlang.org/dmd-windows.html#switch-betterC or

Re: D as a Better C

2017-08-23 Thread Steven Schveighoffer via Digitalmars-d-announce
On 8/23/17 11:59 AM, Walter Bright wrote: On 8/23/2017 7:37 AM, Steven Schveighoffer wrote: How do dynamic closures work without the GC? They don't allocate the closure on the GC heap. (Or do I have static/dynamic closures backwards?) I thought "closure" means allocating the stack onto the

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 10:17 AM, Kagamin wrote: Also how assert failure works in C? It calls the C assert failure function.

Re: D as a Better C

2017-08-23 Thread Jonathan M Davis via Digitalmars-d-announce
On Wednesday, August 23, 2017 13:12:04 Mike Parker via Digitalmars-d- announce wrote: > To coincide with the improvements to -betterC in the upcoming DMD > 2.076, Walter has published a new article on the D blog about > what it is and why to use it. A fun read. And I'm personally > happy to see

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 10:26 AM, jmh530 wrote: Am I correct that betterC requires main to be extern(C) and must act like a C main (i.e. no void return)? Yes. Is that something that can be changed in the future? Yes, but I don't see a need for it.

Re: D as a Better C

2017-08-23 Thread Steven Schveighoffer via Digitalmars-d-announce
On 8/23/17 11:52 AM, Walter Bright wrote: On 8/23/2017 7:24 AM, Steven Schveighoffer wrote: Looks like there are some outstanding requests to be fulfilled before it's pulled. I don't agree that the requests improve matters. You may want to mention that in the PR. Right now it just looks

Re: D as a Better C

2017-08-23 Thread Steven Schveighoffer via Digitalmars-d-announce
On 8/23/17 11:56 AM, Walter Bright wrote: On 8/23/2017 7:10 AM, Steven Schveighoffer wrote: Nope. A ModuleInfo is generated, as well as FMB/FM/FME sections. Those sections may not work with the C runtime. My point was simply that your small example doesn't cause any runtime or link time

Re: D as a Better C

2017-08-23 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 14:01:30 UTC, jmh530 wrote: Great piece. It might be useful to beef up the documentation on some of the things that betterC changes. For instance, here http://dlang.org/dmd-windows.html#switch-betterC links to TypeInfo, which has like one line of explanation

Re: D as a Better C

2017-08-23 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 14:00:34 UTC, Walter Bright wrote: One of the reasons people use C is to get that small footprint. This has been a large barrier to C programs making use of D. Not a better C, but intermediate D has small footprint for me too. 7.5kb totext.exe (encodes stdin to

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 6:12 AM, Mike Parker wrote: The blog: https://dlang.org/blog/2017/08/23/d-as-a-better-c/ Reddit: https://www.reddit.com/r/programming/comments/6viswu/d_as_a_better_c/ Now on the front page of news.ycombinator.com !

Re: D as a Better C

2017-08-23 Thread XavierAP via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 13:12:04 UTC, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. I like this concept of "upward compatibility," -- although opposed to

Re: D as a Better C

2017-08-23 Thread via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 16:17:57 UTC, SrMordred wrote: On Wednesday, 23 August 2017 at 15:53:11 UTC, Walter Bright wrote: On 8/23/2017 7:10 AM, Steven Schveighoffer wrote: It's only if you do something that needs the runtime, such as static ctors, or use the GC. Or use asserts, or

Re: D as a Better C

2017-08-23 Thread SrMordred via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 15:53:11 UTC, Walter Bright wrote: On 8/23/2017 7:10 AM, Steven Schveighoffer wrote: It's only if you do something that needs the runtime, such as static ctors, or use the GC. Or use asserts, or even declare a struct. No structs in -betterC ???

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 7:37 AM, Steven Schveighoffer wrote: How do dynamic closures work without the GC? They don't allocate the closure on the GC heap. (Or do I have static/dynamic closures backwards?)

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 8:05 AM, John Colvin wrote: "D polymorphic classes will not, as they rely on the garbage collector." They do? Don't have to allocate classes on the GC heap. Using them without the GC is a fairly advanced technique, and I don't want to deal with people writing: C c = new

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 7:10 AM, Steven Schveighoffer wrote: Nope. A ModuleInfo is generated, as well as FMB/FM/FME sections. Those sections may not work with the C runtime.

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 7:10 AM, Steven Schveighoffer wrote: It's only if you do something that needs the runtime, such as static ctors, or use the GC. Or use asserts, or even declare a struct.

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 7:24 AM, Steven Schveighoffer wrote: Looks like there are some outstanding requests to be fulfilled before it's pulled. I don't agree that the requests improve matters.

Re: D as a Better C

2017-08-23 Thread Moritz Maxeiner via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 15:17:31 UTC, Moritz Maxeiner wrote: On Wednesday, 23 August 2017 at 14:37:19 UTC, Steven Schveighoffer wrote: On 8/23/17 9:12 AM, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on

Re: D as a Better C

2017-08-23 Thread yawniek via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 13:12:04 UTC, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm personally happy to see the love this feature is

Re: D as a Better C

2017-08-23 Thread Moritz Maxeiner via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 14:37:19 UTC, Steven Schveighoffer wrote: On 8/23/17 9:12 AM, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm

Re: D as a Better C

2017-08-23 Thread John Colvin via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 13:12:04 UTC, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm personally happy to see the love this feature is

Re: D as a Better C

2017-08-23 Thread Steven Schveighoffer via Digitalmars-d-announce
On 8/23/17 9:12 AM, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm personally happy to see the love this feature is getting. I have a project

Re: D as a Better C

2017-08-23 Thread Moritz Maxeiner via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 14:00:34 UTC, Walter Bright wrote: On 8/23/2017 6:28 AM, Moritz Maxeiner wrote: I've been mixing C and full D for a while now (on Linux) by either having the main C program call rt_init/rt_term directly (if druntime is linked in when building a mixed C/D

Re: D as a Better C

2017-08-23 Thread Steven Schveighoffer via Digitalmars-d-announce
On 8/23/17 10:11 AM, Walter Bright wrote: On 8/23/2017 7:01 AM, jmh530 wrote: ModuleInfo isn't linked to at all (and I'm still a little unclear on what that does). That's because ModuleInfo doesn't appear in the online documentation due to having a malformed Ddoc comment. I fixed it here:

Re: D as a Better C

2017-08-23 Thread Meta via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 14:01:30 UTC, jmh530 wrote: On Wednesday, 23 August 2017 at 13:12:04 UTC, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read.

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 7:01 AM, jmh530 wrote: ModuleInfo isn't linked to at all (and I'm still a little unclear on what that does). That's because ModuleInfo doesn't appear in the online documentation due to having a malformed Ddoc comment. I fixed it here:

Re: D as a Better C

2017-08-23 Thread Steven Schveighoffer via Digitalmars-d-announce
On 8/23/17 10:00 AM, Walter Bright wrote: On 8/23/2017 6:28 AM, Moritz Maxeiner wrote: Interesting article, though one thing that I'm confused by is Hence D libraries remain inaccessible to C programs, and chimera programs (a mix of C and D) are not practical. One cannot pragmatically “try

Re: D as a Better C

2017-08-23 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 13:12:04 UTC, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm personally happy to see the love this feature is

Re: D as a Better C

2017-08-23 Thread Walter Bright via Digitalmars-d-announce
On 8/23/2017 6:28 AM, Moritz Maxeiner wrote: Interesting article, though one thing that I'm confused by is Hence D libraries remain inaccessible to C programs, and chimera programs (a mix of C and D) are not practical. One cannot pragmatically “try out” D by add D modules to an existing C

Re: D as a Better C

2017-08-23 Thread Moritz Maxeiner via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 13:12:04 UTC, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm personally happy to see the love this feature is