At 06:46 PM 8/10/2000 -0400, you wrote:
>What bothers me most about C# is that although, at first glance, it seems
>to be a variation on Java, it doesn't follow the spirit of Java in at
>least one important respect.
>
>Specifically, one common advantage of both Haskell and Java is that they
>encourage higher-order abstraction: Haskell through functional
>abstraction, and Java through eliminating explicit pointers and memory
>management and enforcing object orientation through the use of classes.
>
>However, according to the C# Language Reference (at
>http://msdn.microsoft.com/vstudio/nextgen/technology/csharpdownload.asp),
>"For developers who are generally content with automatic memory management
>but sometimes need fine-grained control or that extra iota of performance,
>C# provides the ability to write "unsafe" code. Such code can deal
>directly with pointer types, and fix objects to temporarily prevent the
>garbage collector from moving them." [Section 1.2]
>
>Taken to an extreme, this ability could encourage some programmers to
>ignore the spirit of higher-level abstraction and focus back on The Old
>Way (TOW): rampant pointer-level optimization to squeeze out that extra
>iota of performance at the expense of clarity. But wasn't the whole point
>of higher-level abstraction to leave this level of optimization to more
>intelligent compilers so that the programmer could focus on writing clear,
>reusable code? Why allow us to get TOW'ed back (pardon the pun)?
>
>Somebody once wrote that a clearly written, well-documented program that
>doesn't work is usually more valuable than a badly written,
>poorly-documented program that does work because it can easily be fixed
>and reused. It just seems that allowing programmers the ability to
>manipulate pointers directly is virtually hiding a Pandora's Box in C#.
>
>--Benjamin L. Russell
>[EMAIL PROTECTED]
>[EMAIL PROTECTED]
Other issues aside, garbage collection is not the only form of automatic
memory management. Also, garbage collection is unlikely to satisfy any need
for automatic memory management in real-time systems for the foreseeable
future because an extra thread on a single processor is still
non-deterministic. Furthermore, embedded systems tend to be commodities,
hence multiple processors are rare. In fact, a developer is lucky to have a
general stack machine in an embedded system. Everything is typically based
on the end price.
So maybe it would be even better to be able to just turn off garbage
collection altogether in some applications, if one had an alternative form
of automatic memory management.
Best Regards,
Byron Hale
[EMAIL PROTECTED]