Re:The new Microsoft Edge is out of preview
by goto11 on Friday January 17, 2020 @04:41AM
(#22073277)
You are right about having to create a class to hold a function, that is annoying. But C# do support nested functions and closures. I don't really understand your other points. A literal 0.25 in C# will be parsed as a double precision. If you want it to be a float (less precision) you use the F postfix. But JavaScript doesn't even have the float/double distinction.
You can nest functions nicely and work with closures when it makes sense, if you like that sort of thing.
The async programming model is also really nice to work with.
You also don't need to create classes for every noun, verb, and adjective in your system either - when all you need is a function, you just write a function, not some weird object to hold it.
You also don't have to write a f after all of your decimal values to tell the silly compiler that you mean for 0.25 to be a float. (this one truly does not matter, but there are a lot of little things like this that add up)
I know you can do a lot of that in C#, but its just so effortless in javascript. You just need to be more disciplined about how you code it