In fact, theoretically, an x86 machine can only execute an x86 assembly, which is imperative, so it is theoretically possible to ensure that a functional language is executed imperatively. This way you can write C # programs that are equal or better than their F # counterparts. The keyword here is can . This does not mean that all C # programs are better than F # programs or something like that. As a rule, the performance of F # is very acceptable in most problems. There are some cases where the performance of F # is too far behind C #, but in general this is normal for most applications. However, if you want to have small-scale control over what your code does, functional languages ββare not for you. You have more options for optimization in C # than in F #. By the way, in F # I do not mean to write imperative code, but a normal functional approach (if you want to write code imperatively, I do not think that F # makes sense).
Mehrdad afshari
source share