C++ Point3D Alignment Chart
struct Point3D { std::array<float, 3> data; }; LAWFUL GOOD using Point3D = std::array<float, 3>; NEUTRAL GOOD using Point3DBase = std::array<float, 3>; struct Point3D : private Point3DBase { using Point3DBase::array; using Point3DBase::operator[]; }; CHAOTIC GOOD struct Point3D { float data[3]; }; LAWFUL NEUTRAL struct Point3D { float x; float y; float z; }; TRUE NEUTRAL union Point3D { float data[3]; struct { float x; float y; float z; }; }; CHAOTIC NEUTRAL struct Point3D : std::tuple<float, float, float> {}; LAWFUL EVIL using Point3D = std::tuple<float, float, float>; NEUTRAL EVIL union Point3D { std::pair<float, std::pair<float, float>> right; std::pair<std::pair<float, float>, float> left; }; CHAOTIC EVIL
Это шуточная таблица мировоззрений, где девять способов представить трёхмерную точку в C++ распределены от lawful good до chaotic evil. Шутка в том, что степень «добра» и «хаоса» определяется стилем и изобретательностью структуры данных, а не моралью. Мем отправляют программистам как реакцию на спор о правильном или чрезмерно сложном дизайне кода. EN: This is a humorous alignment chart in which nine ways to represent a three-dimensional point in C++ are arranged from lawful good to chaotic evil. The joke is that the degree of “goodness” and “chaos” is determined by the style and ingenuity of the data structure rather than morality. People send it as a reaction to debates about proper or unnecessarily complicated code design.
alignment chart / таблица мировоззренийcode snippets / фрагменты кодаC++ programming language / язык программирования C++three-dimensional point / трёхмерная точкаarray / массивstruct / структураunion / объединениеtuple / кортежpair / параcolored frames / цветные рамкиblack background / чёрный фонtext labels / текстовые подписиsource code / исходный код
- @ithueti / 6179 2022-05-04
- @right_wing_dev_squads / 7880 2023-10-21
- Template
- Alignment Chart
- Type
- image
- Size
- 800×641 · 71.4 KiB
- Mood
- саркастичный, абсурдный
- Language
- en
- Added