clone - Java: Rationale of the Cloneable interface -


why wasn't .clone() method specified in java.lang.cloneable interface ?

basically, it's broken interface. ken arnold , bill venners discussed in java design issues.

arnold:

if god @ point, , many people glad not, deprecate cloneable , have copyable, because cloneable has problems. besides fact it's misspelled, cloneable doesn't contain clone method. means can't test if instance of cloneable, cast cloneable, , invoke clone. have use reflection again, awful. 1 problem, 1 i'd solve.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

excel vba - VBA Proxy auto-configuration for http requests -

php - phpWord - Tables with borders in headers/footers -