And even abusing garbage collection seems like a bit of a stretch (in my opinion).
When I first learned Java I did things I consider "GC abusive", mostly to see if I had to bother to be "clever", or if "dirt simple dumb" would be fast enough.
I wrote a SSH client (plus terminal), and when I dealt with packets and sub frames and things I just plopped each packet into a string, and then ripped the packets into strings for each subframe and on and on. The "efficient" way would have been to use a single string (or string buffer) and pass index/length pairs around for packets, sub frames and the like.
Turns out it was more then fast enough. Faster then MS's built in telnet in fact. (this was my attempt to both learn Java and see if I could develop on a windows platform...it worked out Ok, and I've done a little more with Java since then, but the Windows box only ever played games after that, until something or other died on it and I haven't bothered to resurrect it).
by Stripes — Sep 27
When I first learned Java I did things I consider "GC abusive", mostly to see if I had to bother to be "clever", or if "dirt simple dumb" would be fast enough.
I wrote a SSH client (plus terminal), and when I dealt with packets and sub frames and things I just plopped each packet into a string, and then ripped the packets into strings for each subframe and on and on. The "efficient" way would have been to use a single string (or string buffer) and pass index/length pairs around for packets, sub frames and the like.
Turns out it was more then fast enough. Faster then MS's built in telnet in fact. (this was my attempt to both learn Java and see if I could develop on a windows platform...it worked out Ok, and I've done a little more with Java since then, but the Windows box only ever played games after that, until something or other died on it and I haven't bothered to resurrect it).