[nem-en] match | match | match

Igor Tkachev it at rsdn.ru
Wed Aug 9 03:48:16 CEST 2006


Hi All,

Suppose I have the following code:

public static ToMethodDefinitionString(this t : TyVar) : string
{
  | mtype is MType =>
    match (mtype)
    {
      | Fun(args, _) =>
        match (args)
        {
          | mt is MType =>
            match (mt)
            {
              | Tuple as tuple =>
                // finally, lets do something here
            }
        }
    }
}

I am just wondering, why cant we have shorter way for these
scenarios:

public static ToMethodDefinitionString(this t : TyVar) : string
{
  | mtype is MType =>
    | Fun(args, _) =>
      | mt is MType =>
        | Tuple as tuple =>
          // finally, lets do something here
}

-- 
Best regards,
 Igor                          mailto:it at rsdn.ru





More information about the devel-en mailing list