Earlier quoted context omitted.
I'm not talking about that JS output, I mean the F# itself. While I'm not the most familiar with F#, I've enjoyed other languages that transpile to JS a lot more. For whatever reason, F# to me looks surprisingly verbose in Fable, which is odd because it's pretty terse on the backend.
Oh, I see. You said "resulting code", that's why I thought otherwise.
A new F# compiler feature: graph-based type-checking
81–90 of 118 posts
Re: A new F# compiler feature: graph-based type-checking
#82Earlier quoted context omitted.
Type providers are boss. Why doesn’t every language type system have this feature by now?!
Because they are pretty annoying to implement and most are quite fragile
But this is also it’s greatest strength. Having direct, type-safe access to structured data is truly awesome. What else compares? Certainly not conventional code gen.
Re: A new F# compiler feature: graph-based type-checking
#83Great, now how about Microsoft stop treating F# like a redheaded stepchild? 99.999% of .NET shops will not touch it.
Re: A new F# compiler feature: graph-based type-checking
#84Earlier quoted context omitted.
Because they are pretty annoying to implement and most are quite fragile
Yep, implementing one (a solid one) is hardcore. But think about it. Building, say, an XML or SQL type provider is a big deal. Doing it right requires special talent, because you are essentially building a transpiler to seamlessly interface with F#. But this is also it’s greatest strength. Having direct, type-safe access to structured data is truly awesome. What else compares? Certainly not conventional code gen.
Re: A new F# compiler feature: graph-based type-checking
#85Earlier quoted context omitted.
In fairness it is rather terrifying :P personally I pull all necessary information into some form of version-controlled storage, and then have a test to assert that the remote information is consistent with the stored version. Life's too short to have nondeterministic builds.
yeah that's fair. That's what I landed on too, and would think anyone using it seriously would be doing the same. But the fact that you could extend the compiler to program your own code generation in F# itself is amazing. Comptime in Zig reminds me of this too. I'd have to think OCaml has something similar, but I'm not too familiar with it.
Re: A new F# compiler feature: graph-based type-checking
#86Earlier quoted context omitted.
No. > How do Source Generators compare with Type Providers in F#? > If you’re an F# programmer (or familiar with the language), then you might have heard of Type Providers. Source Generators were inspired in part by Type Providers, but there are several differences that make them distinct. The main difference is that Type Providers are a part of the F# language proper and emit types, properties, and methods in-memory…
I get that the mechanisms are different, but the end result is the same. Edit: sample here with a JSON template: https://github.com/CharlieDigital/dn7-source-generators
> For Schema.NET, we do a HTTP request to get the JSON we need to build
https://turnerj.com/blog/the-pain-points-of-csharp-source-ge...
Also phillipcarter says yes so I'll happily take his view over mine.
Re: A new F# compiler feature: graph-based type-checking
#87Re: A new F# compiler feature: graph-based type-checking
#88Earlier quoted context omitted.
for console apps, F# sadly suffers from general .NET issues for console apps. Very large size (>150MB for a simple app) and at least 400-700msec startup time
My CLI is 180-185ms startup time, and about 10-20MB for a complex app (with a runtime dependency).
For CLIs I much prefer self-contained build outputs which is quite huge when it comes to .NET unfortunately.
Re: A new F# compiler feature: graph-based type-checking
#89It would be nice if I stopped needing to update the fsproj file for imports and hierarchy. If this could be dynamically built using a topological graph approach that would be a huge improvement. I don't use a heavy IDE so it's kinda tedious to need to update the fsproj file when i want to add a new file.
What are you using as your development environment? Personally I don't find the overhead in Vim to be too onerous (`yypf"ci"NewFile.fs`), and even in Rider I routinely edit fsproj files manually. (I even create new projects mostly by hand.)
Re: A new F# compiler feature: graph-based type-checking
#90Earlier quoted context omitted.
yeah that's fair. That's what I landed on too, and would think anyone using it seriously would be doing the same. But the fact that you could extend the compiler to program your own code generation in F# itself is amazing. Comptime in Zig reminds me of this too. I'd have to think OCaml has something similar, but I'm not too familiar with it.
Java has this too with the Manifold[1] project. It’s mind blowing. 1. https://github.com/manifold-systems/manifold