sorting failed error

maarten van damme maartenvd1994 at gmail.com
Mon Jul 30 11:29:03 PDT 2012


2012/7/30 bearophile <bearophileHUGS at lycos.com>:
> maarten van damme:
>
>
>> I really dislike contracts, they kind off blow your function up while
>> adding not that much. I'll add some unit tests.
>
>
> They make your programs more robust. Contracts are used to spot bugs in your
> code and not to validate data coming from the "outside world".
>
> As most other tools there are few ways to use them well, and many ways to
> use them badly. I suggest you to read about the meaning of Contract
> programming, so maybe you will learn to appreciate them.
>
> Bye,
> bearophile

I certainly will. Andrei's chapter didn't convince me but maybe
reading something more specialized to contract programming
specifically will convince me :)

About my pass-by-value problem, I am not used to working with structs,
I usually work with classes. That's why I completely forgot about
post-blit constructors... Still my sorting problem isn't sorted out.


More information about the Digitalmars-d-learn mailing list