Re: Highlander2 Beta-blogging: Generics in Delphi for .NET



Robert Giesecke wrote:

Marco Caspers wrote:

But i see an issue with the Default function you described.

1). default (note lower case d) is already a reserved word in C#


The is exactly what the "default" keyword in C# is used for, so how
could there be any problem with it?

Ok, i see my C# knowledge is non existent.

In Chrome, you'd call your class _Default while the page itself can
be named WhatEverYouLike.aspx.

That's no use. I'm not using Chrome, i'm not going to "pay" for "2"
products while i can do the same thing with only paying for 1.

<snip>
Every generic-enabled CLR language, that I have seen so far, used a
compiler magic function called "default" to wrap
Activator.CreateInstance<T>(). Can't see anything evil in it.
<snip>

I don't see any evil in it <g>, only thing i thought is that it could
cause confusion with the C# reserved word and the "issue" with
Default.pas.
But as you pointed out, the C# reserved word is used for the exact same
thing, so at that point there can be no confusion.

So as long as you keep this part of generics outside Default.pas there
won't be any problems..


--

.



Relevant Pages