<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Traits on Home</title>
    <link>https://blog.rafaelfernandez.dev/tags/traits/</link>
    <description>Recent content in Traits on Home</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>© 2026 Rafael Fernandez</copyright>
    <lastBuildDate>Tue, 03 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.rafaelfernandez.dev/tags/traits/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Tagless Final is denotational semantics in disguise</title>
      <link>https://blog.rafaelfernandez.dev/posts/tagless-final-is-denotational-semantics/</link>
      <pubDate>Tue, 03 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/tagless-final-is-denotational-semantics/</guid>
      <description>Every trait in your hexagonal architecture is a tagless-final algebra. Every impl is an interpreter. You have been writing denotational semantics without knowing it. We trace the connection from Kiselyov&amp;rsquo;s paper through Scala&amp;rsquo;s Cats-Effect to Rust&amp;rsquo;s port traits, and show why the pattern that academics call &amp;lsquo;finally tagless&amp;rsquo; is the same pattern that practitioners call &amp;lsquo;dependency injection.&amp;rsquo;</description>
      
    </item>
    
    <item>
      <title>Syntax and Semantics 3. The Expression Problem</title>
      <link>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-3-the-expression-problem/</link>
      <pubDate>Sat, 07 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-3-the-expression-problem/</guid>
      <description>Adding a new type is easy in OOP, hard in FP. Adding a new operation is easy in FP, hard in OOP. Philip Wadler named this the Expression Problem in 1998. We show how it manifests in Rust and Scala, and tease the resolution.</description>
      
    </item>
    
    <item>
      <title>Syntax and Semantics 2: Three ways to define what your code means</title>
      <link>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-2-three-ways-to-define-meaning/</link>
      <pubDate>Tue, 03 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/syntax-and-semantics-2-three-ways-to-define-meaning/</guid>
      <description>Your match expression is operational semantics. Your pure function is denotational semantics. Rust&amp;rsquo;s borrow checker is axiomatic semantics. Three formal frameworks, three ways to assign meaning to code, and you have been using all of them without knowing it.</description>
      
    </item>
    
    <item>
      <title>Traits are grammars too: a small design lesson that kept nagging at me</title>
      <link>https://blog.rafaelfernandez.dev/posts/traits-are-grammars-too-from-contract-design-to-formal-syntax/</link>
      <pubDate>Wed, 28 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/traits-are-grammars-too-from-contract-design-to-formal-syntax/</guid>
      <description>While revisiting the TaskRepository trait from the Todo CLI series, I realized I was doing more than drawing an architectural boundary. I was also defining what could be said across that boundary, which is much closer to grammar than I first admitted.</description>
      
    </item>
    
    <item>
      <title>Todo CLI in Rust 3. JSON persistence, contract vs implementation</title>
      <link>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-3-json-persistence-contract-vs-implementation/</link>
      <pubDate>Thu, 15 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/todo-cli-rust-3-json-persistence-contract-vs-implementation/</guid>
      <description>Third part of the series: we define the persistence contract with a generic trait, implement two adapters (in-memory and JSON to disk), and delve into the difference between interface and implementation as the axis of hexagonal architecture.</description>
      
    </item>
    
    <item>
      <title>The Forge of Typeclasses 🔥</title>
      <link>https://blog.rafaelfernandez.dev/posts/the-forge-of-typeclasses/</link>
      <pubDate>Mon, 17 Mar 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/the-forge-of-typeclasses/</guid>
      <description>We explore in detail what typeclasses are, how to define them in Scala 2, and how they are implemented in other languages such as Haskell and Rust. Through practical examples, we demonstrate how to model behaviors clearly and scalably using this powerful design pattern in functional programming. We also discuss automatic derivation and the improvements Scala 3 brings to this area.</description>
      
    </item>
    
    <item>
      <title>One Typeclass to Rule Them All 🧙🏻‍♂️</title>
      <link>https://blog.rafaelfernandez.dev/posts/one-typeclass-to-rule-them-all/</link>
      <pubDate>Mon, 10 Mar 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/one-typeclass-to-rule-them-all/</guid>
      <description>We analyzed different functional pattern designs to address the abstraction of a functionality and its implementation.</description>
      
    </item>
    
    <item>
      <title>First Steps in Rust 🦀</title>
      <link>https://blog.rafaelfernandez.dev/posts/first-steps-in-rust/</link>
      <pubDate>Thu, 13 Feb 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.rafaelfernandez.dev/posts/first-steps-in-rust/</guid>
      <description>My first impressions of Rust from a functional programming background (Scala and Haskell). A mix of excitement, frustration, and a paradigm shift in thinking.</description>
      
    </item>
    
  </channel>
</rss>
