www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - betterC current consequences

reply Amorphorious <Amorphorious gmail.com> writes:
The docs states

Consequences
As no Druntime is available, many D features won't work. For 
example:

     Garbage Collection
     Thread-local storage
     TypeInfo and ModuleInfo
     Classes
     Built-in threading (e.g. core.thread)
     Dynamic arrays (but not slices) and associative arrays
     Exceptions
     switch with strings
     final switch
     synchronized and core.sync
     Static module constructors or deconstructors
     Struct deconstructors
     unittest (testing can be as usual with the -betterC flag)

The predefined version D_BetterC can be used for conditional 
compilation.

Are each of these still valid statements?

Also, is the GC os independent? I see there is an os module for 
the gc, but does it require the os for any particular reason?
Dec 24 2017
parent rikki cattermole <rikki cattermole.co.nz> writes:
On 24/12/2017 10:02 AM, Amorphorious wrote:
 The docs states
 
 Consequences
 As no Druntime is available, many D features won't work. For example:
 
      Garbage Collection
      Thread-local storage
      TypeInfo and ModuleInfo
      Classes
      Built-in threading (e.g. core.thread)
      Dynamic arrays (but not slices) and associative arrays
      Exceptions
      switch with strings
      final switch
      synchronized and core.sync
      Static module constructors or deconstructors
      Struct deconstructors
      unittest (testing can be as usual with the -betterC flag)
 
 The predefined version D_BetterC can be used for conditional compilation.
 
 Are each of these still valid statements?
 
 Also, is the GC os independent? I see there is an os module for the gc, 
 but does it require the os for any particular reason?
It requires druntime for threading and TLS support. Which are both tied to the compiler and OS.
Dec 24 2017