[GSoC 2025] Questions and findings to Re-implement property wrappers with macros

As I am not that familiar with the way we handle things at a compiler level and any sort of lamen directions for me to get started on the codebase would be much appreciated. I have mostly worked with app development level code and finding it a bit tough to understand some of the terminologies and navigating the codebase on my device to understand the larger scope of the project.

While going through the codebase and tying to get a better understanding of the Property Wrappers proposal

@xedin if you could be please help me answer a few queries I had encountered on what problems are we tying to solve from this at a base level :

  • How might macro-based property wrappers improve compile-time performance compared to the current implementation?

  • What are the trade-offs between declarative syntax (current property wrappers) versus procedural macro generation?

  • Could we simplify the initialization patterns to reduce boilerplate code in common scenarios?

  • Is there a way to optimize accessor method generation to avoid unnecessary indirection?

after going through some "good first issus" regarding the property wrappers i was able to contribute to the External property wrappers don't play well with variadic parameters problem and found out how we can either manually Wrap Values Inside the Function

For example :

func foo(_ numbers: Int...) {
    let wrappedNumbers = numbers.map { Wrapper(wrappedValue: $0) }
    print(wrappedNumbers.map { $0.wrappedValue }) // Extract wrapped values
}

but this approach can introduce implicit behavior that is not immediately obvious

Thus needed some direction as to how can i modify the compiler directly and re-implement property wrappers using macros.

2 Likes