<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/expression-based-programming-for-better-code---jason-turner---ndc-toronto-2026-2luzwezez" -->

---
title: Expression-based Programming for Better Code? - Jason...
description: Jason Turner presents the concept of expression-based programming, primarily through C++ examples but applicable to most languages. The core idea is to treat...
canonical: https://daily.dev/posts/expression-based-programming-for-better-code---jason-turner---ndc-toronto-2026-2luzwezez
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Expression-based Programming for Better Code? - Jason Turner - NDC Toronto 2026 | daily.dev
og:description: Jason Turner presents the concept of expression-based programming, primarily through C++ examples but applicable to most languages. The core idea is to treat...
og:url: https://daily.dev/posts/expression-based-programming-for-better-code---jason-turner---ndc-toronto-2026-2luzwezez
og:image: https://api.daily.dev/og/posts/2LUZwEZeZ.png
og:image:alt: Expression-based Programming for Better Code? - Jason Turner - NDC Toronto 2026
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Expression-based Programming for Better Code? - Jason Turner - NDC Toronto 2026

**[NDC Conferences](https://daily.dev/sources/ndc)** · 60 min read · 0 upvotes · 0 comments

## Summary

Jason Turner presents the concept of expression-based programming, primarily through C++ examples but applicable to most languages. The core idea is to treat imperative control flow statements (if, switch, for loops) as expressions by ensuring every control path returns a value. This approach leverages Return Value Optimization (RVO/NRVO), reduces unnecessary copies and assignments, naturally limits function size, and leads to cleaner code. The talk covers RVO mechanics, tail call elimination, and practical refactoring of a real infix expression evaluator project that resulted in 25 fewer lines of code. Key takeaways include: treat switch/if as expressions with all paths returning, use functions/lambdas for each control statement, avoid break in favor of return, and let the compiler handle inlining decisions.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=iPIm5tS0Pxk>

## Similar posts on daily.dev

- [C\+\+ Insights Episode 77: RVO, NRVO, std::move EXPLAINED](https://daily.dev/posts/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e) · Andreas Fertig · 0 upvotes · 0 comments
- [Control structures in programming languages From goto to algebraic effects](https://daily.dev/posts/control-structures-in-programming-languages-from-goto-to-algebraic-effects-q2pg3wwhr) · Lobsters · 0 upvotes · 0 comments
- [Expression Trees as a Reflection Alternative in C\#: When to Switch](https://daily.dev/posts/expression-trees-as-a-reflection-alternative-in-c-when-to-switch-xi1rcodvd) · We Are .NET · 3 upvotes · 0 comments

---

Tags: [#c++](https://daily.dev/tags/c++)

[View this post on daily.dev](https://daily.dev/posts/expression-based-programming-for-better-code---jason-turner---ndc-toronto-2026-2luzwezez)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Expression-based Programming for Better Code? - Jason Turner - NDC Toronto 2026","url":"https://daily.dev/posts/expression-based-programming-for-better-code---jason-turner---ndc-toronto-2026-2luzwezez","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/expression-based-programming-for-better-code---jason-turner---ndc-toronto-2026-2luzwezez"},"datePublished":"2026-07-23T10:32:42.397Z","dateModified":"2026-07-23T10:58:31.167Z","description":"Jason Turner presents the concept of expression-based programming, primarily through C++ examples but applicable to most languages. The core idea is to treat...","image":"https://i.ytimg.com/vi/iPIm5tS0Pxk/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/iPIm5tS0Pxk/sddefault.jpg","isAccessibleForFree":true,"articleSection":"NDC Conferences","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"NDC Conferences","logo":"https://media.daily.dev/image/upload/s--SiIyojEj--/f_auto/v1748760369/logos/ndc","url":"https://daily.dev/sources/ndc"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/expression-based-programming-for-better-code---jason-turner---ndc-toronto-2026-2luzwezez","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c++","timeRequired":"PT60M","video":{"@type":"VideoObject","name":"Expression-based Programming for Better Code? - Jason Turner - NDC Toronto 2026","description":"Jason Turner presents the concept of expression-based programming, primarily through C++ examples but applicable to most languages. The core idea is to treat...","thumbnailUrl":"https://i.ytimg.com/vi/iPIm5tS0Pxk/sddefault.jpg","uploadDate":"2026-07-23T10:32:42.397Z","duration":"PT60M","url":"https://api.daily.dev/r/2LUZwEZeZ","embedUrl":"https://www.youtube.com/embed/iPIm5tS0Pxk"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"NDC Conferences","item":"https://daily.dev/sources/ndc"},{"@type":"ListItem","position":3,"name":"Expression-based Programming for Better Code? - Jason Turner - NDC Toronto 2026"}]}
```

