~/talk

Expression-based Programming for Better Code?

Talkat NDC Toronto 2026 · 2026-05-05..05-08· [functional-programming]
slides:none on file

Claim: treating statements like expressions and moving each control block into its own function yields smaller, clearer C++ code that leverages RVO/NRVO, tail call elimination and ranges/projections. Evidence: a real project (Infizz on GitHub) refactors a giant switch/while into per-case functions and lambdas, shaving about 25 lines and simplifying control flow. Tools and observations: inspection of GCC/Clang assembly, NRVO warnings, benchmarks showing similar binaries for idiomatic ranges, and caveats—undefined behavior risks, GCC sometimes misses NRVO, and tail calls depend on optimization flags.

AI-written summary · about

  1. 0:00Expression-based programming intro
  2. 10:00Return value optimization in C++
  3. 21:08Tail call elimination and recursion
  4. 30:09Expressions vs statements
  5. 37:44Switch and loops as expressions
  6. 51:03Refactoring control structures
  7. 59:55Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.