Basic question about size_t and ulong

H. S. Teoh hsteoh at
Tue Mar 22 21:23:43 UTC 2022

On Tue, Mar 22, 2022 at 09:11:00PM +0000, Era Scarecrow via Digitalmars-d-learn wrote:
> I'd almost wish D had a more lenient mode and would do automatic
> down-casting, then complain if it *would* have failed to downcast data
> at runtime.

We already have this:

	import std.conv : to;
	int x;
	long y;
	y =!long;	// equivalent to straight assignment / cast
	x =!int;	// throws if out of range for int


Gone Chopin. Bach in a minuet.
I see that you JS got Bach.

More information about the Digitalmars-d-learn mailing list