Lambda the Ultimate

inactiveTopic Over and Under in a Box
started 12/15/2003; 10:33:47 PM - last post 12/16/2003; 7:27:12 AM
Patrick Logan - Over and Under in a Box  blueArrow
12/15/2003; 10:33:47 PM (reads: 9904, responses: 2)
Over and Under in a Box
Don Park writes about Java and dotnet, presumably C# and VB.Net...

I have examined quite a number of open source Java and .NET projects recently and there is a striking contrast between the two groups which is that Java projects tend to be over-architected and .NET projects tends to be under-architected...

There is also a disturbing trend of hiding or scattering information from developers so that it is difficult to sit down and review several pages of code without having to run around looking for the hidden pieces...

After a few sessions of trying to get some decent performance out of .NET, I am already starting to see boxes in my sleep.
Posted to critiques by Patrick Logan on 12/15/03; 10:38:09 PM

Daniel Bonniot - Re: Over and Under in a Box  blueArrow
12/16/2003; 6:27:07 AM (reads: 487, responses: 0)
It was hard to relate the part about seeing boxes in his sleep, but here is the relevant part: Another example is .NET's boxing and unboxing behind-your-back trick which, while well-intended and neat, often means disappointingly slow code.

The issue is with converting value types (structs) into references. Were values types (besides primitive types like int) introduced for efficiency reasons only (possible allocation on the stack, as long as you don't need a reference)? Amusingly, this turns to be slower than having everything a reference in his case. I would think that in a language with polymorphic operations (<T> ...), boxing will occur even more for value types. So is "everything is a reference" a better implementation technique?

Patrick Logan - Re: Over and Under in a Box  blueArrow
12/16/2003; 7:27:12 AM (reads: 468, responses: 0)
So is "everything is a reference" a better implementation technique?

It's been decades since I was involved with a system that demanded more developer control. Why fuss at this level for most applications? This is an example of premature optimization at the micro level, and it is backfiring. Which was predicted.

The mechanism just becomes one more language complication that distracts from addressing the real problem.