[–] sbelskie 4y ago ↗ Really happy to see the task improvements. Simpler and more performant. Can’t beat that when improving interop with .NET.
[–] xupybd 4y ago ↗ I'm seriously loving F#. It's a steep learning curve from an OO background but it just feels more ergonomic to use.
[–] waynesonfire 4y ago ↗ look at this garbage syntax, let readFilesTask (path1, path2) = async { let! bytes1 = File.ReadAllBytesAsync(path1) |> Async.AwaitTask let! bytes2 = File.ReadAllBytesAsync(path2) |> Async.AwaitTask return Array.append bytes1 bytes2 } |> Async.StartAsTask async await.. so ugly. I have a heard time getting excited at this "state of the art" when parallel processing in Erlang is so ubiquitous and native. [–] thrwaway7745 4y ago ↗ that's the old syntax [–] waynesonfire 4y ago ↗ Indeed, newer syntax is much cleaner! [–] DerHardt 4y ago ↗ That's because an async computation is not a task. So use the task computation either through a nuget on < F# 6.0 or build in >= F# 6.0 let readFilesTask (path1, path2) = task { let! bytes1 = File.ReadAllBytesAsync(path1) let! bytes2 = File.ReadAllBytesAsync(path2) return Array.append bytes1 bytes2 }
[–] thrwaway7745 4y ago ↗ that's the old syntax [–] waynesonfire 4y ago ↗ Indeed, newer syntax is much cleaner!
[–] DerHardt 4y ago ↗ That's because an async computation is not a task. So use the task computation either through a nuget on < F# 6.0 or build in >= F# 6.0 let readFilesTask (path1, path2) = task { let! bytes1 = File.ReadAllBytesAsync(path1) let! bytes2 = File.ReadAllBytesAsync(path2) return Array.append bytes1 bytes2 }
7 comments
[ 2.8 ms ] story [ 27.3 ms ] thread