Conversation
Notices
-
Embed this notice
@NonPlayableClown @ins0mniak @Yoruka @lanodan There were some kind of baffling rules, Dijkstra's fault. Single-return was probably the most pernicious. They seem to stick around in some of these professors' heads.
-
Embed this notice
@p @Yoruka @ins0mniak @NonPlayableClown Single return?
Damn, I love early returns, in fact it's the one shit I horribly miss whenever I come back to Elixir.
-
Embed this notice
@lanodan @NonPlayableClown @Yoruka @ins0mniak Yeah, it was alleged that this would make control flow easier and functions more legible, but this is not remotely true. Pascal enforces it, if I recall correctly, or it at least used to. I don't know how they were convinced by the reasoning; guard clauses let you narrow the number of cases under consideration as you walk down the function, obviously easier to read and write.