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



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?

2). Many ASP.NET developers have a Default page (note the capital D).

Having a Default page, means that there is a Default.pas file.
That will create conflicts. In fact, it could mean that some projects containing a Default.pas
won't compile at all because Default is now defined more than once...


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


From my point of vieuw, this doesn't look like a good naming descision.


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.
.



Relevant Pages

  • Re: Syntax coloring: SERVICE
    ... SQL Server Documentation Team ... guess it's not a reserved word even though it gets colored blue.) ... One could of course get into the debate of what a keyword really is. ... In the most recent update to BOL, the index returns the following choices ...
    (microsoft.public.sqlserver.tools)
  • Re: Syntax coloring: SERVICE
    ... guess it's not a reserved word even though it gets colored blue.) ... I don't know, perhaps a keyword can work as an un-qualified identifier, while others can't. ... In the most recent update to BOL, the index returns the following choices when SERVICE is the keyword. ... service See services [Reporting Services] ...
    (microsoft.public.sqlserver.tools)
  • Re: Newbie with a simple Q about Passing data to a Form
    ... > anything else) in a code window, highlight the word and hit Shift-F2. ... > it's a reserved word, the object browser will open and show you where it ... If it's a VB keyword, help will open to the page and show ...
    (microsoft.public.vb.general.discussion)
  • Re: Highlander2 Beta-blogging: Generics in Delphi for .NET
    ... Hallvard Vassbotn wrote: ... default (note lower case d) is already a reserved word in C# ... coming up with the mixed meanings of the word Default. ...
    (borland.public.delphi.non-technical)
  • Re: How to insert a new row to an existing HTML table
    ... That is one of the few exceptions and was done because 'class' is a keyword or reserved word in many programming languages. ...
    (comp.lang.javascript)