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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Austral: A Systems Language with Linear Types and Capabilities (2022)

155 点作者 yamrzou2 个月前

12 条评论

sirwhinesalot2 个月前
The explicit regions make it really clear what &quot;borrowing&quot; is actually doing. Rust tries to do as much as possible implicitly, which is convenient 90% of the time but when it doesn&#x27;t work as you expect you&#x27;re left scratching your head.<p>If nothing else, Austral makes for a wonderful teaching language for linear types&#x2F;regions&#x2F;capabilities.
skavi2 个月前
Really love the principles set out here. Love the concessions made in order to keep the language simpler.<p>I&#x27;ve been idly considering building an alternative Rust std lib with a shape that reminds me of the capabilities system laid out here. In my case that was less out of a desire for supply chain security (impossible if I&#x27;m just swapping the std lib) and more to discourage side effects from being produced deep within the core of program logic.<p>WRT the rejection of async, has there been any consideration of a more general feature like generators or coroutines? Resumable functions are a really nice way to write state machines. I don&#x27;t expect those to go out of style.
评论 #43443899 未加载
评论 #43436006 未加载
rybosome2 个月前
Linear types are an interesting idea.<p>I really liked the way that each transformation of the file was a separate File object, reminded me of functional style immutable data structures where each transformation returns a new structure.
评论 #43426332 未加载
评论 #43432005 未加载
评论 #43420881 未加载
评论 #43420444 未加载
zdragnar2 个月前
It&#x27;s a shame the last release was 2023 and the status was planning and expanding the standard library. I find myself rather enjoying both the syntax and stated philosophy. Unfortunately, I&#x27;m not really in a position to contribute anything myself to keep it going.
评论 #43420588 未加载
评论 #43420472 未加载
choeger2 个月前
Lovely. It is well written and has a design I can 100% agree with.<p>I am curious, though: How will separate compilation work? I think it&#x27;s an important practical feature but polymorphism (which I simply assume from the presence of type classes) and flexible file&#x2F;module mappings make it extremely difficult to implement.
nicoty2 个月前
If the author&#x2F;someone with knowledge of the language lurks here, there&#x27;s these unanswered questions from the previous discussions that I&#x27;d interested about: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34205220">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34205220</a>
评论 #43432062 未加载
评论 #43422740 未加载
randomNumber72 个月前
Its very interesting but i disagree with the operator precedence.<p>&gt; but programming languages have many categories of binary operators—arithmetic, comparison, bitwise, Boolean—and mixing them together creates room for error<p>I think an expert should be able to remember the operator precedence of C and s.th. like<p>a &lt; x &amp;&amp; b &gt;= y<p>is easier for a human to read than this<p>(a &lt; x) &amp;&amp; (b &gt;= y)<p>Edit: Besides that it looks pretty promising. They even got it right to call the void type unit.
rixed2 个月前
I love this project and particularly its documentation.<p>But:<p>&gt; Design Goals<p>&gt; - Simplicity (...) is the amount of information it takes to describe a system.<p>&gt; (...)<p>&gt;<p>&gt; Anti-Features<p>&gt; - There are no exceptions<p>&gt;<p>&gt; (Error handling etc. omitted for clarity.)<p>At first sight, error handling is going to be laborious in this language. I wonder what&#x27;s the state of the art in PL theory regarding error handling in a context without automatic resource management. Anything better than manual bubbling up of errors up the chain of callers until one takes responsibility?
评论 #43423934 未加载
beders2 个月前
I&#x27;m missing something on the discussion of correctness for Linear types:<p><pre><code> let file: File := openFile(&quot;test.txt&quot;); writeString(file, &quot;Hello, world!&quot;); g(file); </code></pre> If I have any other function &#x27;g&#x27; that takes a File and returns Unit, wouldn&#x27;t the compiler be ok with that. Now I have a dangling file pointer.
评论 #43425897 未加载
评论 #43425642 未加载
评论 #43428555 未加载
评论 #43426282 未加载
评论 #43428598 未加载
pieterr2 个月前
Earlier discussion:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34168452">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34168452</a>
aiono2 个月前
Very cool! This is exactly the topic I will probably be working in my Masters thesis. I am curious if you done anything about linearity and concurrency in the type system. Can one send files across threads for example?
评论 #43431831 未加载
conaclos2 个月前
An interesting design choice of Austral is the use of second-class references [0] in place of first-class references like Rust does. This makes the implementation of a borrow checker simpler at the cost of reduced expressiveness. Hylo (previously Val) [1] tries also to find a way of avoiding first-class references using value semantic and subscripts.<p>[0] <a href="https:&#x2F;&#x2F;borretti.me&#x2F;article&#x2F;second-class-references;" rel="nofollow">https:&#x2F;&#x2F;borretti.me&#x2F;article&#x2F;second-class-references;</a> [1] <a href="https:&#x2F;&#x2F;www.hylo-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.hylo-lang.org&#x2F;</a>
评论 #43428862 未加载