George Yang on Nostr: Few things to remember about Swift macros: - Macros are executed in compile time, ...
Few things to remember about Swift macros:
- Macros are executed in compile time, whereas property wrappers are execute in runtime.
- Macros with hash sign are freestanding, and macros with at sign are attached to something.
- In Xcode 15, highlight a macro and right-click to select Expand Macro in the contextual menu to see the expanded form.
#Swift #iOSDev
Published at
2023-06-15 19:05:17Event JSON
{
"id": "29988ccde6e10d6872ead01071110528e838911c3a097e15101e378f367bc8cf",
"pubkey": "41ed0e4c0b18b8c463ff1939695df40a56958b3213636f1ea160e4b9550ca27c",
"created_at": 1686855917,
"kind": 1,
"tags": [
[
"t",
"iosdev"
],
[
"t",
"swift"
],
[
"mostr",
"https://mstdn.social/users/gxgyang/statuses/110549789424799389"
]
],
"content": "Few things to remember about Swift macros:\n\n- Macros are executed in compile time, whereas property wrappers are execute in runtime.\n- Macros with hash sign are freestanding, and macros with at sign are attached to something.\n- In Xcode 15, highlight a macro and right-click to select Expand Macro in the contextual menu to see the expanded form.\n\n#Swift #iOSDev",
"sig": "bdeb72a94e904e5c82f14dbe90689fafdf85920b49216161fb17a176e2f9fa4cb65325b52a22c5c90559e227106be12deda13612ae1b0b66dccbfe6f53b505c0"
}