C# 3.0: no additions to where clause? dang.



I was hoping for increased functionality with the where clause in C#
3.0. Using the new keyword 'var' would really allow us to take nice
advantage of these. Specifically:

1. I want to limit it to primitives: "where T : System.Type.Primitive"
or something like that.
2. I want to limit it to an unspecified generic: "where T : List<>".
3. I want to limit it to a generic with a subset of types: "where T :
List<new TT> where TT : class" or something similar.
4. I want to limit to a class with a certain property or method: "where
T : interface MyFunc(int), interface operator+=(int), interface get
MyProperty(int)" or something similar.
5. I want a default type: "where T default(MyType): IMyType" or
something similar so that I don't have to specify the type in all
situations. If it leads to ambiguous functions, throw an error.
6. Specify a namespace: "where T in System : class" or something like
that.
7. I want to AND/OR the conditions for the where clause together.

Thoughts? Comments? Complaints?

.



Relevant Pages

  • Re: Opinions on approach, please...
    ... Write the where clause manually, ... MOST interface, with the original COBOL ISAM access commented out above it. ... I can certainly do it with dynamic SQL and MOST can build a WHERE statement ... application is doing lengthy sequential processing, how often, in what ...
    (comp.lang.cobol)
  • Re: Uses clause tool
    ... Arrange implementation uses clause to have one unit at a line. ... I have a tool to remove unused units, and move units to the implementation section. ... Note that Delphi will insist on having units appear in the interface section that aren't actually required for compilation. ... The tool will not sort units or do any kind of special formatting. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Confused about units
    ... Maarten Wiltink wrote: ... I echo Maarten's approbation - good finding. ... The interface uses clause contains units in which any item in this unit ...
    (comp.lang.pascal.delphi.misc)
  • Re: Tool to detect unused units
    ... This is the case with the uses clause in the project file. ... entries from the unit and forms list of the IDE ... To assure that all class definitions needed for the streaming support ... of the interface part of a unit containing a form or data module ...
    (borland.public.delphi.thirdpartytools.general)