Wouldn't it be more explicit if there was a designated keyword that objects could use to access their own members instead of implicitly assuming that any first argument to a method is a reference to them, only called 'self' by convention?
I'm genuinely sorry if I came across as condescending, that was not my intention at all.
I merely wanted to point out that, in my opinion, this property should be reflected in parameter type, rather than the name. Just like, if we wanted a parameter that should only be a whole number, we wouldn't declare it as a float and name it "MyVariableInteger" and hope that the callers would only send integers.
You mentioned that there are quite a few languages that do not permit what I proposed, would you mind specifying which ones exactly? The only one that comes to my mind is assembly?
I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type. In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1].
EDIT: Some of you asked what about languages that don't support such more constrained types, so to answer all of you here: different languages have different capabilities, of course, so while some may make what I proposed trivial, in others it would be almost or literally impossible. However, I believe most of the more popular languages support creation of custom data types?
So the idea (for those languages at least) is quite simple - hold the value as a float, but wrap it in a custom data type that makes sure the value stays within bounds through accessor methods.
Croatian here. You're correct, if you only said the word "spomenik" to anybody from former Yugoslavia, they wouldn't be able to distinguish whether you're talking about precisely those monuments built after WW2, or any other monument built before or after the communist era. Or even, say, Washington monument (In Croatian it's literally called "Washingtonov spomenik"). The word "spomenik" means "a monument" and just that. I was actually surprised to learn that in English the word refers to monuments from a particular location and particular era.
Why not? Your chances of choosing the correct door were 1 in 3 from the start. That doesn't change with the fact that the host opens the doors at random.
If you only ever offered the players to switch if they picked the car, they'd soon realize this and never switch when they're offered this chance. Also, players that picked a goat at first would have no chance of winning the car.
> I suspect you don't know actual American military personnel very well, especially officers and NCOs, and how seriously we take the Laws of Warfare, AND the Constitution.
You're right, I don't. But, if Americans don't need to fear that they'll have to fight the US Army, why have the 2nd amendment at all? Who would they need to protect themselves against?
> the ability to defend yourself against a tyrannical dictatorship made sense until the government developed better technology, now it's pointless so just give up your guns?
Basically, yes. Do you honestly think people would have any chance against probably the most powerful army in the world?
Sure, they could try fighting a guerilla warfare, they'd even inflict some casualties against the enemy but it's unlikely that in the end they'd succeed against an army that is professional, highly skilled, better equipped, has better offensive and defensive capabilities, knows a lot more about tactics and logistics and has trained for this type of situation on a daily basis.
> Are they going to destroy their own infrastructure?
Would they even consider it their own infrastructure? Or would they consider it infrastructure currently held by rebels, which needs to be either seized or destroyed?
> Do you think the real men and women of the military would follow orders to destroy its own hometowns and families?
I suspect a lot of them would destroy towns if they we're told that these are now enemy bases. This has been repeated in many parts of the world throughout the history, even recent one. If they wouldn't, they'd be defectors and it really wouldn't matter whether the war was fought with modern weapons or sticks and stones.
I wish there was a service where you'd send a url of an article such as this one and it'd spit out a summary with only the relevant data and without all the surrounding cruft.
Something like a tl;dr for this type of articles.
Not only that, but consider how many jobs we could create if only we banned the use of combine harvesters, tractors, various machines in factories all over the world etc.
"forced to live there" is exactly the same manipulative language being used shamelessly here. You should really consider avoiding such use as it detracts from your argument.
Fair enough. What would be another way to say that a person is denied living in any country other than the one of their origin?
I'm just considering a not unlikely scenario where a smart, capable person wants to get away from a country ruled by a corrupt or oppressive government. What if the majority of the people continually vote for such a government and this smart (strong, as you put it) person sees no chance of that changing in the foreseeable future, should that person be forced to live there even if they don't want to?
The whole point (or rather, one of the points) of Java and .net are that they are NOT compiled to native code but to bytecode so that you can write code once and then run it on many different systems without having to compile it again.