Post #1933089
2026-05-03 23:27 UTC
Replies (8)
-
@typeswitch@gamedev.lgbt 2026-05-03 23:42
"C doesn't have iterators-- (Part 2)" https://godbolt.org/z/nWM1x8roz
-
@andnull@social.nouveau.community 2026-05-03 23:38
@typeswitch this is kinda fire tho,,, Sometimes I wish I had access to C macros in Lua (without 3rd party support of course).
-
@cinnamon@mk.absturztau.be 2026-05-04 00:20
@typeswitch@gamedev.lgbt "C doesn't have Coroutines" (Spoiler: It has, but you (generic you) aren't ready for the horrors of their implementation) https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
-
@mc@mathstodon.xyz 2026-05-04 06:01
@typeswitch based
-
@SRAZKVT@tech.lgbt 2026-05-04 06:17
@typeswitch those aren't things i'd use because they hurt readability, you'd need to check definition (usually will be out of view, perhaps even on another file) of macro and how it applies in your code but yes you can make horrors with the preprocessor
-
@astraleureka@social.treehouse.systems 2026-05-04 06:18
@typeswitch i'm not even mad
-
@tfb@functional.cafe 2026-05-04 08:14
@typeswitch revises my opinion I guess C shouldn't have iterators 😹
-
@Fiona@blahaj.zone 2026-05-04 08:41
@typeswitch@gamedev.lgbt Edit: Scratch that. They did officially add it in C23, in a pointlessly incompatible way with C++... Why? I am quite certain that typeof is an unstandardized extension, so no, this doesn't work in C. That said, pointers are definitionally iterators according to C++'s definition if the term, so it's less an issue of not having them, than of lacking the language support to make their use nice.