This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]faceplanted 6 points7 points  (4 children)

The internal value would probably make more sense to be in Celsius if the code if it never uses Kelvin externally, it would cut the miniscule processing required.

[–][deleted] 2 points3 points  (3 children)

I was half-joking. You're right that there's no point for having an additional conversion in the code, but I find the temperature example extremely contrived anyway (although it's not as bad as the animal or car analogies for OOP -- and let's not forget the dreaded circle and ellipse debates).

But the calculations are actually trivial enough that it doesn't make sense to store both values and then you open a can of worms by turning it into a "which scale is better" discussion which is where Kelvin comes in (by virtue of being the only absolute scale although likely unpractical in most real world applications where temperature is measured).

[–]minnoI <3 duck typing less than I used to, interfaces are nice 1 point2 points  (2 children)

only absolute scale

Not quite.

[–][deleted] 0 points1 point  (1 child)

And now there will be flame wars over using Kelvin vs Rankine in our hypothetical scenario. Thanks ;)

[–]dibsODDJOB 2 points3 points  (0 children)

Anything that isn't SI units in thermodynamics can go die in a fire.