Back to Browse

How many returns should a function have

7.0K views
Dec 7, 2025
4:13

#SoftwareEngineering #ProgrammingTips #CleanCode #CodeQuality #CompilerOptimizations #SoftwareMyths #BestPractices #techhistory Boost your coding skills by joining Scrimba: https://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!

Download

1 formats

Video Formats

360pmp48.7 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

How many returns should a function have | NatokHD