Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

An innovative new STL with unlockable features, such as:

std::vector: $5

std::string: $15

std::map: $30

std::unordered_map: $100



std::cout << std::vector<char>{'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '\0'}.data() << std::endl;

I'm too cheap to pay triple the price for a little bit of convenience.


static const char StringLiteral[] = "hello world";

std::vector<char> Derp;

Derp.resize(sizeof StringLiteral);

memcpy(Derp.data(), StringLiteral, sizeof StringLiteral);


Actually some historic IBM computers were like that. You leased them and could pay more to enable some instructions on the processor.


Those are per-month, I assume. Subscriptions are all the rage in software these days.


> std::unordered_map: $100

+ in-template purchases for every specialization of std::hash for user type.


There's also a new version with renamed methods every year, and some of the methods move to other libraries in the middle of the project.


Is that a pay-to-Win32 library?


And occasional loot crates containing optimizations?


Just get std::map. You can get std::vector<int> if you do std::map<int, int>


That's prevented by kernel-mode anti-cheat that's statically linked into the runtime.


Yikes for allocating all your elements separately, and with 400% - 700% memory overhead.


Correction: $5/month


That's just funny.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: