Fabulous Adventures In Coding
Eric Lippert is a principal developer on the C# compiler team. Learn more about Eric.
I was browsing the archive of design notes from the early days of the C# language the other day. Apparently whoever was editing the notes back then had a sense of humour. (UPDATE: It was Scott, just as I suspected.) I stumbled across this note from May 1999:
We considered a proposal to rename short, int, and long to short, tall, and grande. More thought on this issue is required; we will revisit this issue on Friday.
And yet the notes for the following Friday say nothing of it. Someone dropped the ball.
It’s not too late. I propose in the same vein that we rename float, double and decimal to singleshot, doubleshot and quadrupleshot. byte can be cappuccino. And of course the BigInteger in the new math library can be half double decaffeinated half-caf with a twist of lemon.
I think byte should be <b>Chocolate Covered Espresso Bean</b>
As long as you rename Nullable as Decaf, sure.
... and wouldn't this make C# look even more like Java?
Badoom-tsh! Someone had to say it.
This post is crying out for a Cup<T> joke, but I can't think of one that fits, dagnabbit.
You have to fit the waka waka gruntie three-quarter plasma no salt bundahoo somewhere.
Didn't you notice float is already named after a coffee drink?
I don't think they dropped the ball, this has the aroma of a feature that can be implemented by other language features. E.g., today you can easily grind out this C# code:
using doppio = System.Double;
static void Main(string args)
doppio pi = 3.14159;
So the unsigned integers would be ushort, utall and ugrande?
Such a pity this didn't get in. It could easily be that killer feature that'd get Java programmers to migrate in droves!
Why not single, double, and a martini?
If byte is a cappuccino, the I guess a bit is an espresso?
byte should be an espresso, sbyte would then be a machiato.
Nulllable<T> would be a coffee sleeve
char would be a chaiTeaLatte
IntPtr would be a Corretto
As benefits decimal's secretive, not really a primitive at all status I propose it to be a decaff
tall id = tall.Parse(idInput)
quadrupleshot salary = quadrupleshot.Parse(salaryInput);
catch (Frappuccino frap)
There she was just a-walkin' down the street, singin' "Do wah diddy diddy dum diddy do"
Snappin' her fingers and shufflin' her feet, singin' "Do wah diddy diddy dum diddy do"
She looked good (looked good), she looked fine (looked fine)
She looked good, she looked fine and I nearly lost my mind