scope keyword - a maintenance nightmare?

Radu radu.racariu at void.space
Fri Aug 17 11:57:33 PDT 2007


Guenther Brunthaler wrote:

> When I evaluated D some time ago, I found it very interesting and promising.
>
> I found its "Resource Acquisition Is Initialization" (RAII) paradigm especially appealing.
>
> It really looked like a good candidate for replacing C++ at that time.
>
> After toying around a couple of days with D, however, I found at least the following reasons why I chose *not* to use D, and rather stick with C++:
>
> * While the closed source Digital Mars compiler really created small and nice executables, the GCC-backend created executables multiple times that size
>
>   
strange, never tested myself but obviously it's a gdc problem not at D 
general problem
> * There is is no equivalent to MODULA 2s "Definition Modules". While I think it is a good idea to get rid of C++'s primitive "header" files, there must still be some means of separating interface descriptions from the actual code. Otherwise, you always have to ship the complete source code to anyone who just wants to use some interface as a client. Consider writing a plugin for OpenOffice.org that way...
>
>   
it is .di files that are a general description file (headers). you can 
generate them by using dmd -H command. problems still exist with 
templates (as with c++)
> * Maintenance-Nightmare with "auto" (now "scope").
>
>   
*very long read :)* anyhow scope classes are  indeed somehow strange to 
use and especially design as there is limited scope (no pun intended) on 
their usage. I for one use only the scope storage declaration for 
local+stack allocated classes.



More information about the Digitalmars-d mailing list