Ancestors

Toot

Written by Jared Sinclair on 2024-11-02 at 16:44

@isaiah Help me remember something. I remember reading, or being told, that there were specific reasons to avoid, in Objective-C, providing a property named exactly id. Like, besides the way it creates human confusion as an exact match for the reserved keyword id, there was some reason (or reasons) beyond that which made it inadvisable to do so. I cannot recall the specific reasons anymore, and Google absolutely fails to find my answers. Can you recall what the specific reasons were?

=> More informations about this toot | More toots from jaredsinclair@mastodon.social

Descendants

Written by Jim Dusseau on 2024-11-02 at 17:38

@jaredsinclair @isaiah id alone doesn’t give the compiler any info about what messages the object conforms to, so can be a source of trouble if something changes. id is fine and common!

=> More informations about this toot | More toots from jimdusseau@mastodon.social

Written by Nick Lockwood on 2024-11-02 at 18:37

@jimdusseau @jaredsinclair @isaiah you're talking about using id as a type, but the question was about using id as property or method name

=> More informations about this toot | More toots from nicklockwood@mastodon.social

Written by Nick Lockwood on 2024-11-02 at 18:38

@jaredsinclair @isaiah I don't recall ever encountering any issue with doing it, except maybe that editors would highlight it as a keyword

=> More informations about this toot | More toots from nicklockwood@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113414363341490683
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
269.092977 milliseconds
Gemini-to-HTML Time
0.764432 milliseconds

This content has been proxied by September (ba2dc).