Is there any difference in meaning between t<'a> and 'a t in F#? Can they be used interchangeably even after declaration?
Is there any difference in meaning between t<‘a> and ‘a t in F#? Can
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no difference, and yes, they can be used interchangeably even after declaration.
But do note the F# Component Design Guidelines recommendation (Section 4.2):
Also, you’ll get a compiler warning if you use the ML-style generic parameter list notation, e.g.
('a,'b) tvs.t<'a,'b>.And while we’re at it, note the following recommendation in Section 3.1 of the same guide:
(though personally I tend to ignore this recommendation for F#-facing public libraries).