3 ms·
Context is everything. If you come in the middle of a topic about declaring a bog-standard map and start discussing the subtleties of const, container design an
by blub 9y ago
Context is everything. If you come in the middle of a topic about declaring a bog-standard map and start discussing the subtleties of const, container design and the map implementation you will confound people and are frankly off-topic. :)
I mean the discussion was about declaring a simple map. In that context, it really is as easy as writing
const std::map<int, bool> map;
Go can't do that. C++ can do that. Seems pretty straightforward.
- humanrebar 9y agoThat's basically only useful as a stack variable, though, which was my point. Well, that and "immutable" in the context of C++ is misleading. It was on topic because I am saying the C++ boilerplate wouldn't really be better than the Go boilerplate. All the "out of context" details are basically my point. You need to know a lot of surprising things to C++ well.