Any difference between t<'a> and 'a t in F#?

前端 未结 4 1758
挽巷
挽巷 2021-02-19 22:49

Is there any difference in meaning between t<\'a> and \'a t in F#? Can they be used interchangeably even after declaration?

4条回答
  •  梦谈多话
    2021-02-19 23:13

    I think that the 'a t syntax is more idiomatic (it is used in almost all the MSDN examples and emitted by the compiler will generate that syntax for signature files)

    There is a similar example for arrays

    int[] , int array
    

    The 'a t syntax is also nicer for concrete parameters -

    int list, List
    

    so some consistency argues for 'a t

提交回复
热议问题