2 ms·
Being able to make good decisions does not guarantee you will never make a mistake. And he even explains his reasoning behind his choice and it was a justifiabl
by danbruc 12y ago
Being able to make good decisions does not guarantee you will never make a mistake. And he even explains his reasoning behind his choice and it was a justifiable decision when he made it. But I stand by what I said - if you are unable to decide between using 8 bit or 64 bit integers or a floating point type or a decimal type you should not be a professional software developer because it is really a very basic and fundamental skill.
- sysk 12y agoThen what do you propose we call the people who write Ruby, Python, Javascript, PHP, etc. code for a living? Have you heard of accidental complexity?
- danbruc 12y agoRuby, Python and PHP all support several types of numbers. But even if they did not this would not preclude people developing in those languages from being able of making such decisions.
- onion2k 12y agoIn the web industry, which is the biggest part of the software industry by people employed, most developers use dynamically typed languages and very happily never make this "fundamental" choice. Should they all resign?
- markokrajnc 12y agoNot only web industry: in Smalltalk every integer can have unlimited number of bits. On 32-bit systems internally 31 bit is used first and with overflow it automatically starts using variable size integers... There is no need to make a choice on the number of bits... Just use integers as they are in the nature...
- danbruc 12y agoDynamically typed does not mean that you don't have to think about number types - 3/2 and 3/2.0 may yield different results in dynamically typed languages. And how many web developers don't know about or are unable to decide between different number types? JavaScript type coercion is such a mess, how could you get away without thinking about types, even though number types are usually not an issue?
- benaston 12y ago"JavaScript type coercion is such a mess" - in what way? Seriously.
- danbruc 12y agoIn what way it isn't? Just look at this beauty [1] and its consequences. But probably nobody uses the equality operator anymore because it is such a mess. Less than is even more messed up [2]. [1] http://people.mozilla.org/~jorendorff/es5.html#sec-11.9.3 http://people.mozilla.org/~jorendorff/es5.html#sec-11.9.3 [2] http://strilanc.com/visualization/2014/03/27/Better-JS-Equality-Table.html http://strilanc.com/visualization/2014/03/27/Better-JS-Equal...
- nfm 12y ago`" " == 0 == false`, and `"" == 0 == false`, but `" " != ""`. `"Infinity" == Infinity`, but `"true" != true`. I could go on for a while like this.
- coldtea 12y agoAnd which of those persist if you use ===?
- tragic 12y agoNone - because === does not coerce types. Type coercion, not double-equal weirdness as such, is the gripe of the GGP. Non-transitive, inconsistent equality is nothing more than a symptom of JS's rules for implicit conversions. Language-war disclaimer: I love javascript and everything, it's a very expressive language; but a good wodge of the tooling around it nowadays is to help people avoid things like implicit type-coercion 'surprises'.