logoalt Hacker News

snkline • yesterday at 7:55 PM • 0 replies • view on HN

Yeah, while I do agree this change in behavior could be a major footgun for a few people, the vast majority of use cases for decimal should be unaffected. Decimal is usually used for business applications to the exclusion of double/float, not alongside them (the only doubles I've seen in my company's applications are just storing Lat/Long values for addresses, everything else uses decimal values).

Hell, on the rare occasion I've needed to use a decimal literal in code, I just use a decimal literal: don't do (decimal)0.1, just use 0.1m.