none
.NET 5 Common Language Runtime RRS feed

  • General discussion

  • Hello.  I have some feature requests regarding the next version of the common language runtime.

     

    Robust Expressiveness for Generic Type Parameter Constraints

    public class GenericType<T1, T2>
    {
      where T1
      {
        // function code as per 'bool function(Type T1)'
      }
      where T2
      {
        // function code as per 'bool function(Type T2)'
      }

      void Function()
      {
        // design-time and compile-time logic allows previous conveniences with the new expressiveness
      }
    }

    A System.Type's generic parameter constraints could be a property on the System.Type of type Expression<Func<Type[], bool>>.

    Multiple Inheritance

    Multiple inheritance built into the runtime.

    Type Bundles or Simultaneity

    Syntax such as IInterface1&IInterface2 as valid where types, parameters, return types, and other uses of types are.  Two or more types or interfaces can be concatenated syntactically into an element expressing simultaneity.

    public IInterface1&IInterface2 function() { … }
    IInterface1&IInterface2 x = function();
     
    if(x is IInterface1&IInterface2) { … }
    var y = (x as Iinterface1&IInterface2);

    Vector Types such as float4

    128-bit Integer Types (System.Int128, System.UInt128)

    SSE and GPGPU JIT Support

    Ability to Switch/Case on More Data Types Such as 128-bit Integers and System.Guid, More Types for Attribute Constructors, Constant Data Types

    Static Interfaces or Static Interface Methods

     

     

    Kind Regards,

    Adam Sobieski

    Saturday, October 15, 2011 10:52 AM

All replies

  • Clarifying, with regard to type parameters referencing one another in their descriptions:

    public class GenericType<T1, T2>
    {
      where T1
      {
       // function code either as per 'bool function(Type T1)' or 'bool function(Type T1, Type T2)'
      }
      where T2
      {
       // function code either as per 'bool function(Type T2)' or 'bool function(Type T1, Type T2)'
      }
     
      void Function()
      {
       // design-time, compile-time and runtime logic allows previous conveniences with the new expressiveness
      }
    }

    Sunday, October 16, 2011 7:18 AM
  • So, what's your question?


    Hard hard work, Day day up!
    Wednesday, October 19, 2011 4:46 AM
  • Just indicating some ideas.

    Saturday, October 22, 2011 1:02 AM