Having trouble reading this email? View it in your browser.
New This Week

The Case of the Vanishing Bodies

The Case of the Vanishing Bodies is an introduction to the magic of freestanding and attached Swift Macros. You'll learn to create a variety of macros. You'll get a feel for when you should and shouldn't create them, which sort of macro you should create, and how to use SwiftSyntax to implement them.

Recently Released:

 

Best Sellers:

Make sure you haven't missed anything!

  1. High Performance PostgreSQL for Rails
  2. Pragmatic Unit Testing in Java with JUnit, Third Edition
  3. Rails Scales!
  4. Programming Phoenix LiveView
  5. The Pragmatic Programmer, 20th Anniversary Edition

See all best sellers...

The Case of the Vanishing Bodies
August 01, 2024

The Case of the Vanishing Bodies: An Introduction to Swift Macros

The Case of the Vanishing Bodies is an introduction to the magic of freestanding and attached Swift Macros.

There's a fair amount of boilerplate code involved in so many of our everyday tasks as Swift programmers. Until Xcode 15, every time we created a new SwiftUI View we had to create the corresponding preview code. The struct and computed property weren't interesting in any way—they were just a necessary task we needed to perform to display a preview of our View. With the introduction of the #Preview macro, we now only need to provide the code required to create an instance of the view being displayed.

In this book you'll learn to create a variety of macros. You'll get a feel for when you should and shouldn't create them, which sort of macro you should create, and how to use SwiftSyntax to implement them. Your macros will accept parameters when appropriate and will always include tests. You'll even learn to create helpful diagnostics for your macros and even FixIts.

Now available from pragprog.com/titles/d-dsbodies.

This work was written and produced entirely by the author. We are proud to be distributing it.

Want to Write Something? Share What You Know

From paperbacks and ebooks to online courses and beyond, if you want to create technical content, we may be your perfect partner.

Leverage our 20+ years of experience, our global distribution network, our massive fan base, our relationships with industry leaders, our editorial, production, and marketing prowess, and even our reputation for excellence. Sure, you could go it alone, but with some of the highest royalties in all of traditional publishing and your own personal team, why would you bother?

Shoot us an email at proposals@pragprog.com or visit pragprog.com/publish-with-us for more details today.

Let's publish something together!

Upcoming Author Appearances

  • 2024-08-01 Michael Fazio, THAT Conference, Wisconsin Dells, WI
  • 2024-08-01 Andy Atkinson, Madison Ruby, Madison, WI, USA
  • 2024-08-01 Paolo Perrotta, Madison+ Ruby
  • 2024-08-15 Johanna Rothman, Get Budget for Anything (livestream)
  • 2024-09-03 Johanna Rothman, Non-Fiction Writing Workshop: Free Your Inner Writer (online workshop)
  • 2024-09-05 Leemay Nassery, LeadDev NYC
  • 2024-09-11 Dave Thomas, EuRuKo, Sarajevo, Bosnia and Herzegovina
  • 2024-09-12 Johanna Rothman, Boston Java Users ACM Chapter (formerly NEJUG)
  • 2024-09-13 Dave Thomas, EuRuKo 2024, Sarajevo
  • Be the First

    Sign up for this newsletter at https://pragprog.com/newsletter/ and be the first to hear about our newest content, best promotions, and upcoming events.

    Want even more? Follow @pragprog on Twitter and The Pragmatic Programmers on LinkedIn for commentary, news, job openings, and even puzzles.

    And, if you want, you can see what Dave Thomas (@pragdave) is up to.

    Thanks for your continued support,

    By Professional Developers, for Professional Developers
    PragProg.com

    Sent by the Pragmatic Programmers, LLC. • PO Box 271356 • Flower Mound TX 75027