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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The Rust I wanted had no future

868 点作者 dochtman将近 2 年前

58 条评论

sph将近 2 年前
Very interesting insight from Graydon, in hindsight I too would have loved something more towards ML than C++. I never liked the kitchen sink approach that I see first C++, now Rust moving towards, but I respect what Rust has managed to solidify into. It&#x27;s a good language.<p>That said, I still hate async with a passion, it makes the language more complex and not very elegant (i.e. function coloring). And now that I know how it works behind the scene (thanks to Jon Gjengset [1]), it feels so complicated and hacky, a mediocre very high level concept that someone managed to implement as a zero-cost abstraction. Impressive, but still a bad idea.<p>I&#x27;m sure the pro of having a BDFL instead of a committee is being able to follow a singular vision, instead of trying to appease members by adding the fad du jour which might stray a little too far from the original vision. Too many chefs in the kitchen and all.<p>1: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ThjvMReOXYM">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ThjvMReOXYM</a>
评论 #36193862 未加载
评论 #36193771 未加载
评论 #36197452 未加载
评论 #36196223 未加载
评论 #36195109 未加载
评论 #36194911 未加载
评论 #36194196 未加载
评论 #36200087 未加载
评论 #36194971 未加载
评论 #36201294 未加载
评论 #36204156 未加载
评论 #36200995 未加载
评论 #36195823 未加载
titzer将近 2 年前
&gt; Library-defined containers, iteration and smart pointers. Containers, iteration and indirect-access operations (along with arithmetic) comprise the inner loops of most programs and so optimizing their performance is fairly paramount; if you make them all do slow dispatch through user code the language will never go fast. If user code is involved at all, then, it has to be inlined aggressively. The other option, which I wanted, was for these to be compiler builtins open-coded at the sites of use, rather than library-provided. No &quot;user code&quot; at all (not even stdlib). This is how they were originally in Rust: vec and str operations were all emitted by special-case code in the compiler. There&#x27;s a huge argument here over costs to language complexity and expressivity and it&#x27;s too much to relitigate here, but .. I lost this one and I still mostly disagree with the outcome.<p>Trust me, you do <i>not</i> want to put this stuff into the compiler. It&#x27;s not <i>just</i> that it&#x27;s cheating for perf, but it&#x27;s confusing to users (no source code to read how these work) and frustrating that they can&#x27;t write their own. Ultimately what this really means is that these things are indeed written in <i>some</i> language--the compiler&#x27;s <i>IR</i>. JavaScript actually has a ton of this kind of things and every JS engine has gone through multiple generations of &quot;what language do we write Array.sort in!?&quot;. In V8, these intrinsics are written in a DSL because doing them in asm, a special dialect of C++, or one of two compiler IRs ended up being more trouble than its worth.<p>You want a clear separation between what is language and what is library.
评论 #36199226 未加载
评论 #36198408 未加载
moonchrome将近 2 年前
As someone casually following Rust and haven&#x27;t touched it or C++ in probably 5+ years (but keeping tabs in hope of coming back to that world), I feel like a lot of decisions he mentions are what made me optimistic about Rust adoption&#x2F;positioning itself as a modern C++ replacement. So I kind of agree with his conclusion - his version of Rust would be much less interesting to me, and I think a lot of it&#x27;s current users. eg. I only started playing with Rust once they removed green threads. Zero cost abstractions are a major selling point.
评论 #36193786 未加载
评论 #36193832 未加载
评论 #36193953 未加载
hardwaregeek将近 2 年前
A lot of Graydon&#x27;s ideas feel like interesting extensions to ML-style languages. I bet if he had continued down that path, it would have been a lot more of an experimental language with a hodgepodge of different ideas. Which is totally valid (you need these languages to test new paradigms and features), but definitely would not have become mainstream.<p>Basically, I view Grayson as a leader who set the tone for Rust being a language that was willing to take ambitious swings on cutting edge features. But I don&#x27;t think he would have been the person to eventually make the cuts and compromises necessary to hew the language into a cohesive, mainstream language. Rust ending up as a replacement C++ helped it not only determine which features to keep and which rules to follow, but also helped it create the right pitch for developers to use it.<p>This does lead to a larger question about BDFLs. Perhaps, like CEOs, the BDFL you want when you&#x27;re starting a language is not the BDFL you want when you&#x27;re maturing a language, or maintaining a language. Especially around feature selection, in the beginning it may pay off to add a lot of features based on user feedback, but later on it may be better to push back more. And from a psychological standpoint, I have wondered about the pressure of being a BDFL. Grayson has been open about stepping down partially due to reaching his limits, and I suspect other BDFLs have thought about it too. The job sounds exhausting and thankless. At a certain point, wouldn&#x27;t you want to leave and start a new project? And wouldn&#x27;t we want the person who had success once to give it another shot?
评论 #36197118 未加载
anonyfox将近 2 年前
I love Rust and built some production code with it in the past. But nowadays I want something more simple so that not-so-senior developers can pick it up quickly, and I want flawless tooling, and willing to sacrifice a bit of performance. So basically I often end up with Go. Go is exceptionally great in tooling, ecosystem, any objective metrics like build times or crosscompilation... but I still don&#x27;t like the language itself personally.<p>If there would be something just like Go, but with a bit more powerful typesystem like Rust has (Option&lt;T&gt; instead of `err != nil`, and so on), and a simplified ML-like language instead of an imperative one... that would be my dream.
评论 #36198848 未加载
评论 #36195261 未加载
评论 #36199610 未加载
评论 #36197137 未加载
评论 #36195265 未加载
评论 #36199660 未加载
评论 #36197773 未加载
评论 #36196428 未加载
评论 #36200247 未加载
评论 #36195865 未加载
评论 #36195280 未加载
评论 #36195686 未加载
javajosh将近 2 年前
Too bad graydon didn&#x27;t get his way with build times. I&#x27;ve come to believe that the most important feature of any development environment is to minimize the built-test-debug cycle. Of course, a real system has many different ones, ranging from &quot;language level&quot; to &quot;I have to redeploy and perform a complex series of actions in an app or 3&quot;. But at the language level I&#x27;ve found that <i>build performance</i> is of paramount importance. And when a project ignores build perf, <i>everyone suffers every time they build</i>. Since the lower-limit is the language compiler, it should therefore be kept very fast. (And the people working on the applications must <i>constantly resist</i> adding features that slow the BTD loop down any further.)<p>A good example of this trade-off in Java is Lombok. A very handy library that legitimately avoids a ton of boilerplate, but it also absolutely tanks your build time. In a real system, a large one, your team is better off just getting good enough with their editor that they can generate the hateful boilerplate, and leave Lombok out. Because you&#x27;ll be paying for Lombok all the time, and only need it a small fraction of the time. There are hundreds, thousands of these conveniences that are deeply tempting but should be avoided, in every build. The problem is that the programmers become attached to these little nicities and actively resist giving them up, even though they are so costly.
评论 #36197232 未加载
评论 #36196331 未加载
评论 #36211152 未加载
评论 #36197550 未加载
评论 #36195410 未加载
jstx1将近 2 年前
A bunch of things you don&#x27;t like about Rust? Turns out that the person who originally created the language doesn&#x27;t like them either.<p>I know that the main point is about governance and how having a BDFL would have led to a completely different language but I really would have preferred the Graydon-BDFL-Rust to what we have today.<p>Very interesting article, worth a read.
评论 #36193964 未加载
评论 #36193740 未加载
评论 #36193641 未加载
评论 #36193677 未加载
评论 #36199783 未加载
评论 #36200508 未加载
评论 #36194132 未加载
bfrog将近 2 年前
After reading this I&#x27;m really quite happy Graydon created Rust, but then conceded the path it has taken.<p>It really is an incredibly language and ecosystem, in large part, because of its performance potential.<p>To be clear, the only real options in this space were arguably C, C++, and maybe in some circles D in my mind. C++ and C by far had the mind share.<p>Had Rust gone the way Graydon wanted I don&#x27;t think Rust would be so interesting in the OS and Embedded space. This is a space that it turns out is really ripe for change.<p>Embedded application are growing more connected, and more complex all the time. Security is a serious concern perhaps followed by or proceeded by performance depending on who you ask. Rust checks so many boxes off in this space its really hard to argue that it isn&#x27;t a better solution.<p>Would you rather write a little embedded http server on an IoT device in C, C++, or Rust? What about an embedded networking stack? What about a mesh network stack? I know the answer I&#x27;d have every time for this myself.
评论 #36199804 未加载
xiphias2将近 2 年前
,,I would have traded performance and expressivity away for simplicity&#x27;&#x27;<p>,,A lot of people in the Rust community think &quot;zero cost abstraction&quot; is a core promise of the language. I would never have pitched this and still, personally, don&#x27;t think it&#x27;s good&#x27;&#x27;<p>If the language makes compromises in performance, it&#x27;s not a real C++ competitor anymore.<p>Some things are not about what people ,,like&#x27;&#x27;, but that we need a language that is safe and can compete with C&#x2F;C++ in performance for systems level programming, as most security problems in the world come from C&#x2F;C++ memory management.<p>If it&#x27;s significantly slower than C++, Mozilla couldn&#x27;t have picked it up to replace C++ code base, as there was a huge competition in performance between browsers.
评论 #36195479 未加载
评论 #36199975 未加载
评论 #36195386 未加载
krupan将近 2 年前
The key challenge of rust for me:<p>&quot;Complex grammar. I&#x27;ve become somewhat infamous about wanting to keep the language LL(1) but the fact is that today one can&#x27;t parse Rust very easily, much less pretty-print (thus auto-format) it, and this is an actual (and fairly frequent) source of problems. It&#x27;s easier to work with than C++, but that&#x27;s fairly faint praise. I lost almost every argument about this, from the angle brackets for type parameters to the pattern-binding ambiguity to the semicolon and brace rules to ... ugh I don&#x27;t even want to get into it. The grammar is not what I wanted. Sorry.&quot;
评论 #36202072 未加载
评论 #36225469 未加载
ZephyrBlu将近 2 年前
This is an interesting read, because I read it as &quot;I would have done all these things which would have kept the language more pure to my vision but less accessible&quot;.<p>I also found this bit interesting: &quot;It&#x27;s easier to work with than C++, but that&#x27;s fairly faint praise&quot;.<p>I see this kind of thing in my own personal projects all the time. I&#x27;m thinking &quot;oh it would be really cool if I built X&quot; when in reality most of the time users just want really simple stuff.<p>Being easier to work in than C++ might be faint praise, but it&#x27;s probably the biggest draw of Rust for me. I don&#x27;t want to touch C++ with a 10ft pole, but I love using Rust.
评论 #36194272 未加载
评论 #36194385 未加载
mjburgess将近 2 年前
Over the evolution of Rust, I&#x27;ve been increasingly despairing about many of the things Graydon here dislikes. I assumed the present &quot;syntactical insanity&quot; was, somehow, intended; it seems, really, it wasn&#x27;t.<p>I find Rust basically unusable -- at the level of abstraction I want to write code, basic definitions break line limits.<p>Rust seems to be a repetition of C++&#x27;s mistake: a language which conspires you to pretend it&#x27;s another. There are now nearly as many Rusts as C++s.<p>If I return to any domains where Rust would be relevant, I&#x27;d probably now opt for Zig or equivalent.
评论 #36195997 未加载
评论 #36196527 未加载
bazoom42将近 2 年前
To be successful, it is not enough for a language to be good. It might not even be necessary. What matters is if there is s significant niche where the language is a better fit than any alternative.<p>PHP show that a language only needs to get that one thing right.<p>Rust have found its niche. Graydons vision seem to be a more elegant language which would compromize on the points which actully make Rust succesful.
评论 #36198904 未加载
评论 #36196581 未加载
Aissen将近 2 年前
On integer wrapping, I think explicit wrap is annoying at first, but eliminates a whole class of bug. I can only agree with:<p>&gt; (Swift at least traps in release by default -- I wish Rust had chosen to).<p>I enable it in release on serious projects:<p><pre><code> [profile.release] overflow-checks = true</code></pre>
评论 #36194335 未加载
评论 #36194540 未加载
评论 #36195022 未加载
PhilipRoman将近 2 年前
Haven&#x27;t followed Rust too much, but I&#x27;m always surprised when I hear that Rust is too difficult or not ergonomic. As I understand it is meant to be a systems level language; something you&#x27;d use to write kernels, TCP stacks, browsers and ssh daemons.<p>Anyone writing these things today in C or C++ already understands object lifetimes and Rust just adds a static checker for them.<p>In such projects churning out lines of code is not the bottleneck, ease of development should not be prioritized over long term maintainability.<p>Why on earth would you try to rewrite python CRUD apps in Rust?
评论 #36194879 未加载
评论 #36195117 未加载
评论 #36194104 未加载
评论 #36198000 未加载
weinzierl将近 2 年前
One thing I wished was on this list, but wasn&#x27;t, is syntax. I love many syntax decisions Rust made, but I wish Rust hasn&#x27;t borrowed so much syntax from C&#x2F;C++. The syntax of these languages was designed under (for todays standards) weird keyboard and encoding constraints and many choices are just odd.<p>To give you a few examples:<p>- = instead of == for equality would have been the natural choice<p>- := for assignment is similar enough to what is used in math for definition, so that languages like Pascal use it<p>- &lt;&gt; for inequality is something SQL got right<p>Smaller things that bug me are the ubiquity of the double colon (::) and the weird mixture of snake case and camel case conventions.<p>And not to leave the wrong impression, I think Rust got many things very right. My personal highlights are:<p>- -&gt; for the return value<p>- concise keywords like `fn`<p>- `where` for constraints<p>In general more Algol&#x2F;Pascal and Haskell - less BCPL and C&#x2F;C++.
评论 #36197445 未加载
评论 #36196515 未加载
评论 #36194914 未加载
Aardwolf将近 2 年前
&gt; Tail calls. I actually wanted them! I think they&#x27;re great. And I got argued into not having them because the project in general got argued into the position of &quot;compete to win with C++ on performance&quot; and so I wound up writing a sad post rejecting them<p>I don&#x27;t understand the subtleties here: Is tail calls an optimization the compiler can do irrespective of the language? Or is there something that prevents this and <i>requires</i> the compiler to use stack here? Is there any visible effect to the programmer from supporting tail call or not, other than performance and stack depth?<p>How does not supporting them compete with C++ performance?
评论 #36194989 未加载
评论 #36194443 未加载
评论 #36195081 未加载
erik_seaberg将近 2 年前
I’m very glad expressivity won out. I would like our profession to stop accepting tools that waste effort.<p>I’ve always seen safety and lifetimes and borrowing as the main value prop, so I was surprised to see he was sort of aiming at an ML without GC, rather than a C++ that doesn’t blow up.
评论 #36194440 未加载
dathinab将近 2 年前
One thing I want to add wrt. &quot;Cross-crate inlining and monomorphization. I wanted crates to allow inlining inside but present stable entrypoints to the outside.&quot; [..] is that it was in general well desired AFIK by most developers but so far out of scope that you probably would need to had the resources rust has today _before_ the 1.0 release to get it done right. At lest with the state CS research had been at during that time. By now due to various reasons (e.g. swift) there is much more research in that direction already done hence a new language has it much easier.
评论 #36197057 未加载
mhd将近 2 年前
Ah, Sather gets mentioned. That&#x27;s a name I haven&#x27;t heard in a long time. I remember looking at it during the latter half of the 90s when I was searching for the perfect OO language...<p><a href="https:&#x2F;&#x2F;www1.icsi.berkeley.edu&#x2F;~sather&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www1.icsi.berkeley.edu&#x2F;~sather&#x2F;</a>
评论 #36239054 未加载
LeanderK将近 2 年前
Can someone comment on &quot;Library-defined containers, iteration and smart pointers&quot;? I have no rust experience so far. Magic compiler support for such primitives is something I usually very much, really strongly dislike, it was always my experience that it is the wrong point of abstraction because it just reduces the design state so much. But then you need good support for inlining the relevant parts of the language, which I think is very often very poorly done. In fact, I have so far never seen a solution I like.<p>What is the rust experience wrt to inlining? Can every expression be inlined or only selected ones? How can you know what got inlined in some expression? Do you have to manually annotate every single function call you have to inline or is there a more general command?
评论 #36194095 未加载
评论 #36195044 未加载
truculent将近 2 年前
It sounds like the Rust He Wanted has a lot of thematic similarities to Elm. Interestingly, Elm has a BDFL, and a development process that reflects that. And he’s right - there are a lot of people who really don’t like that!<p>Overall, a really interesting article. Though I like today’s Rust, I do think I would prefer the trade-offs made by the alt-Rust outlined here.<p>Perhaps it’s just my own personal preference, but I think there is a strong bias in users towards what they are already familiar with, and it’s hard to break away from those without a BDFl or similar position of authority who can impose their vision.
评论 #36194884 未加载
FrustratedMonky将近 2 年前
Great read from a creator of a language. There are so many new languages these days, it is always enlightening to hear the author discuss design tradeoff&#x27;s. That being said, man, its easy to forget how difficult and complicated creating a good language can be.<p>Makes me wonder if things like Linux, or C++, were historical anomalies, the stars aligned. How many good projects fail because of &#x27;loosing arguments&#x27; that should have been won, or the community didn&#x27;t form, etc... a million things..
junon将近 2 年前
&gt; I was weirdly focused on [the Actor] model that in practice has many issues<p>I maintain the actor model is probably the most theoretically perfect concurrency and distributed computing model. The holy grail. We just don&#x27;t have the right hardware for it and it&#x27;s extremely limited by addressability issues with current technology.<p>So I don&#x27;t really find this surprising, nor disagreeable. It&#x27;s just not a model that Works Well at present.
评论 #36199126 未加载
w10-1将近 2 年前
Graydon may lament the features that got away, but being a good loser may be the best way to encourage contributions and to respond to community needs. The historical forces on a language are both its constraints and its drivers. Languages that are nice conceptually are not responsive to history.<p>Both Swift and Rust both veered away from their original champions. The champions helped by focusing the problem and providing a technical skeleton, but the need (the pain of C&#x2F;C++&#x2F;Objective-C) was both intense and complex, so the community was stronger than the BDFL model.<p>Interestingly, Swift has seen Rust forge ahead on a number of fronts, but is quietly adopting the best of Rust, and soon interoperating with C&#x2F;C++ will be frictionless. The ties to Apple are being loosened, with a more portable stdlib and a Foundation library that subsets the legacy Apple Foundation instead of dragging Apple API&#x27;s into other platforms. If&#x2F;since Apple is to rewrite its systems in Swift, Swift will likely evolve into the best language for migrating off C&#x2F;C++.<p>Compare Graydon, von Rossum, or Chris Lattner to Java&#x27;s Mark Reinhold. Mark has been quietly at the helm of Java since 1997, navigating: the Oracle and open-source transitions, partners ranging from IBM to broad developer communities, continuous VM updates that kept Java relevant, and the quick pace of recent language&#x2F;library upgrades: lambdas (method and field handles), vector processing and FFI, native...
mcguire将近 2 年前
&quot;<i>Exterior iteration. Iteration used to be by stack &#x2F; non-escaping coroutines, which we also called &quot;interior&quot; iteration, as opposed to &quot;exterior&quot; iteration by pointer-like things that live in variables you advance. Such coroutines are now finally supported by LLVM (they weren&#x27;t at the time) and are actually a fairly old and reliable mechanism for a linking-friendly, not-having-to-inline-tons-of-library-code abstraction for iteration. They&#x27;re in, like, BLISS and Modula-2 and such. Really normal thing to have, early Rust had them, and they got ripped out for a bunch of reasons that, again, mostly just form &quot;an argument I lost&quot; rather than anything I disagree with today. I wish Rust still had them. Maybe someday it will!</i>&quot;<p>I remember that one. The change was shortly after I started fooling with Rust and was <i>major.</i> Major as in it broke all the code that I&#x27;d written to that point.<p>&quot;<i>Async&#x2F;await. I wanted a standard green-thread runtime with growable stacks -- essentially just &quot;coroutines that escape, when you need them too&quot;.</i>&quot;<p>I remember that one, too; it was one of the things that drew me to the language---I was imagining something more like Pony (<a href="https:&#x2F;&#x2F;www.ponylang.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.ponylang.io&#x2F;</a>).<p>&quot;<i>The Rust I Wanted probably had no future, or at least not one anywhere near as good as The Rust We Got.</i>&quot;<p>Almost certainly true. But The Rust We Got is A Better C++, which was never appealing to me because I never liked C++ anyway.
ch33zer将近 2 年前
What a wonderfully self aware and honest piece of writing.
Keyframe将近 2 年前
The Rust he wanted sounds a lot like Ada.
评论 #36193828 未加载
zozbot234将近 2 年前
Technically, Rust had no future prior to the 2018 edition. The fact that Rust can add new features as the use cases for it evolve is a strength of the language, one that it had from the start even with Graydon as a BDFL.
tormeh将近 2 年前
I think Rust is somewhat cumbersome as a language, but I also think the right tradeoffs were made. There are far fewer and far worse competitors in the high-performance space than in the general purpose space.
cmrdporcupine将近 2 年前
When I first read Graydon talking about his plans for Rust, I pictured it as StandardML (or OCaml) without a garbage collector, and I was sold. This list doesn&#x27;t look fully like that, but is closer than current Rust is.<p>My interest back then was in a higher level language with type inference and a modern ML-like type system but that could be used for systems programming, especially in database, virtual machine, and even operating system dev.<p>These days I work pretty much full-time in Rust, and I think Rust as it is today delivers on <i>some</i> of that promise, but not all. I feel like the language&#x27;s borrowing and ownership checking are pretty brilliant <i>but</i> really begin to become a pain when dealing with nested and interrelated trees of objects and iterators (like if building a compiler or query evaluator, etc.), and resorting to Arc&#x2F;Rc&#x2F;RefCell, etc. feels awkward.<p>I&#x27;m not sure if the language Graydon talks about here would have been better for that or not.<p>But I&#x27;m also happy we have Rust, because it&#x27;s an improvement over what else is out there, and I hope the community gets through its growing pains.
sheepscreek将近 2 年前
I’ll get straight to the point I want to make: Rust is suffering from an identity crisis. Much like Javascript.<p>Realizing this, I thoroughly feel the need for a “Rust, the good parts” doctrine.<p>A good portion of use-cases could be successfully implemented with a small subset of language. The small subset doesn’t need to be any more complicated than Go. And in doing so, we’d be reducing the entry barrier for masses and encouraging wider adoption.<p>Edited: For clarity
评论 #36208071 未加载
superkuh将近 2 年前
Funny how every time I click a link to a dreamwidth.org hosted blog the,<p>&gt;&quot;Hello, you&#x27;ve been (semi-randomly) selected to take a CAPTCHA to validate your requests. Please complete it below and hit the button!&quot;<p>...pops up and the button doesn&#x27;t actually work. Truly one of the worst blog hosts out there if you actually want everyone to be able to read what you write.
vintagedave将近 2 年前
&gt; The other option, which I wanted, was for these to be compiler builtins open-coded at the sites of use, rather than library-provided. No &quot;user code&quot; at all (not even stdlib). This is how they were originally in Rust: vec and str operations were all emitted by special-case code in the compiler.<p>One of the things I like about Delphi is that it has some powerful types as compiler intrinsics. Sets, strings (the compiler-generated code does call into RTL methods for things like finding substrings, but the string type itself), and so forth are all compiler-generated.<p>I would like to see more, in fact: I think a map type would be a great inbuilt addition. (What I&#x27;d really like is compiler stubs so you could link in your own implementation. Whatever is linked in, it&#x27;s then heavily optimised by the linker to be inlined etc as appropriate.)
0xDEF将近 2 年前
Rust moved in a direction where it is now a suitable alternative to C&#x2F;C++ all the way down to operating system code and bare-metal embedded firmware.<p>Graydon wanted something else even before Rust 1.0 was released. He wanted an OCaml-like language with modern Go&#x2F;Erlang-inspired higher level concurrency abstractions.
smasher164将近 2 年前
I admire Graydon&#x27;s humility on the subject--and sure enough, I disagree with some of his ideas in this post, and agree with other ones.<p>- Explicit lifetimes are what make rust what it is. It would have surely failed had they not been introduced.<p>- I disagree about having a first-class module system instead of traits. Coherence and implicit instance resolution are a core value of Rust. `Send &#x2F; Sync` are key examples of that.<p>- Green threads probably wouldn&#x27;t been viable for rust, given the kind of programs it&#x27;s targeting.<p>- Pretty much everything else however, I agree with.
neonsunset将近 2 年前
I can&#x27;t imagine Rust being even remotely viable without having generics or using LLVM to target a wide variety of platforms with sufficiently good codegen quality.
pjmlp将近 2 年前
While it has a been a great piece of wrong to introduce affine type systems into mainstream, it hardly justifies outside domains where any kind of automatic memory allocation isn&#x27;t either a blocker, or religious issue that won&#x27;t be sorted out even by proving the contrary.<p>I see the ongoing attempts to add linear types for low level coding, alongside automatic resource management more future proof.
rurban将近 2 年前
Interesting. So it looks like once he let the C++ folks in, they started to damage it. As they did with their own design decisions before.
评论 #36198833 未加载
pmontra将近 2 年前
&gt; The priorities I had while working on the language are broadly not the revealed priorities of the community that&#x27;s developed around the language in the years since<p>Isn&#x27;t that a matter of self selection? A language which developed around those priorities would have a community sharing those priorities now.<p>The point is if that community would be as large as the current one, larger, smaller.
评论 #36195078 未加载
评论 #36194515 未加载
MontagFTB将近 2 年前
&gt; Not 100% clear about actors -- I was weirdly focused on that model that in practice has many issues…<p>Any ideas what he meant here?
TowerTall将近 2 年前
The article starts with &quot;In a recent podcast about Rust leadership, the BDFL question came up again&quot;<p>What it BDFL?
评论 #36193922 未加载
评论 #36193914 未加载
评论 #36194496 未加载
评论 #36193950 未加载
评论 #36193951 未加载
svieira将近 2 年前
&gt; Not 100% clear about actors -- I was weirdly focused on that model that in practice has many issues<p>Does anyone have any insights on the particular issues with actor-based concurrency vs. &quot;direct parallelism like threads or locks&quot; that he might be thinking about here?
Lk7Of3vfJS2n将近 2 年前
Has Rust gone beyond the point of no return? Have less elegant features possibly been embedded in the language that have put Rust on the track to never become the hypothetically perfect or unblemished language?
评论 #36201351 未加载
p0nce将近 2 年前
&gt; First-class &amp;<p>Interestingly like Graydon suggests this and &#x27;tis something D has, you can only have `ref` for function parameters. This is something the users sometimes complain about, but I guess it has positives.
评论 #36195653 未加载
aidenn0将近 2 年前
I wanted nearly the same language Gradyon wanted, but I also suspect that my tastes are insufficiently mainstream for a language to my tastes to be as popular as Rust has become (much less as C++ is).
Decabytes将近 2 年前
I know we haven’t gotten to that point yet, but I’m curious to see if in my lifetime we get a successor to Rust that fixes a lot of issues people have with the language now.
codedokode将近 2 年前
I don&#x27;t understand why in Rust integers wrap around. It doesn&#x27;t make sense and there are vulnerabilities caused by wrapping integers in C.
评论 #36200406 未加载
jimwhite42将近 2 年前
On the &quot;Async&#x2F;await&quot; wrt IO and FFI, I wonder what Graydon and others think about the Erlang BEAM or the GHC runtime implementation.
qaq将近 2 年前
Will be interesting to see how things play out in Mojo as it looks like they will account for lessons learned by Rust community.
parasense将近 2 年前
He&#x27;s already created several programming languages, and there is still time to create his ideal.
worik将近 2 年前
&gt; basically every language discovers the long way that financial math is special and, at great length, eventually adds a decimal type.<p>And every case it is wrong<p>Financial math is not hard when you know how<p>Use integer types not horrific cludges like &quot;decimal&quot;<p>Just because IBM did it does not make it right. It is wrong
garbagecoder将近 2 年前
&gt;a viable c++ alternative<p>Wow, so one of the principal creators understands that that&#x27;s what it is, not a replacement for everything under the sun.<p>And it&#x27;s a GREAT c++ alternative, but ffs please stop telling me to use it for everything from webdev to embedded.
camgunz将近 2 年前
I would love to play with the language Graydon describes here.
olalonde将近 2 年前
&gt; Explicit lifetimes<p>I never understood that one either. There is always only one &quot;solution&quot; that will make your program compile, so why not just let the compiler figure it out?
评论 #36199576 未加载
cryptonector将近 2 年前
&gt; Environment capture. I often say (provocatively) that &quot;I hate lambda&quot;, but lambda is actually (at least) two separate language features: one is a notation for anonymous function literals; another is equipping those anonymous function literals with environment capture. I don&#x27;t really care either way about having such a literal syntax, but I really do dislike equipping it with environment capture and think it&#x27;s a mistake, especially in a systems language with observable mutation. Early Rust had something called &quot;bind expressions&quot; which I copied from Sather and which I think are better (clunkier but better). Rust gained lambda-with-environment-capture in a single package which I didn&#x27;t object to strongly enough, as part of trying to make interior iteration work on LLVM-with-no-coroutines, and this motivation was later removed when we moved to exterior iteration. But &quot;if I were BDFL&quot; I would probably roll back the environment capture part (it&#x27;s easier to tolerate for non-escaping closures which many are, eg. in non-escaping coroutines &#x2F; stack iterator bodies, but .. eh .. complex topic).<p>TFA loses me here. I rather like the Fn&#x2F;FnMut&#x2F;FnOnce business, though yeah, closures of dynamic extent are very limited unless you Box them to make them of indefinite extent... and so the whole language lacks that character that functional languages with GCs have, but it&#x27;s still functional, just functional with a straight-jacket.<p>Earlier in TFA there&#x27;s a mention of exterior iteration as in generators, and I want to point out that while generators are very nice, they are not a substitute for closures. Icon, for example, had iterators and first-class co-routines (&quot;co-expressions&quot;), but no closures, and so where one needed closures one had to use co-routines (costly!). It&#x27;s true that with generators one needs closures less than without generators, but still, closures are very important.<p>&gt; Traits. I generally don&#x27;t like traits &#x2F; typeclasses. To my eyes they&#x27;re too type-directed, too global, too much like programming and debugging a distributed set of invisible inference rules, and produce too much coupling between libraries in terms of what is or isn&#x27;t allowed to maintain coherence. I wanted (and got part way into building) a first class module system in the ML tradition. Many team members objected because these systems are more verbose, often painfully so, and I lost the argument. But I still don&#x27;t like the result, and I would probably have backed the experiment out &quot;if I&#x27;d been BDFL&quot;.<p>This loses me too.<p>It&#x27;s great then that Rust didn&#x27;t have a BDFL! :)<p>&gt; Underpowered existentials. The dyn Trait mechanism in Rust allows runtime and heterogeneous polymorphism, a.k.a. Existentials. These types are useful for many reasons: both solving heterogeneous representation cases and also selectively backing-off from monomorphization or inlining (when you have those) in order to favour code size &#x2F; compile time or allow dynamic linking or runtime extension. Early Rust tried to use these extensively (see also &quot;first-class modules&quot;) and actually had an intermediate-rigidity type called an obj that was always a sort of Cecil-like runtime-extensible existential glued to a self-type record that allowed method-by-method overriding at runtime (almost like a prototype-OO system). Today&#x27;s Rust strongly discourages the use of any such dynamic dispatch, a feedback loop arising from both technical limitations placed on them and a library ecosystem that&#x27;s taken that as a sign never to use them.<p>This, on the other hand, is a brilliant observation and I agree with it as with much else in TFA.<p>&gt; Tail calls. I actually wanted them! I think they&#x27;re great. And I got argued into not having them because the project in general got argued into the position of &quot;compete to win with C++ on performance&quot; and so I wound up writing a sad post rejecting them which is one of the saddest things ever written on the subject. It remains true with Rust&#x27;s priorities today, I doubt it&#x27;ll ever be possible across crates (maybe maybe within), but as with stack iterators IMO they&#x27;re a great primitive to have in a language, in this case for writing simple and composable state machines, and &quot;if I were BDFL&quot; I probably would have pointed the language in a direction that kept them. Early Rust had them, LLVM mostly made us drop them, and C++ performance obsession kept them consigned to WONTFIX bug status.<p>Oh dear. TCO is essential, IMO. I understand that it may not be possible in cross-crate cases, but still, TCO is very important.
demarq将近 2 年前
beautiful ending!
avgcorrection将近 2 年前
I haven’t cared about what Hoare thinks of Rust since 2015.<p>1. He hasn’t been involved in the language for a long time<p>2. His vision for the language was completely different compared to how the remaining developers ended up designing it. So if I ended up liking Rust under his “BDFL”ing then it would be for completely different reasons compared to why I like (and dislike) Rust today
评论 #36199583 未加载