HI Chris,

from my perspective, in the case of reading, one would surely want an implicit 
conversion between datatypes if this makes sense.
Obviously for “extending types” (if I request a Long but internally, an int is 
stored) but also for “castable” types, i.e. if I request a Double but 
internally int or long is stored. In this scenario I would like a cast if the 
double value is “integer enough” (with regards to a configured epsilon, 
possibly) or an exception otherwise. (Off-Topic question: Does anyone know an 
open source project for doing these casts from arbitrary java types to others, 
especially the numeric ones. I remember that I had used one once, but I can’t 
recall the name.)
All of this obviously only makes sense if information of the stored type is 
available.
For writing, I personally would prefer your second option, as I would prefer an 
Exception over “unwanted” behavior.
Perhaps the first option could be used with a “forced” bit, if someone really 
knows what he / she is doing.

Best
Julian

Reply via email to