[OT] Dear Google Cloud: Your Deprecation Policy is Killing You

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Aug 19 15:59:52 UTC 2020

On Wed, Aug 19, 2020 at 01:56:38PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
> On Wednesday, 19 August 2020 at 13:46:31 UTC, Andrei Alexandrescu wrote:
> > * We got rid of the dilemma between using a ton of casts among
> > integral sizes, and allowing lossy conversions. That also went over
> > very smoothly.
> Have you written much code using this? It is so painful outside the
> simple examples.
> The others are wins, but this leaves a LOT to be desired and is a
> frequent asked question with people coming from C too. I used to
> defend it but the more I use it, the more I hate it.

Yeah, this was a royal pain to work with. The fact that you cannot write

	ubyte b;
	b = -b;	// NG, no thanks to integer promotion rules

is a royal, royal pain in real-world code.  It essentially marginalizes
narrow ints into a pariah caste where everything has to be cast()'ed
(caste-ed :-P) just to please the nitpicky compiler, with no real gain
in code quality (it is already beyond obvious in the code that we are
working with narrow ints -- *everything* uses ubyte in that piece of
code so int promotion is nothing but a needless roadblock), increase in
verbosity, decrease in readability, and just death by a thousand needle
pricks all-round.

It was so annoying to work with that I wrote a nopromote.d module with
an infectious narrow int wrapper that forces non-promoting arithmetic,
just so I can write code without a hundred casts.

"Went over very smoothly" is a total mockery of the reality of the


That's not a bug; that's a feature!

More information about the Digitalmars-d mailing list