Skip to content

Comment on The demise of the low level Programmer.parent

Comments

I think, with current languages, that would probably be the right way to do it. It's not beyond the realms of possibility for a language to try and do the right thing (with sane and predictable rules of course), and let the user override it with their preference.

The hardest part would be getting those sane defaults, otherwise everyone will override them anyway, and you're back to square one or worse.

Sane defaults shouldn't hard at all. Just like in Python you have to do Decimal('1.0') now, we could just as well have to do Float(1.0) to override the default.

Clojure has with-precision [1] and Common Lisp has defaulted to fixed point, fractions and explicit ^float type annotations.

[1] http://clojuredocs.org/clojure_core/clojure.core/with-precis...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.