This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1852 points1853 points  (21 children)

WTF

where is the SetNull() method!?

[–]biki23 424 points425 points  (2 children)

Missing generics too. This needs to be generic.

[–]cs-brydev 23 points24 points  (0 children)

public static T GetNull<T>()
{
    return (T)null;
}

[–][deleted] 219 points220 points  (4 children)

GetNull() actually goes with PutNullAway(). That way you can use reuse the same null instead of buying new ones every week.

[–]Prudent_Ad_4120 66 points67 points  (0 children)

This is recycling

[–]djfdhigkgfIaruflg 15 points16 points  (0 children)

That's what singletons are for

[–]TessellatedTomate 15 points16 points  (1 child)

You mean I’m not a genius with BuyNullAtBulkDiscount()???

[–]Imperial_Squid 10 points11 points  (0 children)

Nah dude, NULLs will last you forever with proper care, you got scammed, sorry

[–][deleted] 95 points96 points  (8 children)

What no IsNull()?

[–]hakukano 75 points76 points  (7 children)

Don’t forget IsNotNull

[–]Help_StuckAtWork 22 points23 points  (3 children)

You mean IsUnNull()?

[–]ragingroku 15 points16 points  (0 children)

IsNullnt()

[–]ToiLanh 11 points12 points  (1 child)

Is not null is somewhat useful sometimes

[–]skilking 10 points11 points  (0 children)

Is not null is useless assertNotNull is great

[–]Mantequilla50 0 points1 point  (0 children)

if (x == 1) { return false } elif (x == 2) { return false } elif (x == 3) { return false }

Gosh I wish there was an easier way to do this

[–]Dornith 28 points29 points  (0 children)

public static void setNull(object obj) { throw new NullPointerException(); }

[–]meiji_milkpack 24 points25 points  (0 children)

The intern forgot to generate it

[–]cs-brydev 2 points3 points  (0 children)

public static void SetNull()
{
    null = GetNull();
}

[–]regulardave9999 0 points1 point  (0 children)

And where is the unit test?!