What are the worst parts of D?

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 25 14:50:21 PDT 2014


On Thu, Sep 25, 2014 at 08:40:50PM +0000, eles via Digitalmars-d wrote:
> On Thursday, 25 September 2014 at 15:58:11 UTC, eles wrote:
> >On Thursday, 25 September 2014 at 13:50:10 UTC, Jacob Carlborg wrote:
> >>On 25/09/14 09:38, Atila Neves wrote:
> >>
> 
> >Andrei spoke about an idiom that they constantly use at Facebok,
> >because there aparrently nobody runs *main and unittests*. So they
> >keep a special empty main for the -unittest version.
> 
> This idiom here:
> 
> http://forum.dlang.org/post/ljr5n7$1leb$1@digitalmars.com
> 
> "Last but not least, virtually nobody I know runs unittests and then
> main. This is quickly becoming an idiom:
> 
> version(unittest) void main() {}
> else void main()
> {
>    ...
> }
> 
> I think it's time to change that. We could do it the
> non-backward-compatible way by redefining -unittest to instruct the
> compiler to not run main. Or we could define another flag such as
> -unittest-only and then deprecate the existing one.

Please don't deprecate the current -unittest. I regularly find it very
useful when in the code-compile-test cycle. I'm OK with introducing
-unittest-only for people who want it, but I still like using the
current -unittest.


T

-- 
Making non-nullable pointers is just plugging one hole in a cheese grater. -- Walter Bright


More information about the Digitalmars-d mailing list