{"id":39655,"date":"2023-06-08T20:31:19","date_gmt":"2023-06-09T00:31:19","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=39655"},"modified":"2023-06-08T20:31:19","modified_gmt":"2023-06-09T00:31:19","slug":"the-rust-i-wanted-had-no-future","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/06\/08\/the-rust-i-wanted-had-no-future\/","title":{"rendered":"The Rust I Wanted Had No Future"},"content":{"rendered":"<p><a href=\"https:\/\/graydon2.dreamwidth.org\/307291.html\">Graydon Hoare<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=36193326\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/graydon2.dreamwidth.org\/307291.html\"><p>This is maybe not clear enough, and it might make the question of whether the project &ldquo;really should have had a BDFL&rdquo; a little sharper to know this: the Rust We Got is many, many miles away from The Rust I Wanted.<\/p><p>[&#8230;]<\/p><p>I wanted crates to allow inlining inside but present stable entrypoints to the outside. Swift wound up close to here, it&rsquo;s <a href=\"https:\/\/faultlore.com\/blah\/swift-abi\/\">a huge technical headache<\/a> but failure to do so is also a big part of Rust&rsquo;s <a href=\"https:\/\/www.pingcap.com\/blog\/rust-compilation-model-calamity\/\">terrible compile times<\/a> and lack of a stable ABI. I resisted this at the time and have objected to the choice ever since. It&rsquo;s likely necessary in today&rsquo;s Rust given the next point though.<\/p><p>[&#8230;]<\/p><p>Another thing that&rsquo;s great to have a compiler open-code is an integer type that overflows to an owned or refcounted bignum type: shipping enough stuff to let this happen efficiently in libraries is a huge pain (even if you get as far as stable inline assembly it won&rsquo;t go as fast as doing it in the compiler) and .. Rust just decided not to. I wanted it to, but I lost. Integers overflow and either trap or wrap. Great. Maybe in another decade we can collectively decide this is also an important enough class of errors to catch?<\/p><p>[&#8230;]<\/p><p>Tail calls. I actually wanted them! I think they&rsquo;re great. And I got argued into not having them because the project in general got argued into the position of &ldquo;compete to win with C++ on performance&rdquo; and so <a href=\"https:\/\/mail.mozilla.org\/pipermail\/rust-dev\/2013-April\/003557.html\">I wound up writing a sad post rejecting them<\/a> which is one of the saddest things ever written on the subject.<\/p><p>[&#8230;]<\/p><p>The priorities I had while working on the language are broadly not the revealed priorities of the community that&rsquo;s developed around the language in the years since, or even that were being-revealed in the years during. I would have traded performance and expressivity away for simplicity -- both end-user cognitive load and implementation simplicity in the compiler -- and by doing so I would have taken the language in a direction <em>broadly<\/em> opposed to where a lot of people wanted it to go.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Graydon Hoare (Hacker News): This is maybe not clear enough, and it might make the question of whether the project &ldquo;really should have had a BDFL&rdquo; a little sharper to know this: the Rust We Got is many, many miles away from The Rust I Wanted.[&#8230;]I wanted crates to allow inlining inside but present stable [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-06-09T00:31:21Z","apple_news_api_id":"f6593ce2-b6fb-4e97-b6d0-e3c0aff69774","apple_news_api_modified_at":"2023-06-09T00:31:21Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A9lk84rb7Tpe20OPAr_aXdA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[46,71,408],"class_list":["post-39655","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-languagedesign","tag-programming","tag-rust-lang"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/39655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=39655"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/39655\/revisions"}],"predecessor-version":[{"id":39656,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/39655\/revisions\/39656"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=39655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=39655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=39655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}