6 ms·
I mean, being a bit glib here, but a lot of programming is dealing with someone else's type system. Moreover, for those of us who write C fairly often, the mne
by colejhudson 3y ago
I mean, being a bit glib here, but a lot of programming is dealing with someone else's type system.
Moreover, for those of us who write C fairly often, the mnemonics here are familiar.
Actually, as custom type systems go, this one is pretty elegant. Reminds me of Rust.
- kristopolous 3y agoSpeaking of type systems, I read glib as g-lib a few times and tried to understand how you were talking about the GNU lib in that sentence.
- zombot 3y agoWouldn't that have to be `glibc`?
- slondr 3y agohttps://en.wikipedia.org/wiki/GLib?wprov=sfti1 https://en.wikipedia.org/wiki/GLib?wprov=sfti1
- zombot 3y agoI see. Thanks for that link!
- wyldfire 3y agoIt is unfortunate that the two have such similar names because there's a lot of room for confusion. It doesn't help that they have somewhat adjacent functionality almost.
- userbinator 3y agoI did too. Humans use context to resolve ambiguities in language, and in this case the context was very much statistically favouring the library; if you're using it, glib is literally "someone else's type system".
- oaiey 3y agoYeah but not for basic types. Also, most code mingles sooner or later with other code. Than this is just ugly.
- circuit10 3y agoIt’s better than dealing with needlessly long type names like uint32_t though
- oaiey 3y agoNo. It would be better if the standardization groups would have done that, but not when every developer has a different scheme
- circuit10 3y agoIt’s not great but they’re just aliases so they’re interchangeable, which means you can keep everything consistent within a project and it won’t cause any problems when interacting with outside code
- lelanthran 3y agoUntil you include a header written by someone with the same opinion, and now you get compile errors because they both defined 'u8'. I gotta be honest, all of those style suggestions look good until you try them in a non-solo and non-isolated project, and then you see what a mess you created. We've all been there, as C programmers, and we've all done that in the past, which is why we don't do it anymore
- circuit10 3y agoUnless they were defined to completely different types, that shouldn’t be an error
- lelanthran 3y ago
- deleted 3y ago[deleted]