3 ms·
>In particular, how many dollars does it cost to have null safety Close to none. >Just because some dude with a fancy name said so doesn’t mean it’s true. Th
by coldtea 4y ago
>In particular, how many dollars does it cost to have null safety
Close to none.
>Just because some dude with a fancy name said so doesn’t mean it’s true.
The dude is responsible for tons of what we take for granted. He is also the one who invented the null pointer, so there's that.
I'd take his expert opinion and experience on the matter over anybody referring to him as "a dude with a fancy name".
He didn't sit to calculate the money in damages from it's use - it was more of a figure of speech and a guess ("probably").
But it's very likely that the prodictivity losses from null errors, the consequences for security, program downtime, and so on, could trivially have costed 1 billion dollar in damages over the years - actually much more.
A single null error in one of the space code responsible from bringing down a NASA mission, could easily cost close to a billion itself.
In fact the memory safety industry (e.g. static analyzers and in memory analyzing tools), safety checks for nulls by consultants, and so on, industry easily has have 1 billion in profits over the last 40 years, so there's that...
- pizlonator 4y ago> Close to none so zero dollars were spent adding null safety to languages? False. Zero dollars were spent converting code to those languages? False. Zero dollars were spent solving problems uniquely created by not having the benefits of null? Also false. > I'd take his expert opinion and experience on the matter over anybody referring to him as "a dude with a fancy name". Sounds like a crappy way to reason about facts. Just because he did cool shit once upon a time doesn’t mean that we should believe him when he pulls numbers out of his ass.
- IshKebab 4y ago"close to none" is not the same as "zero". But yes, converting Dart code to null safety is not very difficult.
- pizlonator 4y ago“Not very difficult” is not the same thing as “close to no cost”
- coldtea 4y agoIs this about being obtuse on purpose? I could also do an immitation of a dumb pedantic person and just answer your "First, zero dollars were spent adding null safety to languages? False", with: "I didn't say "zero" I said "Close to none". So PWNED! or something equally immature. But one can also chose to be charitable. E.g. to understand that: > Zero dollars were spent converting code to those languages? False. Having null safety doesn't necessarily mean "converting". Could also mean not having nulls in a language to begin with. So "how many dollars does it cost to have null safety" in that case is zero. It's fixing the addition of nulls after the fact that can have a cost. Even so, the conversion to null safety is not that costly (it's nothing like a rewrite, more like going around a program and fixing SQL Injection cases or XSS). It also makes evident many logical and safety errors in the initial program when done (many teams have written about such experience), and any cost has to be offset with the cost of those errors not happening anymore. In any case, those are not costs of not having null to begin with in the language. They are costs of retrofixing code in ones that did have it. > Zero dollars were spent solving problems uniquely created by not having the benefits of null? Also false. There are no "problems uniquely created by not having the benefits of null". In fact, there are no "benefits of null" to begin with. > Sounds like a crappy way to reason about facts. Then again sounds like you didn't provide any facts. Just shown ignorance of computer science theory AND history, along with certainty and immature tone.
- jamil7 4y ago> Zero dollars were spent solving problems uniquely created by not having the benefits of null? This one doesn't make any sense in the context of the languages being discussed. What unique problems does it create in Swift/Kotlin/Rust?
- Lewton 4y ago> Zero dollars were spent solving problems uniquely created by not having the benefits of null? Also false. Do tell what those problems are? Whenever I hear people complain about this, they suffer from some fundamental misunderstanding of how null-safe languages work in practice
- gfxgirl 4y agoNot to defend the OP because I agree that null is bad. But, in my limited experiecne with Swift I just add a few characters at the right place and the null's are now incorrectly ignored and the warnings go away. So, the language gave me warning, but it didn't really force me to deal with it correctly. Is Swift a bad example of a null-safe language?
- masklinn 4y agoWhat characters exactly? "!"? You literally tell it to break, a null-safe language will not actually prevent you from shooting your foot, it'll just make sure you do so knowingly. "foo!" is essentially a shortcut for guard foo else { fatalError() }
- coldtea 4y agoIt's a language that didn't go all the way to null-safety. But at least it did explicit (you HAD to add those characters) to get the unsafety than in C is the default.
- masklinn 4y ago> It's a language that didn't go all the way to null-safety. Is it? I can’t think of any langage but Elm which doesn’t have that assertion. Though I guess e.g. Idris or ATS could have left out as well.
- Lewton 4y ago> I just add a few characters at the right place and the null's are now incorrectly ignored and the warnings go away. So, the language gave me warning, but it didn't really force me to deal with it correctly. Personally I don't really see that as an issue, we're talking about null safe by default vs not safe by default. It being simple to break the null-safety is a good thing, as long as it requires you to do it deliberately
- syrrim 4y agoFp arithmetic has brought down space ships. Is floating point a billion dollar mistake?
- wizofaus 4y agoYou could reasonably argue that having languages make floating point arithmetic appear superficially similar to integer arithmetic despite key differences (inability to store exact results of various operations etc.) could qualify as such. In many ways it is surprising that more languages haven't been given features to help avoid FP- arithmetic/rounding/conversion/formatting issues - e.g. just adding a built-in decimal type can help a lot (it's woefully common to have decimal amounts such as monetary quantities stored as FP, particularly in Javascript).
- KMag 4y agoI've worked on international trading systems for a Fortune 500 broker-dealer that handled prices as IEEE-754 doubles, even though all currencies involved were decimalized. In the US, stock prices all have to be a multiple of $0.01, but in some markets, this minimum increment/decrement of a price ("tick size") is based on the price range, so lower priced stocks have finer-grained pricing. Determining if the customer was sending in a valid properly rounded price was a pain, as an upstream system had already parsed the price into a double and didn't pass our system the string representation.
- coldtea 4y agoFP is like a power saw tool you can use to cut wood or cut your fingers. null pointer is more like a safety belt silencer. Convenient, especially when you don't want to be bothered or listen to the warning "beep". But there's no actual healthy benefit from using it. That said, languages not providing a first class fast fixed precision/rational/decimal implementation for where precision is required, and this having been relegated to niche libs, is indeed a mistake.
- jjtheblunt 4y agowhen?