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 -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -