Does F# provide you automatic parallelism?

后端 未结 8 2065
栀梦
栀梦 2020-12-28 17:25

By this I meant: when you design your app side effects free, etc, will F# code be automatically distributed across all cores?

8条回答
  •  庸人自扰
    2020-12-28 17:53

    Well, you have your answer, but I just wanted to add that I think this is the most significant limitation of F# stemming from the fact that it is a hybrid imperative/functional language.

    I would like to see some extension to F# that declares a function to be pure. That is, it has no side-effects that are not denoted by the function's type. The idea would be that a function is pure only if it references other "known-pure" functions. Of course, this would only be useful if it were then possible to require that a delegate passed as a function parameter references a pure function.

提交回复
热议问题