[I would post it as a comment, but it took a little longer ...]
Here's another good reason not to do this - F # agents and asynchronous workflows provide a parallel programming model, which in many aspects is much better than Node.js. For instance:
- it gives you both concurrency and true parallelism so you can write code that doesn't block the system when you need to do some work using the CPU
- asynchronous workflows provide an easy way to handle exceptions and handle resources
(you can use try .. with in asynchronous (or event-based) code) - agent-based programming model gives you a great way to maintain state
If you can use F # to write your server application, you can also use the powerful abstractions that it provides. See Server-side functional programming for a brief introduction. I also spoke up F # on the server side , which was recorded and discussing the same topic.
This is not necessarily the reason why not try it. Trying to do this can be fun, and if you like the F # language, but want to use it in a Node.js environment, then it would be very helpful to have this.
source share