If the syntax for C # light is much better in F #, why isn't it the default?

I am digging in F # and enjoy writing code in many different ways.

But I'm confused - why does the non #light syntax exist if it is superior to the default syntax?

Does anyone know why?

Why not make #light the default and enable the #dark option for those who need unsafe code?

+2


source to share


3 answers


This is the default in the latest CTP and will be when it is in the box for Visual Studio 2010.

While most developers agree with you that #light is a more enjoyable coding experience, not everyone shares your love. Moreover, the presence of the code with spaces also complicates some tasks, such as generating the MUCH code. (Think lambdas inside lambdas.)



I suspect no # light will be discussed or seen in the wild, but will certainly exist for people who come from a heavy OCaml background or have some religious C # light issues.

+11


source


The non-light syntax exists for OCaml compatibility. F # takes some of the code for the libraries directly from OCaml and also needs to be OCaml compatible. If you want to use a port code, you just use no light. As stated in the previous answer, #light will be the default in the final version.



+4


source


Just in case you missed it, you can find a few considerations about the syntax #light in another message fooobar.com/questions/157297 / ... . It explains some of the reasons the C # # syntax might be interesting.

+3


source







All Articles