TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Flix Programming Language

222 点作者 sivakon超过 1 年前

26 条评论

jorkadeen超过 1 年前
The website is infrequently updated, so let me provide some information about what we are currently working on:<p>- We are trying to make the entire compiler resilient (error-tolerant), incremental, and parallel. We have managed to make every single compiler phase (of which there are 28) parallel. This has already led to significant speed-ups. We are now trying to increase the degree of parallelism within each phase. We are also working on error resilience to provide LSP support no matter what errors a program contains (syntax, naming, type). For example, it should be possible to rename a variable even if the program currently has multiple errors.<p>- We are adding support for algebraic effects and handlers. This will allow users to define and handle their own effects.<p>- We are also exploring a novel way to combine type classes (&quot;traits&quot;) and effects.<p>- We have recently added support for package management and integration with Maven.<p>In summary, we are already in a great spot, and useful programs can be written in Flix today. I encourage you to check out the documentation: <a href="https:&#x2F;&#x2F;doc.flix.dev&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;doc.flix.dev&#x2F;</a> and to try Flix!<p>(I am one of the developers of Flix).
评论 #38423779 未加载
评论 #38420621 未加载
评论 #38420745 未加载
评论 #38420725 未加载
nextaccountic超过 1 年前
&gt; Region-based Local Mutation<p>&gt; Flix supports region-based local mutation, which makes it possible to implement pure functions that internally uses mutable state and destructive operations, as long as these operations are confined to the region.<p>&gt; We can use local mutation when it is more natural to write a function using mutable data and in a familiar imperative-style while still remaining pure to the outside world.<p>&gt; We can also use local mutation when it is more efficient to use mutable data structures, e.g. when implementing a sorting algorithm.<p>Another language with a feature like this is F* (or FStar), but I think it uses a different kind of compile-time analysis.<p>Haskell actually kind of lets you do it through the ST monad (there&#x27;s a function called runST that turns mutable code inside the ST monad into pure code). But F* (and Flix) can do it implicitly
评论 #38422053 未加载
dang超过 1 年前
Related. Others?<p><i>Flix – Safe, reliable, concise, and functional-first programming language</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31448889">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31448889</a> - May 2022 (42 comments)<p><i>Flix – Next-generation reliable, concise, functional-first programming language</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25513397">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25513397</a> - Dec 2020 (84 comments)<p><i>The Flix Programming Language</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19928153">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19928153</a> - May 2019 (2 comments)
3PS超过 1 年前
I absolutely love the idea of embedding Prolog-esque rules inside a full traditional programming language for solving specific problems. The region-based local mutation is also an incredible idea that would really solve one of my core pain points with immutable languages like Haskell and Elixir.<p>Also this part made me let out an audible &quot;wow&quot;:<p>&gt; We can exploit purity reflection to selectively use lazy or parallel evaluation inside a library without changing the semantics from the point-of-view of the clients.<p>Will definitely keep an eye on this language! The syntax seems a little odd (inferring type parameters for functions?) but I&#x27;m sure I could get used to it.
archargelod超过 1 年前
&gt; The following design choices may be considered controversial by some:<p>&gt; Dividing by zero yields zero. <a href="https:&#x2F;&#x2F;www.hillelwayne.com&#x2F;post&#x2F;divide-by-zero&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.hillelwayne.com&#x2F;post&#x2F;divide-by-zero&#x2F;</a><p>That&#x27;s one interesting point I would love to read any opinions on.<p>Edit: Here&#x27;s a HN discussion about the `divide by zero` article - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17736046">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17736046</a>
评论 #38422182 未加载
评论 #38424104 未加载
评论 #38422896 未加载
ReleaseCandidat超过 1 年前
One problém of Flix has been the split of the world in &quot;normal&quot; und &quot;graded&quot; type classes, because of the effects as types. Is this solved now?<p>Example see: <a href="https:&#x2F;&#x2F;github.com&#x2F;Release-Candidate&#x2F;flix-test">https:&#x2F;&#x2F;github.com&#x2F;Release-Candidate&#x2F;flix-test</a>
IshKebab超过 1 年前
Top marks for the website - passes all the tests:<p>* Example at the top<p>* Link to playground<p>* Explanation of all the features, with examples!<p>* Says which features are unique<p>The only thing I was found wondering was &quot;why datalog&quot;?<p>Language looks pretty good.
评论 #38420731 未加载
ashton314超过 1 年前
Woah, the effect system looks really neat at first glance. Also, “region-based local mutation” so your pure functions can use mutation under the hood for performance? Sweet!
评论 #38419647 未加载
globalnode超过 1 年前
do functional languages mainly appeal to computer language enthusiasts&#x2F;researchers? im just not seeing the benefit personally.
评论 #38419783 未加载
评论 #38420377 未加载
评论 #38420207 未加载
评论 #38424110 未加载
评论 #38419661 未加载
评论 #38422205 未加载
Yoric超过 1 年前
Oh, Datalog within the language? Exciting!<p>I&#x27;ve been looking for such a feature for some time. Do I understand correctly that the facts can be established dynamically from, say, IO functions?<p>Also, are you going to present at FOSDEM?
preordained超过 1 年前
Datalog! I especially like that in the smorgasbord of features. I&#x27;m still not convinced having a sentient AI encoded in the type system is what the doctor ordered for industry at large.
linter超过 1 年前
Great, But \ is ugly
评论 #38419619 未加载
评论 #38419737 未加载
评论 #38419716 未加载
ww520超过 1 年前
This looks interesting with lots of feature packed. Looks like a promising language.<p>One thing not clear is what&#x27;s the reference vs value model, lifetime, and mutable vs immutable model.
liamilan超过 1 年前
Just a friendly UBC piggyback on Waterloo’s programming language ;)<p>Over summer, I built my own little functional language, Crumb (<a href="https:&#x2F;&#x2F;github.com&#x2F;liam-ilan&#x2F;crumb">https:&#x2F;&#x2F;github.com&#x2F;liam-ilan&#x2F;crumb</a>). Unlike Flix, the scope is tiny, but some pretty awesome stuff has been done with it. (Checkout this pixel art editor in your terminal, 100% Crumb: <a href="https:&#x2F;&#x2F;github.com&#x2F;ronilan&#x2F;crumbicon">https:&#x2F;&#x2F;github.com&#x2F;ronilan&#x2F;crumbicon</a>).<p>There’s a template (<a href="https:&#x2F;&#x2F;github.com&#x2F;liam-ilan&#x2F;crumb-template">https:&#x2F;&#x2F;github.com&#x2F;liam-ilan&#x2F;crumb-template</a>) and vscode highlighter (<a href="https:&#x2F;&#x2F;github.com&#x2F;liam-ilan&#x2F;crumb-vscode">https:&#x2F;&#x2F;github.com&#x2F;liam-ilan&#x2F;crumb-vscode</a>) for anyone who wants to mess around with it. Any feedback super appreciated :D
评论 #38419814 未加载
Asraelite超过 1 年前
&gt; Unused definitions, type declarations, etc. are compile-time errors.<p>This is disappointing. One my main grievances with Go is that it&#x27;s very difficult to prototype code because it won&#x27;t compile with unused variables. It massively slows down development. It annoyed me so much that I eventually forked the Go compiler and made a version where unused variables are only a warning.
pimbrouwers超过 1 年前
You had me until JVM
owenbrown超过 1 年前
It boggles my mind that any developer of a new language wouldn’t use Python’s significant use of white space.<p>You’re able to fit more code on a screen, and it’s less visual noise. It’s like Pareto better. I really don’t get why others don’t copy it.
评论 #38424271 未加载
imoverclocked超过 1 年前
Flix seems to be implemented in Scala 2.13. Should we expect Flix to work anywhere Scala 2.13 works? ie: if Scala 2.13 supports JDK 8, should we expect that Flix will not take advantage of later JVM features?
评论 #38420456 未加载
airstrike超过 1 年前
This feels like a nice language to write a spreadsheet engine on...
paolosimone超过 1 年前
Literally started playing with it yesterday!<p>Rough edges, but I&#x27;m really liking it so far. Let&#x27;s see how it will handle the upcoming Advent of Code.
adultSwim超过 1 年前
Been keeping an eye on Flix. Looks like wonderful language. Wish I could use it at work.
fithisux超过 1 年前
Sounds exteremely amazing
andrewstuart超过 1 年前
I&#x27;m disappointed this is not from Netflix.
subarctic超过 1 年前
Lots of interesting bits in the FAQ: <a href="https:&#x2F;&#x2F;flix.dev&#x2F;faq&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;flix.dev&#x2F;faq&#x2F;</a><p>Particularly in the sections titled &quot;What features are not supported&quot; (no exceptions or panics, so e.g. indexing has to return an Option in case it&#x27;s out of bounds) and &quot;What controversial design choices are made&quot;. Some pithy remarks towards the end as well.<p>To follow HN tradition and find the most controversial topic to discuss, my guess is it&#x27;s either not allowing name shadowing, or divide by zero equals zero. Or the site not working without javascript (see the section on that near the end, but you&#x27;ll need to turn on javascript to read it I guess)
评论 #38419769 未加载
评论 #38419909 未加载
评论 #38420354 未加载
teleforce超过 1 年前
From the website &quot;Flix is inspired by OCaml and Haskell with ideas from Rust and Scala&quot;.<p>Inspirations and ideas from four of the arguably most complex languages of the modern world, all the best with that.
评论 #38424410 未加载
thefourthchime超过 1 年前
In today&#x27;s world, i think that English is the only programming language that people should focus on.<p>With the rapid rise of AI, most tasks will soon involve the management of AI models rather than writing code. However, it is still important to have a basic understanding of coding.<p>Introducing a new programming language at this point seems silly to me.
评论 #38419866 未加载
评论 #38419892 未加载
评论 #38420022 未加载
评论 #38423026 未加载
评论 #38422369 未加载