top | item 41113798

(no title)

devmunchies | 1 year 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.

discuss

order

phillipcarter|1 year ago

Yep, 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/...

nickpeterson|1 year ago

Yeah, F# in general is pretty mutation friendly given how functional it is.