Hacker Newsnew | past | comments | ask | show | jobs | submit | ThierryBuilds's commentslogin

C++ Has changed so much since C++11. It feels like it is picking features from every other language

I am curious to know what was the contribution of switching to FlatBuffers in that improvement.

FlatBuffers was definitely the majority of the improvements here!

On 64-bit systems, pointers themselves can really start to take up a lot of memory (especially if you multiply them across 100k+ adblock filters). Switching to array indices instead of pointers saves a lot of memory that's otherwise wasted when you don't need to address the entire possible memory space.


Insightful. Many thanks.

Flat buffers is know to bloat client code. Was any trick used to mitigate that?


The biggest improvement for us was deduplication by using generators an referencing already emitted objects. Don't run flatc on a JSON, it doesn't do that.

I guess code bloat is proportional to schema complexity, and performance improvement is proportional to volume, so in ad blocker with many large block lists the latter dominates.

Balancing developer satisfaction with raw productivity is a critical trade-off. While the 'joy of coding' maintains long-term engagement, LLMs provide a necessary lift in throughput. I prefer a surgical approach: disabling LLMs for core logic to avoid 'auto-pilot' bias, while utilizing them for the high-friction work of documentation and unit testing.

Nice Article. However I fail to understand how using the enum prevents the usage of the wrong index in a data structure. Can you explain further?

I guess you would need to cast the index to the enum or you get a type error, which should narrow down the possible error locations.

Thanks for your response. Wouldn't using the `_` in the enums somehow make almost all integers index "cartable" to the enums?

Yes, but you have to cast it explicitly. If you have two different arrays each with its own enum, the compiler would throw an error if you used the wrong one.

Sorry for the late response and happy new year!


Thanks for the clarification. Happy new year

Nice article. And the `Into` trick also accept &String


I’ve been using Go Expr for a while because it’s zero-dependency and fast, but I kept hitting walls that weren't obvious in the docs—like the fact that map keys in the script are treated as literals, or the "strict vs forgiving" difference between structs and maps.

I put together this deep dive into 10 specific gotchas to help others avoid the same debugging loops I got stuck in.


On a different note, the syntax for capacity hints of slices vs map can be confusing. m := make(map[string]string, 16) VS a := make([]string, 16)

They look similar but the second argument do not have the same meaning.

I got bitten by it in my early days of Go


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: