3 ms·
I use f# daily at my company and am actually glad that many dotnet api integrations use array buffers (e.g. a byte array for streaming) this forces me to optim
by devmunchies 2y ago
I use f# daily at my company and am actually glad that many dotnet api integrations use array buffers (e.g. a byte array for streaming)
this forces me to optimize the f# code by thinking in terms of low-memory, mutable data structures when interfacing with external libraries.
- nickpeterson 2y agoYeah, F# in general is pretty mutation friendly given how functional it is.
- phillipcarter 2y agoYep, and moreover, the combination of most library design and general culture around the language reinforces the dynamic of using mutability only when it's needed or the most straightforward way to implement something, and contain that with immutable interfaces wherever possible. I like to think we helped with this several years ago when making official guidance: https://learn.microsoft.com/en-us/dotnet/fsharp/style-guide/conventions#immutability-and-mutation https://learn.microsoft.com/en-us/dotnet/fsharp/style-guide/...