-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F# Own Source-generation/Meta-programming #1396
Comments
F# has Myriad, which is community driven library. There are no other plans to have anything out of the box at this point. |
OK, adding to the words I said : F# should be making functions and expressions first citizens, people should not write classes or define types to deal with the object oriented aspect and should write types for classification needs. Imagine that's a reality we enjoy. |
What you're taking about sounds kind of like LISP macros. While that would be really neat, I think that type providers were intended to be the mechanism for metaprogramming instead. Perhaps you could channel your suggestion into improving type providers? See for example the approved-in-principal suggestion about accepting types as inputs to type providers (which would allow for solving some of the same kinds of problems that macros solve) |
Agree, types as inputs to TPs would address a lot of the concerns (the second half would I guess best correspond to quotations (= expressions) as inputs, but I do not want to open that box) |
For what it's worth here's the specific language suggestion / RFC we're referring to: #212 |
#864 was for .NET source generator
Current issue is for having fsharp's own source generator / Meta programming
I was writing C++ template then I felt like I was writing codes really useful but hard for people to see so I was interested doing such a thing in F# because I use it too, I imagined having the meta programming in F# would be useful, because C# already has source generator and F# types inferencing already saving a lot of works typing, it would be a nice addition having a feature that does more in this field
It would be allowing me :
Write expression first, generate type later :
People can now use expression freely expecting it would be correct and has support to types involved in the expression, the source-generating / meta-programming aspect of the F# language would ensure you can use the expression, and compilation generates specific type so the alternative way of boxing aguments to object and handling each types when the program is running is not needed (saving computation)
The text was updated successfully, but these errors were encountered: