TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Embedding the F# Compiler

50 pointsby kkdaemasover 3 years ago

3 comments

dharmaturtleover 3 years ago
I have ~8 months of Clojure experience and ~3 years of F#. Clojure&#x27;s REPL and feedback loop is bloody marvelous. F# also has a REPL, but it doesn&#x27;t compare. However I still prefer F#&#x27;s type-safety. (I believe) a key part of how Clojure&#x27;s REPL works is by compiling top level forms into JVM instructions which it puts into global mutable scope. Clojure can run on the CLR, so it seems this should be possible with F# as well. It would be cool if F# could temporarily bypass type-safety to quickly iterate on a module before plugging it back into the rest of an assembly and re-enabling type safety. There&#x27;s no reason to recompile everything when all I want is to test out a 1 line delta independent of its... uh... dependents.<p>Basically, I want Jupyter-stype notebooks to be my primary dev environment. The blog goes in that direction, but calling code via<p><pre><code> let result = assembly |&gt; extract&lt;string -&gt; Async&lt;unit&gt;&gt; &quot;This.Is.A.Namespace.HelloHost.myFunc&quot; </code></pre> is just yuck. What I want probably requires language level changes.
评论 #29217815 未加载
评论 #29218260 未加载
评论 #29217631 未加载
评论 #29234747 未加载
评论 #29234735 未加载
vrgfaover 3 years ago
F# is underrated and MSFT should promote it more (instead of promoting the &quot;open&quot; source Python efforts).
queilover 3 years ago
I have never expected my blog post to be in Hacker News. The aim of all of it is to be able to have F#-script-powered plugins in otherwise compiled code. Check out my example here: <a href="https:&#x2F;&#x2F;github.com&#x2F;queil&#x2F;fsc-host&#x2F;blob&#x2F;main&#x2F;examples&#x2F;CompileAndExtract&#x2F;Program.fs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;queil&#x2F;fsc-host&#x2F;blob&#x2F;main&#x2F;examples&#x2F;Compile...</a>