auto: useful, annoying or bad practice?
Kagamin
spam at here.lot
Thu May 17 11:38:13 UTC 2018
On Monday, 30 April 2018 at 21:11:07 UTC, Gerald wrote:
> I'll freely admit I haven't put a ton of thought into this post
> (never a good start), however I'm genuinely curious what
> people's feeling are with regards to the auto keyword.
I prefer types spelled as it helps to understand the code. In
javascript I have to look around to figure out types of variables
and then I can understand the code. In C# I saw surprising abuse
like `var id = 0L;` - to think someone would go to such length
only to insist on type inference.
In part this can be due to unreasonably difficult to spell types
like ptrdiff_t, so I try to design my code in a way that it's
easy to spell types.
More information about the Digitalmars-d
mailing list