Re: reasons to hate C#

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



C# has no property indexers, if that is the proper term. Not "best
practice"? That's bunk.

To clarify the constructor chaining problem; in C#, you can't take values
derived within the method body of one constructor and feed them into
another. If you've worked in VB enough, this should strike you as
surprisingly crippled.

Paul

"Mike Hofer" <kchighl...@xxxxxxxxx> wrote in message

news:1174563051.542010.217900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> On Mar 22, 7:22 am, "Mike Hofer" <kchighl...@xxxxxxxxx> wrote:
On Mar 21, 8:12 pm, "PJ6" <n...@xxxxxxxxxxx> wrote:

...

Paul,

First, I owe you an apology. If my post came across as accusatory or
critical, it was not my intent. The first paragraph of the post
*seemed* to be saying that the issues with constructor chaining and
lack of parameterized properties lay with VB. From your response, that
clearly wasn't your intent, and I apologize for having misunderstood
you.

Now, in the interests of carrying on a clear, calm, and (hopefully)
intelligent discussion (on my part), I'm going to ask a question to
make sure that I understand what you mean in your response. :) I have
an *idea* of what you mean, but I want to be sure before I fly off the
handle and make an unfounded assumption, and say something stupid.
(Again.)

In your response, you said:

C# has no property indexers, if that is the proper term. Not "best
practice"? That's bunk.

It's the "that's bunk" part that I'd like to discuss. Can you expand
on your viewpoint on that?

Now, regarding the constructor issue in C#, I'll admit that I am
nowhere *near* as proficient in C# as I am with VB.NET. I agree that
the inability to invoke one constructor from another in the same class
would seem to be a serious shortcoming (if that's what you're saying,
and if it's not, I'd ask you to correct me). However, it's been a
while since I coded anything in C#, and I'll have to do some coding
with a few test applications to refresh my memory. (I'd prefer to do
something with it so I can speak knowledgably and not rely a vague
sense of recall.)

Thanks, and again, my apologies for misconstruing your intent.

Mike

.



Relevant Pages

  • Re: Constructors And Exceptions
    ... > upon the execution of the destructor. ... > signaling constructor failure via the exception mechanism. ... > My initial reaction to the first book was that the practice is not dubious ...
    (comp.lang.cpp)
  • Re: Declaring many objects
    ... Yes, I would certainly provide such a constructor in practice, but it is ... reasonable text to refer to. ... Francis Glassborow ACCU ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Constructor inheritance (or lack thereof)
    ... It will look for a parameterless constructor in the base class, ... If you talk of "constructor chaining" (as you so name it, ... inheritance. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: calling own methods from constructor
    ... In effect, until the constructor of Foo completes, the object is ... class Subprise extends Surprise{ ... C++ doesn't have this problem, since constructor chaining is NOT syntactically like a statement and constructor chaining doesn't have to compile like one, either. ...
    (comp.lang.java.programmer)
  • Re: this() vs base()
    ... baseis for stating how a base class constructor other than it's default constructor should be called - I have no idea whether this equates to superin Java ... "Calling Base Class Constructors and Constructor Chaining" in the C# ...
    (microsoft.public.dotnet.languages.csharp)