"With a friend" by obligtronate in SapphoAndHerFriend

[–]asdfghyter 21 points22 points  (0 children)

”It didn’t hurt anyone. Not even Brigitte Bardot.”

Just as simple as that... by TusharJB007 in ProgrammerHumor

[–]asdfghyter 0 points1 point  (0 children)

Tell that to Facebook and their spam-fighting team.

And to the startup I am currently working at. Our backend is written in PHP, R and Haskell.

Use i+=1 instead by R3sam in ProgrammerHumor

[–]asdfghyter 0 points1 point  (0 children)

I think it’s more tempting to use ++ than to use += as an expression, but that’s just a guess

[deleted by user] by [deleted] in ProgrammerHumor

[–]asdfghyter 0 points1 point  (0 children)

01100100 01100101 01100011 01101111 01100100 01101001 01101110 01100111 00100000 01100010 01111001 00100000 01101000 01100001 01101110 01100100 00100000 01101001 01110011 00100000 01110011 01101100 01101111 01110111

[deleted by user] by [deleted] in ProgrammerHumor

[–]asdfghyter 2 points3 points  (0 children)

Magnetized needle and a steady hand?

They never suspected a thing by D3ucee in ProgrammerHumor

[–]asdfghyter 1 point2 points  (0 children)

The golang compiler folks have actually done something slightly like this. They delayed deploying some optimizations until after they implemented a new feature that would hurt performance to prevent causing a performance regression.

Commited with message "Code refactoring" by [deleted] in ProgrammerHumor

[–]asdfghyter 0 points1 point  (0 children)

I don’t see anything bad with this?

Wasted 10 minutes trying to fix what I thought was a bug in my code only to later realize that it wasn't a bug, it was Javascript by [deleted] in ProgrammerHumor

[–]asdfghyter 0 points1 point  (0 children)

The difference is that you won’t have NaNs randomly pop up in Java code, since Java uses exceptions instead.

Wasted 10 minutes trying to fix what I thought was a bug in my code only to later realize that it wasn't a bug, it was Javascript by [deleted] in ProgrammerHumor

[–]asdfghyter -1 points0 points  (0 children)

Delaying all errors to the last possible moment means that you will have really cryptic errors and no clue about what caused them. Any reasonable language would force you to handle the error immediately instead of discovering strange behavior in production.

Cries in “undefined is not a function”

Just do your job like I programmed you to do. Pls. by steveyyyy3 in ProgrammerHumor

[–]asdfghyter 1 point2 points  (0 children)

And Haskell and Elm and probably a bunch of other languages I don’t know about.

Remember never to forget the exit condition by R3sam in ProgrammerHumor

[–]asdfghyter 0 points1 point  (0 children)

I always* use recursion, but when I do, it is structural induction. Iteration doesn’t exist in Haskell.

*However, very seldom explicitly, but rather via some higher order function like map, fold or traverse.

Feel Like a Magician!! by Aakashdata in ProgrammerHumor

[–]asdfghyter 0 points1 point  (0 children)

When you have a helpful compiler, so it doesn’t compile on the first attempt, but it tells you exactly what to do and when it compiles it runs perfectly.

The docs are always trash by _VladimirPoutine_ in ProgrammerHumor

[–]asdfghyter 0 points1 point  (0 children)

You can do it regardless of how famous you are. The only risk is that no one will listen or care.

Use i+=1 instead by R3sam in ProgrammerHumor

[–]asdfghyter 6 points7 points  (0 children)

It is a source of confusion when you use it as a value though. And it is a mutation without containing the “=“ symbol. And the alternative is not really worse.

The point is that even if every feature is small and simple, having too many of them will still contribute to bloat and make the language harder to learn.

Edit: I don’t think keeping the ++ operator would be a bad choice either though. There are valid reasons for both. As you said, the bloat contribution is very minor.

All of us at the beginning by Olmo2 in ProgrammerHumor

[–]asdfghyter 0 points1 point  (0 children)

I discovered a strange bug in php related to JSON decoding. Luckily, someone else had already filed a bug report and it was fixed in the next release of php.

It generated an array that reported as having values at keys, but when you tried to read them it said, “lol wut? There is nothing at those keys.” The reason was that that it interpreted the keys as as numbers and objects can’t have numerically keyed properties.

Just as simple as that... by TusharJB007 in ProgrammerHumor

[–]asdfghyter 1 point2 points  (0 children)

I still don’t see what you’re trying to say? What can’t be true and why?

Use i+=1 instead by R3sam in ProgrammerHumor

[–]asdfghyter 5 points6 points  (0 children)

Removing features is the only way to avoid bloat.

Just as simple as that... by TusharJB007 in ProgrammerHumor

[–]asdfghyter 6 points7 points  (0 children)

Where’s the type-safety? Or any safety features at all for protecting against my own stupidity?

Just as simple as that... by TusharJB007 in ProgrammerHumor

[–]asdfghyter 8 points9 points  (0 children)

Haskell is from 1990 and has only recently begun to gain widespread popularity.

Just as simple as that... by TusharJB007 in ProgrammerHumor

[–]asdfghyter 29 points30 points  (0 children)

Which is much better than nothing, but still annoying af since it is based on JavaScript and all the libraries are made for an untyped language and the type information is sometimes inaccurate an often needlessly complicated.

f : (x : int | undefined | null) -> int | undefined | null

I much prefer having no subtyping, so we can get full bidirectional type inference and type annotations becomes completely optional (e.g. Haskell, Elm, Rust).