{"id":16597356,"url":"https://github.com/cbess/mymacros","last_synced_at":"2025-07-15T17:36:07.156Z","repository":{"id":141697631,"uuid":"2637719","full_name":"cbess/mymacros","owner":"cbess","description":"Helpful Objective-C/C++ macros","archived":false,"fork":false,"pushed_at":"2022-02-26T18:44:25.000Z","size":18,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T03:29:54.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbess.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-10-24T17:13:59.000Z","updated_at":"2022-02-26T18:44:28.000Z","dependencies_parsed_at":"2024-04-04T15:02:43.515Z","dependency_job_id":null,"html_url":"https://github.com/cbess/mymacros","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cbess/mymacros","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Fmymacros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Fmymacros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Fmymacros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Fmymacros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbess","download_url":"https://codeload.github.com/cbess/mymacros/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Fmymacros/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265450551,"owners_count":23767641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T23:55:35.964Z","updated_at":"2025-07-15T17:36:07.143Z","avatar_url":"https://github.com/cbess.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My Macros\n\nMacro making seems to be a dying or lost art form/practice. I hope to inspire some to take advantage of one of the original \"syntax candy\" paradigms.\n\nThese are just a few of the macros I have created to make code easier to read and implement.\n\n## Macro Tips\n\n- Macros are named based on how you want them to be used or perceived.\n\t- Use all caps if it starts a block and you have a separate macro that ends the block.\n\t- Use a function-like name if you want it to be used like a function or if you want it to look like a function (having little impact when expanded).\n\t\n- Macros should never have more than three parameters. If possible, keep it two or less, but three max.\n\t- It comes down to being consistent. You want your macro to be a shortcut, easier to remember and execute for the programmer. Adding several parameters now means the dev has a harder time committing the macro signature to memory. Two or less is the easiest.\n\t- The macro name should, as much as possible, imply the parameter(s) it expects (if any). It's much harder to do when you have several parameters.\n\t\n- Macros should try as much as possible to limit the impact of local variables. Meaning, don't add any local variables that are not expected/wanted by the dev.\n\t- A macro should avoid creating a global/local variable. It should use variables that are expected to be in scope.\n        - Use curly braces to confine macro vars to a scope: `({ local_macro_var = 'here'; })`\n\t\n- Don't abuse macroing. Meaning, don't turn an OOP langauge into a functional one by encapsulating to much functionality in macros.\n\t- Macros are not as descriptive as other OOP calls (example: Objective-C method signatures).\n\t- Macros are not very nice to real-time lexicon parsers. Some auto-complete engines have trouble with macros. Xcode expands them amazingly well, but barfs when using/typing macro parameters.\n\t- Don't use a macro when a static function can do the same thing and yield the same results. Functions play nicer with IDEs and are \"smarter.\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbess%2Fmymacros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbess%2Fmymacros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbess%2Fmymacros/lists"}