4 ms·
But in the Hack proposal wouldn't that have to be “hello world” |> titleCase (%) I'm starting to like the F# proposal more now.
by galaxyLogic 4y ago
But in the Hack proposal wouldn't that have to be
“hello world” |> titleCase (%)
I'm starting to like the F# proposal more now.
- maxloh 4y agoConsider the example code here in Hack, const weather = `https://api.weather.gov/gridpoints/TOP/31,80/forecast` |> await fetch(%) |> await %.json() |> %.properties.periods[0] In F# it would be much more verbose, const weather = `https://api.weather.gov/gridpoints/TOP/31,80/forecast` |> fetch |> await |> json |> await |> x => x.properties.periods[0] // or |> { properties : { periods: [result] } } => result Hack will also requires less key strikes for calling functions that have multiple augments.
- pharmakom 4y agoNumber of key strokes is only one design consideration and not even a very important one