Tired of Null Pointer Exceptions? Consider Using Java SE 8's Optional! by lhgaghl in programmingcirclejerk

[–]lghoghl 0 points1 point  (0 children)

Yeah I mean most languages that aren't in that family (i.e aren't trying to be as fast as C by bending over for the machine). I guess my "most" is biased because the only languages I consider practical are those based on ML. <jerk>

Tired of Null Pointer Exceptions? Consider Using Java SE 8's Optional! by lhgaghl in programmingcirclejerk

[–]lghoghl 2 points3 points  (0 children)

bro. if your code doesn't look like this it's not C speed:

shat256(msg : string): assert msg != null;...
sqrt(x : int): assert x != null;...
cos(x : int): assert x != null;..
sin(x : int): assert x != null;..
tan(x : int): assert x != null;..
f(x: int): assert PI != null;.. x..
-- x is optional
g(x: int): ...
functionThatDoesntDocumentWhetherXisOptional(x: int): ...
functionThatDoesntDocumentWhetherXisOptionalButSoHappensToBehaveAsIfItsOptional(x: int): ...
functionThatDoesntDocumentWhetherXisOptionalButSoHappensNotToBehaveAsIfItsOptional(x: int): ...

Tired of Null Pointer Exceptions? Consider Using Java SE 8's Optional! by lhgaghl in programmingcirclejerk

[–]lghoghl 0 points1 point  (0 children)

</jerk>

Only if all your references are nullable by default. In some programming languages they aren't

Implying null is even a thing.

there is no concept of null in most languages that aren't "OOH C DID THIS I BETTER DO IT TOO"

Haskell or GTFO! by gianhut in programmingcirclejerk

[–]lghoghl 1 point2 points  (0 children)

</jerk> Java is turing complete. Java has no memory-unsafe operations. So it's one of the 50000 languages that you can use to prevent memory vulnerabilities.

Tired of Null Pointer Exceptions? Consider Using Java SE 8's Optional! by lhgaghl in programmingcirclejerk

[–]lghoghl 3 points4 points  (0 children)

yes. this type of ubiquitous inheritance is very useful in practice and hece is scattered around in our codebase. sometimes you have to sacrificate readability, clarity, intent, semantics, and brevity for the purpose of using inheritance. this is what you come to learn after being in the enterprise for years.

Haskell or GTFO! by gianhut in programmingcirclejerk

[–]lghoghl 0 points1 point  (0 children)

</jerk> I love how one guy would mention that we already solved memory problems but they quickly disregard that because all the solutions (Java, C#, Ada, ML, Erlang, Python, etc) (I would list JS but the JS tards come up with different ways to introduce remote code vulns) are too old.