in C# you can do stuff like :
var a = new {name = \"cow\", sound = \"moooo\", omg = \"wtfbbq\"};
and in
Now in F# 4.6 (preview) we have Anonymous Records
So we can have this code syntax:
let AwesomeAnonymous = {| ID = Guid.NewGuid()
Name = "F#"
|}
AwesomeAnonymous.Name |> Debug.WriteLine
It is also supported on the Visual Studio Intellisense:
So that code could be like this:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
{| controller = "Home"; action = "Index"; id = UrlParameter.Optional |} // Parameter defaults
)
See also: Announcing F# 4.6 Preview