HackerTrans
トップ新着トレンドコメント過去質問紹介求人

dabitude

no profile record

コメント

dabitude
·4 年前·議論
In schools, there is a lot of violence and aggressivity. Kids hit, lie, steal, call names, harass. When two kids are fighting, they frequently are both punished even if actually one was only defending themselves and was in the right. Sometimes the whole class is punished for the misbehaving of a few.

We would not accept being treated like this as adults, but yet we have no problems putting our kids through this.
dabitude
·4 年前·議論
These are flat_map, flat_set, flat_hash_map, etc ...

See: https://en.cppreference.com/w/cpp/header/flat_map
dabitude
·5 年前·議論
I work without exceptions, and the typical solution is to crash the whole program (using assert) if the parameter is invalid. This way you can preserve the invariant.

To avoid crashing, the caller has to validate the parameters before calling the constructor, and handle the invalid parameters at this time rather than in the exception handler, but in the end it's the same.
dabitude
·5 年前·議論
You are not allowed to submit a web browser to the app store with your own javascript interpreter.
dabitude
·5 年前·議論
Are real numbers uniformly spaced? Or are there clusters?