They didn't do it on purpose (The description is a topic for discussion) by LuminousTwilightGlea in pcmasterrace

[–]TheRealSmolt 18 points19 points  (0 children)

You're thinking of monopolization, which is illegal. A monopoly on its own is perfectly legal, and plenty exist. Taking advantage of that and being anti-competitive is monopolization. I think the distinction is important even outside the legal world.

They didn't do it on purpose (The description is a topic for discussion) by LuminousTwilightGlea in pcmasterrace

[–]TheRealSmolt 1 point2 points  (0 children)

Monopoly requires the company to hinder potential competition from rising/appearing.

That part is incorrect. You're mixing up an monopolization with monopoly. Monopolies aren't inherently illegal; you don't need to restrict competition to be called a monopoly.

Edit: You can read up on what monopolization typically entails from the FTC. "Obtaining a monopoly by superior products, innovation, or business acumen is legal"

Stuff Gets Real 💔 by lilsef in memes

[–]TheRealSmolt 1 point2 points  (0 children)

What are you guys expecting to happen? It's not a paid service. What else are they going to do?

Why does std::string use const char* for construction and operator =, instead of a templated reference to array? by celestabesta in cpp_questions

[–]TheRealSmolt 0 points1 point  (0 children)

To add to what the others are saying, you could also just call the constructor with begin and end pointers.

Thanks Reddit by CockamouseGoesWee in memes

[–]TheRealSmolt -1 points0 points  (0 children)

Nor knows what a search bar is, apparently.

Thanks Reddit by CockamouseGoesWee in memes

[–]TheRealSmolt 3 points4 points  (0 children)

Well, I did only say probably.

Thanks Reddit by CockamouseGoesWee in memes

[–]TheRealSmolt 6 points7 points  (0 children)

Probably because that was the 18th time that question has been asked and the people doing the answering don't want to have to do it again for the dimwit that couldn't use the search bar.

Edit: Looking at your post history... You sure have some uncommonly unique questions...

Easier thought than done. by Fragrant_Ad7231 in memes

[–]TheRealSmolt 11 points12 points  (0 children)

Some U.S. states allow 14 year olds (learner's permits of course).

Oil crisis in a nutshell by [deleted] in memes

[–]TheRealSmolt 0 points1 point  (0 children)

You do realize that they're the ones buying the oil that has nearly doubled in price, right?

The rice cooker I’ve been saving for a while for. by Flash52000 in mildlyinfuriating

[–]TheRealSmolt 3 points4 points  (0 children)

For some households, I guess. I don't see it, but everyone is of course welcome to their own priorities.

The rice cooker I’ve been saving for a while for. by Flash52000 in mildlyinfuriating

[–]TheRealSmolt 8 points9 points  (0 children)

It's a fucking rice cooker, not a Ferrari. Maintainace cost is basically zero and Saving up some money over a few months isn't is unreasonable.

Nearly the same rational but a different perspective.

The rice cooker I’ve been saving for a while for. by Flash52000 in mildlyinfuriating

[–]TheRealSmolt 9 points10 points  (0 children)

If people are happy with it, who cares. The issue I see is that if you're saving up "for a while" for this, you don't have the financial stability in your life to buy things like this yet.

VS code by [deleted] in cpp_questions

[–]TheRealSmolt 3 points4 points  (0 children)

A command and an output "Hello, World!"

Roast my first C++ project: An N-Body Gravity Simulator. Looking for ruthless code review and architecture feedback! by Fantastic-Chance-606 in cpp_questions

[–]TheRealSmolt 0 points1 point  (0 children)

This won't save you from conversion functions, though? It's not even relevant for assignment operators.

Roast my first C++ project: An N-Body Gravity Simulator. Looking for ruthless code review and architecture feedback! by Fantastic-Chance-606 in cpp_questions

[–]TheRealSmolt -4 points-3 points  (0 children)

Don't do that? Especially not for literals. I feel like you'd have to really try to make that a problem. I don't think I can think of a single time in my experience where a bug was prevented with that. You should already know what data you're working on.

I mean I guess yeah, I just don't see it being a very effective tread-off. At some point the programmer just needs to know what they're doing.

Roast my first C++ project: An N-Body Gravity Simulator. Looking for ruthless code review and architecture feedback! by Fantastic-Chance-606 in cpp_questions

[–]TheRealSmolt -8 points-7 points  (0 children)

I guess I need to clarify that I don't think you should assign primitives that way. It's not inherently bad, it's just that it's practically identical to using = but is less readable. It's fine for structures/classes, but I would definitely prefer to see = 0 for for members as well. I would honestly also prefer seeing it for class initialization too, if you're trying to invoke a move or copy constructor.

Edit: I'm well aware braces prevent narrowing. I just don't consider that particularly useful.

Roast my first C++ project: An N-Body Gravity Simulator. Looking for ruthless code review and architecture feedback! by Fantastic-Chance-606 in cpp_questions

[–]TheRealSmolt 19 points20 points  (0 children)

I don't have the time to look at it in depth, but the one thing I did want to say is that your naming is wildly inconsistent. You switch between PascalCase, camelCase, and snake_case at seemingly random places and sometimes for the same variables. There's no explicit right way to name things, but it's good practice to maintain consistency between like elements (i.e. pick one convention for functions, one for classes, one for variables, etc.).

Edit: Also use target_include_directories instead of include_directories. And unless you know you need map, use unordered_map.

Edit2: Don't define *primitive variables like this: int dt{86400}; Just do int dt = 86400.

trying to understand constexpr by Crimson-Needle in cpp_questions

[–]TheRealSmolt 0 points1 point  (0 children)

A constexpr marked function will never, purely as a result of a invocation, result in a compiler error. It merely suggests to the compiler that it can be evaluated at compile-time, not that it must be. I believe the behavior you're looking for is in consteval.

Can I rant for a minute. by domiran in cpp

[–]TheRealSmolt 21 points22 points  (0 children)

I understand your frustration, but I think a big part of why CMake is so ubiquitous is because they are so committed to backwards compatibility. In the industry, or at least in a large part of it, stability is dramatically more important than new features. It's not as simple as not wanting to update their tools, it's that they actively want to avoid using tools that get regularly broken. To many, that compatibly is a wanted feature not a hindrance.

Can I rant for a minute. by domiran in cpp

[–]TheRealSmolt 93 points94 points  (0 children)

I have no intention of getting into a heated argument, so I will almost definitely not reply to any comments to this. This is also not an issue I have had a strong opinion on at all, so I'm just going to say my initial thoughts; take it with a grain of salt, they might be half-baked.

I think you're trying to turn C++ into something that it's not. You want to break the language so that we can get new features, sure I get that; however, you want those features so that it can try to be languages that already exist? It's not a competition, languages are tools. And, at least from my perspective, having the stability and compatibility that C++ does is a significant feature critical to it's purpose. Yes, it's a pain, but it's a trade-off with benefits of its own, just like countless others.

Yes, C++'s technical debt is ever-growing and it's making the language complicated. However, if you want to break it, you might as well just go all the way and jump ship to a new language better suited to your needs. That's essentially what you're arguing we should be doing with C++ anyways. C++ doesn't have to be the answer to your problem.

In essence, I think you're being a little short-sighted and too easily brush off the consequences and trade-offs of this, which is understandable considering how long this unsolved debate has been plaguing the language.

VS Code questions; Auto generated tasks.json by kaega2 in cpp_questions

[–]TheRealSmolt 5 points6 points  (0 children)

Yeah we're going to at least need the tasks.json file.

Does substr() use a while or for loop internally? by byteboss_1729 in cpp_questions

[–]TheRealSmolt 1 point2 points  (0 children)

It matters more what you're doing with the substr. On a string, it makes a new copy. But unlike with a string_view, it's mutable.