this post was submitted on 08 Jul 2023
136 points (93.0% liked)
Programmer Humor
19589 readers
589 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I never got to like implicit anything.
Not even returns. Ever.
You get used to it pretty quickly. After a while you wonder how you ever lives without it. Explicit returns feel like ending an
if
withendif
. The end of the conditional's scope is implied by the end of the block by}
or whatever.Doing everything explicitly can get to be annoying, especially when it comes to what you had to do before without Vulkan's VK_EXT_shader_object.
It's clear that some stuff should be implicit - most types in programming languages, for example; needing to specify a struct type and then the struct itself can be annoying - and other stuff explicit, like low level operations.
Returns are something that usually fall into that "implicit" category. Why should I do
let a = function(); return a;
when I can just dofunction()
? It's shorter, simpler, and I don't waste keystrokes.