H
Hylander
80% of what Strings can do is not used in the program. (This is true
of many objects) Is the best solution to use char[] for lightweight
string programming?
However, it seems that some things about Strings are better. ie: they
are optimized via a "String pool", as real Object's they use the
equals contract (part of that 20% that gets actual use) etc. You would
think that maybe there was a lightweight String object available that
had little more than what is needed for Object's. Are there other
optimizations that go on behind the scenes?
Btw, no need to mention when the best time for optimization
is./premature optimization antipattern etc...
I'm aware that Decorators are a solution to the general problem but
that can result in class overpopulation.
of many objects) Is the best solution to use char[] for lightweight
string programming?
However, it seems that some things about Strings are better. ie: they
are optimized via a "String pool", as real Object's they use the
equals contract (part of that 20% that gets actual use) etc. You would
think that maybe there was a lightweight String object available that
had little more than what is needed for Object's. Are there other
optimizations that go on behind the scenes?
Btw, no need to mention when the best time for optimization
is./premature optimization antipattern etc...
I'm aware that Decorators are a solution to the general problem but
that can result in class overpopulation.