digitalmars.D.learn - What does the -betterC switch in dmd do?
- TheFlyingFiddle (6/6) Nov 12 2015 The description in dmd help says: omit generating some runtime
- Justin Whear (5/12) Nov 12 2015 I believe the purpose of the switch is to help folks who are trying to
- Jacob Carlborg (7/11) Nov 15 2015 I'm pretty sure that the only things that are excluded are module info
- Meta (2/6) Nov 15 2015 Don't those features require type info?
- Jacob Carlborg (5/6) Nov 16 2015 Hmm, now that you mention it. I expected the compiler to give an error
- Mike (12/16) Nov 16 2015 In my experience, the only thing removed by -betterC is the
The description in dmd help says: omit generating some runtime information and helper functions. What runtime information are we talking about here? My understanding is that it's basically an experimental feature but when (if) completed what subset of the language would still be usable?
Nov 12 2015
On Thu, 12 Nov 2015 19:37:41 +0000, TheFlyingFiddle wrote:The description in dmd help says: omit generating some runtime information and helper functions. What runtime information are we talking about here? My understanding is that it's basically an experimental feature but when (if) completed what subset of the language would still be usable?I believe the purpose of the switch is to help folks who are trying to write for bare or embedded systems by not emitting references to the D runtime library and runtime module information. Whether it actually does that in its current implementation is another question.
Nov 12 2015
On 2015-11-12 23:24, Justin Whear wrote:I believe the purpose of the switch is to help folks who are trying to write for bare or embedded systems by not emitting references to the D runtime library and runtime module information. Whether it actually does that in its current implementation is another question.I'm pretty sure that the only things that are excluded are module info and type info. It's still possible to use "new" and all the array features that requires support in the runtime (slicing, concatenation, appending and so on). -- /Jacob Carlborg
Nov 15 2015
On Sunday, 15 November 2015 at 15:34:19 UTC, Jacob Carlborg wrote:I'm pretty sure that the only things that are excluded are module info and type info. It's still possible to use "new" and all the array features that requires support in the runtime (slicing, concatenation, appending and so on).Don't those features require type info?
Nov 15 2015
On 2015-11-16 01:27, Meta wrote:Don't those features require type info?Hmm, now that you mention it. I expected the compiler to give an error as soon as the D runtime was referenced, but that's at least not the case. -- /Jacob Carlborg
Nov 16 2015
On Sunday, 15 November 2015 at 15:34:19 UTC, Jacob Carlborg wrote:I'm pretty sure that the only things that are excluded are module info and type info. It's still possible to use "new" and all the array features that requires support in the runtime (slicing, concatenation, appending and so on).In my experience, the only thing removed by -betterC is the ModuleInfo [1] However, there is a pending pull request to remove TypeInfo also [2] I don't think it was every fully implemented to the author's intention, and I'm not sure if it ever will be [3] Mike [1] http://forum.dlang.org/post/mailman.273.1386260316.3242.d.gnu puremagic.com [2] https://github.com/D-Programming-Language/dmd/pull/5105 [3] http://forum.dlang.org/thread/lddug4$jgv$1 digitalmars.com
Nov 16 2015