> if it was smart it would have figured out that the value never was initialized.
But that's false, which just goes to show that the compiler writers know way more about this than you do. There's nothing stopping this from being linked into a binary which doesn't even call main, or which calls NeverCalled, etc. And I bet you will also insist stamping your feet that of course programmers should be able to construct function pointers - to functions like, y'know, Never called - from arbitrary bit patterns. You know nothing, but you're convinced you know so much more than those stupid compiler writers.
>> if it was smart it would have figured out that the value never was initialized
> But that's false
Are you reading the same code the rest of us are? NeverCalled is never called. So Do is not explicitly initialized and therefore contains a null pointer because it's a static variable.
Now compiler writers wanted their benchmark scores better so instead of crashing the program when Do is called, which happens in the unoptimized version, they decided to play fast and loose with UB. They just made code vanish.
What I'm saying is that if the compiler can figure out that NeverCalled is actually called from somewhere then it's free to make these optimizations. But if it knows it's not called then it should either disable the optimization for that statement or better yet give a warning.
> There's nothing stopping this from being linked into a binary which doesn't even call main, or which calls NeverCalled, etc.
Which is why I called for Whole Program Optimization to solve that issue. Since it looks like you did not bother to find out what that is and how it would solve that issue I'll explain it here. In Whole Program Optimization the compile is pushed down to the link phase. This lets the compiler see the who program and apply optimizations globally instead of at a file by file bases. So it can tell if main is never called or if NeverCalled is called or not.
> And I bet you will also insist stamping your feet
Now you're attacking me instead of my arguments. Do you wish to have a civilized discussion or just resort to insults? Because if it's the latter I will just ignore you in the future.
> which just goes to show that the compiler writers know way more about this than you do
> You know nothing, but you're convinced you know so much more than those stupid compiler writers.
I am a compiler writer so I do know what I'm talking about. It's a small personal project but it means I've been doing a lot of thinking and research about compilers. And eliminating UB is my current design focus.
And if you reread what I wrote you can see I never called them stupid. They are quite smart and know what they are doing. But even a smart person can make bad decisions depending on their motivations. What I'm saying is that they are putting their skill towards exploiting UB instead of protecting programmers from it.
Just wanted to say, I think your comments here are useful. Given some of the replies, I guess the person who said that this is "literally a religious issue" is right. Sigh!
Thanks. I'm glad some people are getting some use from my posts.
I'm used to the "religious" attacks against me as this isn't the first time it's happened. You need to have a thick skin to post the non-mainstream ideas here. It doesn't matter if you are correct or that your idea is technically accurate, it's all about the how popular the other view is.
The funny thing is how consistent the pattern is. First you see the downvotes and upvotes come in. This is the first sign you're on a hot button topic. Then people will simply tell you that you're wrong without any counter argument. Once you respond back with further facts to back up your argument the attacks on your education/skill/knowledge come in. You misused some cargo cult terminology and that's proof you don't know what you're talking about. Usually it ends there but once in a while someone starts up with the personal insults.
It's funny and sad watching the same thing happen over and over. Sigh.
The function called at program startup is named main, which this translation unit defines. No other may therefore define it. Binaries that don't run main are out of the scope of the standard, and so irrelevant to the discussion.
Anyway, as a more general point: your argument is, basically, "the customer is wrong". But the customer is never wrong! Therefore your argument is invalid.
Right, yes, sure, whatever. Since you've evidently got the experience that I apparently lack, you'll know that this point is irrelevant, since the topic at hand is Standard C, and not whatever some random implementation happens to do... so I'm not sure what your point is. But of course perhaps it would be obvious to a more experienced practitioner.
And? This is only "unfair" if you assume that people should be taxed as a percentage of their income, but by moving to consumption taxes we discard that assumption.
Also assumes that we would heavily tax the consumption of basic goods, like groceries.
More likely, we would heavily tax goods that poor people cannot afford. Things like dining out, travel, fashion, electronics, cars, and housing in excess of basic sq footage.
Your conclusion is entirely unfounded. Returning the same result for the same input does not in any way refute the claim that it's random. It could just as well seed the RNG with the input or any number of other implementations.
That's a pretty naive trust in Microsoft's branding/marketing team. Of course there are heaps of different Windows distributions. They don't necessarily differ as much as, say, Ubuntu vs Gentoo, but they do differ.
> This is obviously not acceptable in a society that considers itself "free speech". It's free from legal consequences but when you shut opinions down due to "other consequences" you end up with the same result.
Which is exactly why the principle of free speech (as opposed to "the first amendment to the US Constitution") doesn't just apply to legal consequences, and free speech absolutely does require freedom from some consequences.
It may be weird that no one is arguing that (maybe it's just no one you're listening to, or being allowed to listen to, though?), but it's not weird that it's not libertarians. The notion that some people shouldn't be allowed to form voluntary associations with others because they got "too large" is anti-libertarian.
That said, "libertarianism" and "anarcho-capitalism" are becoming too synonymous. As a libertarian (but not an ancap) I have no love lost for big corporations; I wholeheartedly agree with your sentiments that monopolistic corporations are bad for society in general. However, because we must stand on principles instead of feels, the relevant principle here is that we have no right to interfere with others' affairs simply because they've chosen to pool their resources into free association, massive or otherwise (assuming they are not interfering with others' liberties, and I don't think there's a genuine argument now that they are).
All hope is not lost, however: there is reason to believe that these monopolies derive much of their monopolistic power through the state (e.g., via regulatory capture) and thus by reducing the power of the state we will actually achieve the desired benefit (breaking up monopolies) without infringing on anyone's liberties.
You're not sure in what market is Google a monopoly? Searches, for one, internet video as well... If the trend continues, web browsers as well (Chrome is fast approaching the level of usage share as IE at its peak).
>It may be weird that no one is arguing that (maybe it's just no one you're listening to, or being allowed to listen to, though?), but it's not weird that it's not libertarians. The notion that some people shouldn't be allowed to form voluntary associations with others because they got "too large" is anti-libertarian.
Libertarianism as a moral structure is a belief in economic freedom for it's own ends. Like you said that really describes ancaps better. 99% of the time that's not what people mean when they talk about libertarianism, they mean libertarianism as an economic structure. That's still essentially a belief structure, but it's the very specific belief that economic freedom is the best way to create economic efficiency. The anti-authoritarianism comes from the fact that the government has special privileges (derived from enforced unionization of citizens) and is overwhelmingly powerful (derived from police power + spending comprising 21% of GDP). ANY large corporation will have that power- including Walmart (if its revenue was 10x higher), Apple (20x) and google (50x). Even a small corporation can, in a company town. Any libertarian should be against those things just on the principle that the rights available to any corporation should be equal. Having more money shouldn't "unlock" rights any more than having very little (welfare, progressive taxation, etc).
I think the primary reason this is ignored is just ignorance of the methods and power wielded. Anarcho-capitalism is significantly less popular than libertarianism exactly because the moral beliefs are significantly less palatable. Very few people think that the poor should starve- I believe that most libertarians do honestly think that in an ideal world, livable work would be available for anybody with anything to contribute.
>However, because we must stand on principles instead of feels, the relevant principle here is that we have no right to interfere with others' affairs simply because they've chosen to pool their resources into free association, massive or otherwise (assuming they are not interfering with others' liberties, and I don't think there's a genuine argument now that they are).
That's... not admissible in any libertarian philosophy I'm aware of. That definition admits governments in their entirety, or close to.
>All hope is not lost, however: there is reason to believe that these monopolies derive much of their monopolistic power through the state (e.g., via regulatory capture) and thus by reducing the power of the state we will actually achieve the desired benefit (breaking up monopolies) without infringing on anyone's liberties.
That statement is in opposition to history (monopolies were larger when there was less government involvement), economic theory (noncompetitive practices are econ 101 and happen without any government), evidence (increasing amounts of money pretty clearly give a disproportionate amount of power) and common sense.