digitalmars.D.learn - What are the advantages of using betterC?
- Rempas (5/5) Jan 19 2021 Sorry if that's a stupid question but I've read
- Adam D. Ruppe (10/10) Jan 19 2021 betterC is a niche restricted feature set. If you don't already
- Rempas (3/13) Jan 19 2021 Oh ok! So there is not advantage from using it like faster
- Imperatorn (2/19) Jan 19 2021 Not really
- Adam D. Ruppe (6/8) Jan 19 2021 The default betterC build will compile about a quarter second
- Rempas (2/10) Jan 19 2021 Totally agree! It doesn't worth it! Thanks a lot for the info man!
Sorry if that's a stupid question but I've read [this](https://dlang.org/spec/betterc.html) post that talks about betterC but I didn't understand where betterC is being used and what are the advantages it gives. Can anyone help me out with this?
Jan 19 2021
betterC is a niche restricted feature set. If you don't already have a use case in mind, I'd recommend avoiding it. It is for cases where you're stuck with certain limitations to integrate with the outside world. Like running on peculiar hardware or interoperating with certain outside programs where you can't initialize the runtime properly (and even then, you might be better off going with a custom minimal runtime over the betterC prepackaged restrictions). Some libraries try to be compatible with it so they can be used in those special cases too, but you probably don't need it.
Jan 19 2021
On Tuesday, 19 January 2021 at 17:40:52 UTC, Adam D. Ruppe wrote:betterC is a niche restricted feature set. If you don't already have a use case in mind, I'd recommend avoiding it. It is for cases where you're stuck with certain limitations to integrate with the outside world. Like running on peculiar hardware or interoperating with certain outside programs where you can't initialize the runtime properly (and even then, you might be better off going with a custom minimal runtime over the betterC prepackaged restrictions). Some libraries try to be compatible with it so they can be used in those special cases too, but you probably don't need it.Oh ok! So there is not advantage from using it like faster compile time, better performance etc. right?
Jan 19 2021
On Tuesday, 19 January 2021 at 17:44:03 UTC, Rempas wrote:On Tuesday, 19 January 2021 at 17:40:52 UTC, Adam D. Ruppe wrote:Not reallybetterC is a niche restricted feature set. If you don't already have a use case in mind, I'd recommend avoiding it. It is for cases where you're stuck with certain limitations to integrate with the outside world. Like running on peculiar hardware or interoperating with certain outside programs where you can't initialize the runtime properly (and even then, you might be better off going with a custom minimal runtime over the betterC prepackaged restrictions). Some libraries try to be compatible with it so they can be used in those special cases too, but you probably don't need it.Oh ok! So there is not advantage from using it like faster compile time, better performance etc. right?
Jan 19 2021
On Tuesday, 19 January 2021 at 17:44:03 UTC, Rempas wrote:Oh ok! So there is not advantage from using it like faster compile time, better performance etc. right?The default betterC build will compile about a quarter second faster than the default normal D build, but runtime performance is always the same, and you can get that quicker build with normal D too if you customize your build a little. And besides a quarter second is prolly worth it to use full D...
Jan 19 2021
On Tuesday, 19 January 2021 at 18:04:42 UTC, Adam D. Ruppe wrote:On Tuesday, 19 January 2021 at 17:44:03 UTC, Rempas wrote:Totally agree! It doesn't worth it! Thanks a lot for the info man!Oh ok! So there is not advantage from using it like faster compile time, better performance etc. right?The default betterC build will compile about a quarter second faster than the default normal D build, but runtime performance is always the same, and you can get that quicker build with normal D too if you customize your build a little. And besides a quarter second is prolly worth it to use full D...
Jan 19 2021