Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't F# open static classes?

Tags:

.net

f#

I thought modules were compiled to static class .NET IL code. I can open namespaces and modules, but why not static classes?

printfn "Hello, World!"

open System.Console
WriteLn("Hello, World!")
like image 970
MiP Avatar asked Jul 30 '17 05:07

MiP


People also ask

Can F-35 fly in the rain?

Just because pilots could eventually be cleared to approach bad weather doesn't mean they should. “Per U.S. Air Force flight regulations, pilots of all USAF aircraft — not just F-35s — are instructed not to intentionally fly into a thunderstorm,” Seal said.

Why is the F-22 being retired?

The U.S. Air Force and the arm of government that funds it are at loggerheads over the future of the F-22 Raptor. The Air Force wants to retire the jets to make room in the budget for its replacement, the Next Generation Air Dominance (NGAD) fighter.

How many f22s are there?

There are a total of 186 F-22s in the Air Force, 36 of which are Block 20s. If all retirements are authorized, the Raptor fleet will be reduced to 153 aircraft.

Are F 16 still being built?

Lockheed Martin Corp (LMT. N) expects to produce its new-build F-16 fighter jets next year and commence deliveries in 2024, its chief financial officer Jesus Malave said on Wednesday.


2 Answers

There is a suggestion for it on GitHub. The original suggestion, has a comment from Don Syme:

Yes, this should I suppose be implemented to match the corresponding C# feature, since static classes will begin to be more common coming from the C# world.

I would recommend voting for the issue on GitHub (react with a thumbs up). If you have any comment to add then people may become interested in this again.

like image 184
TheQuickBrownFox Avatar answered Oct 19 '22 02:10

TheQuickBrownFox


This is now supported, starting with the F# 5 release:

open type System.Console

WriteLine "Hello World!"
like image 40
Asik Avatar answered Oct 19 '22 03:10

Asik