Duolingo Carter Levin

How Duolingo used Macros to Promote MVVM architecture adoption

Original post How we used Macros to Promote MVVM architecture adoption

Article Summary

Carter Levin from Duolingo just eliminated 4,300 lines of boilerplate code that never needed to be written, reviewed, or tested. Here's how Swift Macros made their MVVM architecture adoption actually enjoyable for developers.

As Duolingo's iOS team scaled rapidly, their Client Architecture team faced pushback on new MVVM guidelines due to excessive boilerplate. Rather than compromise on architecture quality, they turned to Swift Macros to auto-generate repetitive DataSource implementations at compile time.

Key Takeaways

Critical Insight

Duolingo automated away thousands of lines of error-prone boilerplate while maintaining architecture standards, proving that Swift Macros can solve the adoption friction that kills good architectural decisions.

Continue reading

Their clever workaround for the 10-20 second build time penalty involves S3 buckets and a specific compiler flag most teams don't know about.

This page summarizes “How we used Macros to Promote MVVM architecture adoption” by Duolingo, published Jul 10, 2025. All credit for the original work goes to the authors.

Read the original on blog.duolingo.com (opens in new tab)

AI tools for iOS

Browse all AI tools →