#cleancode#dryprinciple#kevlinhenney
How many returns should a function have
25K subscribers • 12 videos on Hallway
- Recommended by 3 people: 3 in engineering communities.
- An opinion. It argues one side of a question engineers disagree on.
Beginner. No background in the topic needed.
7.6K views11 months ago3 recommendations
Software designProgramming languagesDesign patternsRefactoring and legacy codeSimplicity and complexity
An exploration of Kevlin Henney's perspective on the return statement and why the single-return rule is often misleading.
#SoftwareEngineering #ProgrammingTips #CleanCode #CodeQuality #CompilerOptimizations #SoftwareMyths #BestPractices #techhistory Boost your coding skills by joining Scrimba: scrimba.com?via=DevToolsMadeSimple n this video, we go over Kevlin Henney's take on the return statement — why it does two jobs at once and why the “single return” rule can be misleading. We use this as a lens to explore other programming “best practices” that are now outdated: Avoiding duplication at all costs (DRY) Limiting function name length to early compiler limits High-level languages not being suitable for performance-critical code Manual optimizations that compilers already handle We also tie in lessons from history, like AI winters and evolving hardware, to show how context matters. Software rules that made sense decades ago may actively hurt your code today. Kevlin Henney’s perspective reminds developers to question assumptions and adapt to modern tools and languages. Which programming rules do you think are outdated? Share in the comments!Why it's here
3 people recommend thisWhat people say. Linked as a discussion starter on whether functions should have single or multiple return statements.
u/South-Reception-1251in r/compsci • Recommends
u/MinimumMagician5302in r/typescript • Recommends
u/South-Reception-1251in r/softwarearchitecture • Recommends
u/South-Reception-1251in r/ProgrammingLanguages • Recommends
u/Majestic_Citron_768in r/C_Programming • Recommends
u/South-Reception-1251in r/Kotlin • Recommends
u/MinimumMagician5302in r/Kotlin • Recommends
u/MinimumMagician5302in r/dotnet • Recommends
u/South-Reception-1251in r/scala • Recommends
u/MinimumMagician5302in r/Frontend • Recommends