Dynamic Arrays in C++

Dynamic Arrays in C++
The standard Go toolchain comes with an assembler out of the box. Said assembler is highly idiosyncratic, using syntax inherited from Plan 9 and choosing its own names for platform-specific instructions and registers. But it's great to have it readily available. More mundanely, Go comes with a garbage collector. This post explains how to make these two components play nice, if we want to manipulate Go pointers from our assembly.
Ah, the joys of #generics in #C. I really love C, but of course it does have some "defects", one of them being the need to use #void #pointers for everything generic, which then leads to such silly bugs no compiler can ever catch ....
https://github.com/Zirias/poser/commit/449110dacb6249a50e8dd6a8976891508bb0c0b6
To react on subject
I never abbreviate functions; I want to read them all so that when I read back the programming code in a month a year or 10 years it still makes sense to me without reading my remarks
C++OnSea 2025 SESSION ANNOUNCEMENT: Smart Pointers, Dumb Mistakes by Khushboo Verma
https://cpponsea.uk/2025/session/smart-pointers-dumb-mistakes
Register now at https://cpponsea.uk/tickets/
C++OnSea 2025 SESSION ANNOUNCEMENT: Smart Pointers, Dumb Mistakes by Khushboo Verma
https://cpponsea.uk/2025/session/smart-pointers-dumb-mistakes
Register now at https://cpponsea.uk/tickets/
I would claim that I'm *very* experienced with #programming in #C. But still, C gets annoyingly weird when it comes to #pointers *to* #arrays.
Does the following code look sober to you? 🤔 (My compiler doesn't complain)
Especially interested in the highlighted line, but also the block above trying to expand the array ...
Context: I started work on a generic/configurable rate-limiter to add to #swad.
Code-Maze author Konstantinos Polychronopoulos writes a good overview of memory pointers in C#, including the caveats, and their limited but still important use cases (mostly having to do with optimizing large array data manipulation and access, and interacting with unmanaged code e.g., C, C++, and others.)
"How to Use Pointers in C#"
Stupid Smart Pointers in C
http://blog.kevinalbs.com/stupid_smart_pointers
#HackerNews #Stupid #Smart #Pointers #in #C #C #Programming #SmartPointers #SoftwareDevelopment #HackerNews