13 ms·
Four years with Rust
- achanda358 10y agoYou have relentlessly pushed for better documentation. Thanks for that :)
- niftich 10y agoMany thanks to the Rust team and the Rust community! Also, retrospectives and posts where a core contributor summarizes the achievements and accomplishments of the previous few years are extremely valuable. These days software and tools evolve really fast and old resources fall off the face of the earth for a various reasons, and it's important to understand how things used to be and how we got to where we are now.
- swuecho 10y agoI learn something new about rust, eg. irrefutable patterns as function argument in the blog. PS: I do not understand what irrefutable patterns means, so I google. https://www.haskell.org/tutorial/patterns.html https://www.haskell.org/tutorial/patterns.html in case anyone do not know yet.
- mr_luc 10y agoFor those of us who are getting to the party 3 years late, thank you. Just my 2p for others learning: for me, Rc::RefCell was what I was missing, even after I thought I was up to speed. I was fine using Channels for inter-thread communication and I never needed Arc, but use of Rc is common in the Rust ecosystem and a lot of my early fights with the borrow checker weren't fights I needed to have. In situations where it wasn't a trivial change, and I found myself banging my head against the wall, it was often because I was in a situation that called for a reference counted cell.
- cyphar 10y ago> Just my 2p for others learning: for me, Rc::RefCell was what I was missing, even after I thought I was up to speed. I started (and then stopped) learning Rust a few months ago (before their docs rewrite) and the borrow checker and concepts weren't explain in a way that I could understand. Programs wouldn't work at all, and when I read about Rc::RefCell I was scared because I wasn't sure how much garbage collection rust would do and whether or not it would actually be safe. So yeah. Rust definitely has problems for beginners.
- steveklabnik 10y agoTo be clear, Rust has no garbage collector, and unless you type "unsafe", it's safe. RefCell will panic when something goes wrong. I should take this opportunity to mention that the book has been stagnating because I (along with Carol Nichols || Goulding) have been re-writing it out of tree: https://doc.rust-lang.org/stable/book/ https://doc.rust-lang.org/stable/book/ The ownership/borrow checker stuff has been completely re-done. The existing book chapters explain it in the abstract; in the new book, we use String/&str as a motivating example, since that's an area that often trips up new Rust programmers.
- simcop2387 10y agoThat's great to hear. That's definitely an area that has made me slow down on learning Rust. Will definitely be checking out the new book once it's ready.
- wyldfire 10y ago> So yeah. Rust definitely has problems for beginners. IMO Rust has the challenges that are very similar to all other languages have. But if you are trying to make the leap from a GC'd language like Java or Python to Rust without ever having written C/C++, you should expect to have to learn not only new language concepts but new programming concepts.
- deleted 10y ago[deleted]
- isuraed 10y agoWhat kind of application s would Rust be an appropriate for? What languages is it largely meant to replace/improve on.
- biokoda 10y agoIt's meant as a c/c++ replacement.
- steveklabnik 10y agoRust is intended for applications where you need speed, concurrency, and safety/correctness. In some senses, "use Rust where you would use C or C++" makes sense, but we're also seeing a lot of usage from programmers who have rejected C or C++ for various reasons. One angle that we've been focusing a lot on lately is productivity. Think about some feature of Rust that provides safety, like out borrow checker, which ensures that pointers don't do bad things. One way to think about this is safety, but another way is productivity: if your application segfaults, you have to track down what actually caused it, and then what caused the cause: "oh this pointer was null because I did something incorrect in this other part of my code." While having the compiler do these checks can sometimes feel like a productivity _loss_ at the beginning, you do a lot less debugging later, so it's a productivity _gain_ overall. (Or at least, we feel that way.) Other features of Rust make it feel productive as well: a focus on iterators and composable iterator adapters is often more productive than manual for loops, Cargo and crates.io enable wide-spread code re-use[1], we've been working on good tooling for IDE integration for those that use IDEs, and "zero-cost abstractions" help you have nicer interfaces while not having to pay the cost for them. Like this: https://news.ycombinator.com/item?id=13117608 https://news.ycombinator.com/item?id=13117608 One interesting area where we've seen lots of production Rust usage is embedding Rust in other languages. Since Rust can expose functions that look like C to the outside world, you could write a Ruby, Python, Javascript, or whatever extension in Rust instead of C. And Rust's safety features are appealing here, since you may not be the kind of person who writes C all the time: that's why you write Ruby/etc in the first place. Soon, we expect to see more usage of Rust on the server: the "tokio" project is gearing up for an initial release, which provides a foundation for asynchronous IO. Even before tokio is released, people are playing with this: crates.io is Rust on the backend, and "npm recently began replacing C and rewriting performance-critical bottlenecks in our registry service architecture with Rust": https://medium.com/npm-inc/npm-weekly-73-no-love-for-http-urls-in-shrinkwrap-files-npm-%EF%B8%8Fs-rust-and-the-cli-asks-for-rfcs-8c082f558d52 https://medium.com/npm-inc/npm-weekly-73-no-love-for-http-ur... Basically, lots of places. We'll see how things go into the future! 1: Anecdote time: my favorite package is https://crates.io/crates/x86 https://crates.io/crates/x86, which provides low-level bindings to various x86 platform details. Writing an operating system? No need to define your own IDT entries, just grab the library and http://gz.github.io/rust-x86/x86/irq/struct.IdtEntry.html http://gz.github.io/rust-x86/x86/irq/struct.IdtEntry.html has you covered. Re-usable packages in operating systems is super cool. On a higher level, this kind of thing is enabling Firefox to re-use Servo components more easily; Firefox can just pull chunks of servo with (relative) ease.
- Manishearth 10y ago> Rc is common in the Rust ecosystem I'm really surprised you think that's the case. Most rust codebases I've worked with use Rc very sparingly, if at all. If a codebase does use Rc there's usually one central thing that is Rc'd, with everything else using regular memory management. I have noticed that beginners coming from GCd languages often tend to structure their code in such a way that paints them into a corner where they must use Rc. This might be what hit you. I'm not really sure how to teach idiomatic Rust though.
- echelon 10y ago> I'm not really sure how to teach idiomatic Rust though. Learners should read and write lots of Rust. That's a great way to learn what is idiomatic. There will be early missteps, but thankfully the language makes it more comfortable when you do things the right way.
- Manishearth 10y agoYeah, my advice in general is to pick a few rust codebases and start hacking on them. But I would love to figure out how to teach this in a way that doesn't involve random codebases. Some folks learn by doing (I do!), but others fare better with tutorials.
- mr_luc 10y ago> there's usually one central thing that is Rc'd, Right. In my case, I was using the nphysics library, which for unsurprising reasons uses Rc for entity handles. Similarly, in my app's code, I used nphysics' proximity and contact handlers to watch for events that indicated a change in status. Those handlers needed to initialize/set values in a HashMap accessible (and periodically cleared by) the main sim loop -- 'one central thing' that is Rc'd. It's not sprinkled everywhere in your codebase, and for obvious reasons most libraries don't need to use it. But in applications, a central loop + library-provided callbacks + some Rc'd state of doesn't seem too uncommon.
- amelius 10y agoReference counting can be a useful memory management technique. But reference counting may cause unpredictable pauses when large amounts of objects suddenly need to be freed (e.g. when dropping the last reference to a large array holding many references). At least a carefully written garbage collector can free objects incrementally, and concurrently. So memory management in Rust is certainly not a solved problem. EDIT: Removed mention of RefCell.
- Manishearth 10y agoIt's generally predictable pauses, fwiw. Well, a different kind of unpredictability from other GCs. And Rc is rare enough (IME) that this doesn't usually matter.
- steveklabnik 10y agoTo be clear, RefCell does not do reference counting, Rc does. RefCell does runtime borrow checking.
- kazagistar 10y agoI'm hoping for something like this a few years down the line: http://manishearth.github.io/blog/2016/08/18/gc-support-in-rust-api-design/ http://manishearth.github.io/blog/2016/08/18/gc-support-in-r... Allowing Rust to generically adapt to an arbitrary Gc that it is nested inside of would be awesome.
- amelius 10y agoYes, that would be amazing.
- masklinn 10y ago> But reference counting may cause unpredictable pauses when large amounts of objects suddenly need to be freed (e.g. when dropping the last reference to a large array holding many references). Then again so does manual memory management if you're freeing a large object graph at once. > At least a carefully written garbage collector can free objects incrementally, and concurrently. You could get that with refcounting, stashing Rc0 objects in a list of items to free incrementally rather than freeing it all at once and synchronously.
- 0xFFC 10y agoSteve is one of the amazing guys I have ever known. He answered all of my questions in IRC, he is such nice guy. I truly like him a lot. and most important point is Rust team chose him , because they realized how wonderful he is in communicating with people and being leader of community.
- bluejekyll 10y agoAs far as I can tell he answers every question, and corrects every inaccuracy across at least these platforms: twitter, hackernews, reddit, [users|internals].rust-lang.org, irc; its mind blowing. Honestly, a talk on how he stays so connected without being awake 24/7 would be interesting ;) Thanks, for all the hard work, Steve. You're devotion helped turn me into someone who loves Rust.
- steveklabnik 10y agoThanks both, and achanda358! It's taken lots of work. I think I'm a nicer and better person in Rust than I was in Ruby, but that's all I'll say about that. I am very much not a perfect human being. > Honestly, a talk on how he stays so connected without being awake 24/7 would be interesting ;) I wrote a blog post on that a while back: http://words.steveklabnik.com/how-do-you-find-the-time http://words.steveklabnik.com/how-do-you-find-the-time it's still mostly accurate kinda.
- deleted 10y ago[deleted]
- ev0l 10y agoThis post is amazing! The best quote is ... "For example, the biggest time I scrubbed out in my entire life was a choice that I made almost a decade ago: going to college." A refreshing insight from a very intelligent individual!
- steveklabnik 10y agoI have more complex feels about it as a general thing, but for me, I'm not sure I made the right call. I did learn a lot, and I made some very dear friends, but it was extremely expensive. If you (or anyone reading) are someone who's making this decision, please give it serious consideration, and don't just copy me: this is a really, really big choice to make in your life, and one you deserve to make for yourself.
- cpeterso 10y agoIt's interesting to see just how much the Rust language and libraries have evolved. Is there a wish list of breaking language changes waiting for a Rust 2.0 version?
- steveklabnik 10y agoWe do have https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3Arust-2-breakage-wishlist https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Ais... It is unclear if there ever will be a Rust 2.0. Even those that want it agree that unless it's incredibly easy to upgrade to from Rust 1.x, it's a non-starter.
- Lev1a 10y agoThere is also the possibility that a Rust 2.0 could fragment the community much like with Python2.7 <-> Python3.x, which would be "undesirable" at best.
- steveklabnik 10y agoYes, a split like this would be undesirable to say the least. Not to mention that systems people are used to near-total backwards compatibility; any sort of near-term timeframe for such a thing would destroy a lot of our credibility, in my personal opinion. I'm on team "never 2.0". We still have some desire to indicate "epochs" of Rust development, as undoubtedly, things like idioms will change over time, new libraries will replace older ones, etc. But I'd prefer something like "modern C++", which could signify this kind of change, without giving up on backwards compatibility.
- Manishearth 10y agoI sort of want to make an RfC for 2.0 preparation. I am mostly on team "never 2.0", but I recognize that I am sadly not overlord of all things Rust (if I were we'd have stable emoji identifiers already) and it's quite possible that 2.0 will happen some day. The idea is to come up with a set of processes for 2.0. If the community decides to do a breaking 2.0 for some reason, we should: - Document exactly what has changed. - Write extensive docs on upgrading - Write good tools that do the upgrade for you when possible, and point out areas where they can't help with links to docs. - Make it so that the cases where stuff isn't machine-upgradeable are minimal - Be wary of actually removing deprecated APIs. - Be wary of unnecessary extra breakage. Python 3 took the attitude of "Okay, we're going to be breaking some things anyway, so let's break more!". I think that they had good reasons for doing that; and it makes sense in a way. But we may not want to follow the same philosophy.
- cyphreak 10y agoKlabnik has single handedly permanently deterred me from ever using rust. Terrible person, terrible language, terrible organization.
- norswap 10y agoI suppose the dog ate the substantiation of that comment?
- steveklabnik 10y agoThe only comment I'll make in this thread is to link to https://news.ycombinator.com/item?id=13098744 https://news.ycombinator.com/item?id=13098744
- wyldfire 10y agoI hate to drag a thread like this out but I'm genuinely curious: why is there someone/are there people out there who have such an axe to grind? Or are they just trolls?
- dang 10y agoThe heart is a complex place and the internet a good channel for its darker bits.
- steveklabnik 10y agoI wrote an extremely long comment here, but deleted it. I'd rather say this: like anyone who works in public, I am very open and vulnerable to criticism. When you work in public for a long time, there's a ton of reasons for people to decide that they hate you and have an axe to grind. Some of those things are things I still stand by, some of them are things that I agree that I was in the wrong. I am not a perfect person, and make mistakes like any other. It's up to you to see my actions, who I am, and decide for yourself.
- 10y ago
- gjayawar1990 10y agohmm. interesting
- moosingin3space 10y agoAs a relatively new Rustacean (since May 2016), I have to say that Steve has been one of the most influential people on my Rust coding style and understanding of the importance of community in a language. Prior to talking with Steve on IRC, I believed that community was secondary to language quality, but now I fully understand the importance of strong community in a programming language.
- notheguyouthink 10y agoI've moved away from Rust lately (long story), but in my attempts to move to Rust i was blown away by Steve. His presence in the Rust community is staggering, and his efforts truly made a Rust newbie like myself feel very welcome.
- pjmlp 10y agoCongratulations on the work to make our computing infrastructure safer.
- ivoras 10y agoThere was a new Hurd version announcement a few days ago and somehow Rust reminds me of Hurd, but from a different direction: it seems to me that Rust simply changes way too much to be currently widely accepted at any scale, and has a high rate of attrition because of that. Statements such as "But as of Rust 1.15, this restriction will be lifted, and one of the largest blockers of people using stable Rust will be eliminated!" and "It is unclear if there ever will be a Rust 2.0." (to avoid the "Python 2 / Python 3 effect") don't help. I'm comparing this to Go (yes, yes, both Rustaceans and Gophers will yell "it's not the same!" - in vain), where the Go 1.0 syntax was set in stone in 2012, and remained mostly compatible now, 5 years since, and still it feels that the community is somewhat sparse and reinventing wheels on regular basis. The reality is that for complex projects and complex development environments, once "Rust 1.0" syntax gets stabilized, it will probably take 5+ years for the community to feel comfortable with it, and trust the language developers not to break things at a whim. Remember that the still widely-popular Python 2.7 was released in 2010 (and it also sort-of set in stone the "Python 2 syntax"), and plan accordingly.
- steveklabnik 10y agoRust _adds_ new things all the time, but it does not break old things. Every language does this. We have put in a _tremendous_ amount of work to ensure this is true, from testing every commit before merge, to our stability infrastructure that ensures only stable features can be used in a stable release, to the "crater" tool that tests releases against all open source code, to our RFCs that specify exactly what constitutes something breaking. > It is unclear if there ever will be a Rust 2.0. I'm not sure how this implies that Rust is changing too fast to be useful, but it's meant to state the opposite: we do not plan on making gratuitous backwards changes in the future.
- masklinn 10y agoIt's really quite unclear what you mean, why would Rust adding new features (syntactic or otherwise) be an issue exactly? You do realise the .7 in Python 2.7 is because every version before that added new features (and syntax) while remaining backwards-compatible right? (well mostly, new keywords broke old code). > Remember that the still widely-popular Python 2.7 was released in 2010 I mostly remember that Python 2.7 is a straight descendent from Python 2.0[0], and as far as I'm concerned a much better language for all that was added in the meantime (though technically I only took up Python circa 2.3, a fair number of syntactic and semantic additions had already been performed). [0] and actually older than that, while 2.0 added major features the main change was a switch towards a much more open and community-driven environment with less single-organisation control over the project, it introduced PEPs, sourceforge hosting of the tracker and source and a very large expansion in commit bits from ~7 at CNRI to ~27 people around the time 2.0 itself was released, technically 2.0 is a minor update to the 1.6 which had been released a few months earlier for contractual reasons.
- namelezz 10y agoI would appreciate if anyone can share your dev setup for Rust. I tried Rust and Racer long time ago and it's not a pleasant experience.
- Manishearth 10y agoVS Code with RLS is amazing. Still a work-in-progress, but some stuff works and it's only going to get better. I'm mostly just used to sublime and vim with minimal tooling so it doesn't matter as much for me. But I'll probably eventually write a plugin for RLS for sublime.
- pjmlp 10y ago> VS Code with RLS is amazing. The only reason I have to install it.
- allengeorge 10y agoI use IntelliJ-Rust with the IDEA vim plugin daily and I recommend it. I can jump to definition for functions, get some autocomplete and type inference (it's not perfect) and the project is actively maintained. Moreover, the maintainers are very welcoming and it's a pleasure to work with them to fix bugs and submit PRs. https://intellij-rust.github.io/ https://intellij-rust.github.io/
- belovedeagle 10y agoA single tmux window, with vim on the left (with no special IDE plugins). On the right, autocall.zsh watches ./src and runs 'cargo build' whenever a file changes. (More specifically, I autocall running in a small pane up top and have it run cargo build piped through less [but you need to fake this as a tty to get cargo to output colors] in a specific, larger pane on the bottom.
- jonathonf 10y ago> get cargo to output colors cargo build --color=always
- Animats 10y agoRust as a language is now realizing the benefits of borrow checking. As the article points out, the syntax doesn't have to distinguish between move and assign. The borrow checker will catch a reuse of something already moved away. This turns out to be effective enough in practice that the syntax distinction isn't necessary. That wasn't obvious up front. Not having exceptions tends to generate workarounds which are uglier than having exceptions. Rust seems to be digging itself out of that hole successfully. Early error handling required extremely verbose code. The "try!()" thing was a hack, because a expression-valued macro that sometimes does an invisible external return is kind of strange. Any macro can potentially return, which is troublesome. The "?" operator looks cleaner; it's known to affect control flow, and it's part of the language, so you know it does that. Once "?" is in, it's probably bad form for an expression-valued macro to do a return. There's still too much that has to be done with unsafe code. But the unsafe situations are starting to form patterns. Two known unsafe patterns are backpointers and partially initialized arrays. (The latter comes up with collections that can grow.) Those are situations where there's an invariant, and the invariant is momentarily broken, then restored. There's no way to talk about that in the language. Maybe there should be. More study of what really needs to be unsafe is needed.
- steveklabnik 10y ago? is already in stable Rust.
- stymaar 10y agoIs it ? According to [1] it should be available in 1.14, which is the current beta. [1]: https://internals.rust-lang.org/t/all-the-rust-features/4322 https://internals.rust-lang.org/t/all-the-rust-features/4322
- steveklabnik 10y agoMust have been a bug, it landed in 1.13. I just tried it myself to triple check https://blog.rust-lang.org/2016/11/10/Rust-1.13.html https://blog.rust-lang.org/2016/11/10/Rust-1.13.html (1.14 is tomorrow, so even if that was true, I'm off by a day.)
- danjoc 10y agoI really like the premise of Rust. Keep at it. For my purposes, it's still a bit too immature. Last time I looked at the big 7 things, most were still not done. https://mail.mozilla.org/pipermail/rust-dev/2014-June/010139.html https://mail.mozilla.org/pipermail/rust-dev/2014-June/010139... The RustDT plugin for Eclipse makes the edit/save/compile/flag errors loop a lot tighter for me as a beginner. The autocomplete seems incomplete though and there's no hover docs or ctrl-click through to source that I remember. I look forward to the day I can replace JS with Rust. It would be nice to have a quick way to start doing Rust in the browser. I tried installing emscripten to give it a go, but the version in Ubuntu's deb repo was too old. I don't remember why, but building it from source didn't work out. I also got a bit lost trying to get boilerplate together for that purpose. Something like maven archetypes would be really great for Rust... Project templates that get you started with a working hello world for whatever you're trying to do. Just some suggestions. I basically like where Rust is going.
- steveklabnik 10y agoA quick summary of where these are at: Internationalization / Localization / Unicode (ICU): yup, no real progress. Needs some domain experts to drive it. Date/Time : chrono is the most popular. HTTP: hyper has been good for a few years now, tokio will make it async soon. Crypto: there's lots of interesting work in this space, see ring and rustls. SQL: Diesel is the gold standard here. So, some progress! You're absolutely right that growing the crates ecosystem is vital; we've doubled our numbers in the last year, but there's always more to do. > project templates https://github.com/rust-lang/cargo/pull/3004 https://github.com/rust-lang/cargo/pull/3004
- danjoc 10y agoThanks for your reply Steve. You're a stand up guy. I'll look into some of these over the holiday. I want to give the new rustup a whirl.
- Manishearth 10y agoFor ICU we have http://github.com/unicode-rs/ http://github.com/unicode-rs/ which covers a lot of it. There are scattered libraries for other ICU things too.
- lacampbell 10y agoGetting rid of the syntactic difference between moving and copying seems like a huge step backwards. Ditto with abandoning mailing lists for some wanky "already solved-as-a-service" web app.
- pcwalton 10y ago> Getting rid of the syntactic difference between moving and copying seems like a huge step backwards. Did you ever use Rust back when you had to write "move"? I did. When you wrote stuff like: let (move x, move y) = (move z.a, (move z.b).append(move z.c)); It got old fast.
- Gankro 10y agoAdmittedly there's still a syntactic difference between move and copy -- with Swift and C++'s definition of copy. Rust calls that Clone, though. :)
- dispose13432 10y agoWhat would be interesting if it would be possible to develop with GC on, but then if you benchmark and notice that it's too slow, turn on manual garbage collection for specific pointers. I don't know if it's possible, though (considering libraries).
- kibwen 10y agoRust doesn't have a GC in the first place, so there's nothing to turn on. Even then, the fundamental hurdle with GC isn't the effect on your program's runtime, it's the effect that it has on the lifetimes of your data. GC (and RC) are means of dynamic lifetime determination. Manual memory management is static lifetime determination. The latter requires you to structure your code in a specific way, which may be less convenient for the programmer depending on the application. Converting dynamic lifetime determination to static lifetime determination then requires changing the very structure of the program itself (including how APIs work) while preserving semantics, which is beyond any existing tools.
- dispose13432 10y agoI was just thinking that most languages are either GCed (like Java or Go) or manually curated (C/C++/rust). My idea is that if one could write in a language like Go (which has some kind of GC), but when one wants, say "I'll take care of this memory".
- kibwen 10y agoYes, my above paragraph doesn't imply the impossibility of intentionally mixing manual and automatic memory management. E.g. you can kinda do this in Go, but the language provides no facilities to help you get the manual bits right. And you can kinda opt-in to GC in C++ and Rust (via reference counting), but it's not super ergonomic.
- theseoafs 10y agoRust actually started with a model like this. The idea was when starting out for the first time you can use garbage collected pointers for everything and then switch to the manual model when you needed it. Problem is then that unless your standard library and all the major open source libraries work perfectly for both the garbage collected objects and for the manually managed objects then you need to learn manual memory management early on anyway, so the garbage collector wasn't helping anyone. The language design element of this is really tough to do in a usable way. D has optional GC but their standard library is kind of fucked up.
- deleted 10y ago[deleted]
- losvedir 10y agoWow, four years already. Maybe you can help settle this question I've had. I'm a rubyist (like you were/are, and wycats, and a bunch of rustaceans), and I think that sort of drove my interest in rust. But after 4-5 years of ruby the dynamism which initially was super cool, has grown a little frustrating and I long for a more sophisticated type system and a compile step, since frustrating bugs crop up from time to time that would be caught by that, and which slip through a hole in our test suite. I've dabbled in Haskell and Rust and the whole "if it compiles it's likely to work, or at least the bugs will be significant logic ones" aspect of them is very cool. I wonder, though, if the flipside is true? Maybe people who have a compiler and strong type system get frustrated with its rigidity over a number of years, and when they see ruby for the first time are blown away with what it can accomplish. After all, it took a number of years day in and day out with ruby to start seeing its blemishes, I wouldn't be surprised if the reverse were true. So as someone who's now spent 4 years in the other grass, do you still find it greener? (Or am I wrong from the start, and maybe you like Rust for other reasons and its type system wasn't something that attracted you to it over ruby?)
- shakna 10y agoThe main languages I use with work are: * C * Scheme (Gambit) * Python 3.4 * Pony I find all of them frustrating at times. Python's dynamism is nice, but it's so damn inflexible, requiring my to follow the One True Way. That can be good, and makes it easier to eliminate bad code in reviewing. But it also means that you can fight with the interpreter to do what you want. Scheme gives me both dynamism and flexibility, with less speed tradeoffs. Yay! However, there was someone on my team obsessed with turning everything into a macro. What's the point of first-class functions if you just macro everything? Also, Scheme's stdlib is purposefully small, so you sometimes need to reinvent the wheel. Thankfully Scheme makes it both easy and pleasurable to do so. The rundown is, though fast and dynamic, code review can be painful unless you follow standards, and you might run up against, "Oh... I need to build my own FTP library", though SLIB (depending on your circumstances), can eliminate some of that. C's compiler feels like a breath of fresh air after that. Unless you hit a runtime error, it makes writing code a breeze, quickly and efficiently. Unfortunately, it doesn't protect you against yourself, or lazy people on the team trying to use void pointers for everything. So code review can be harder, and catching edge case segmentation faults can be quite difficult. Enter, Pony. Pony deals with the same areas Rust does, but for reasons I won't go into, when both Rust and Pony were young, my team started using Pony for a few little things. It has been... An experience. Pony is very type safe, it is exception safe, and data race free, all enforced by the compiler. Which sometimes means the compiler will sit there bashing your code for a full day before you realise that you weren't writing it safe enough, and you can't just tweak it, the whole thing needs to be rewritten. Also, the Actor Model being central to everything can be quite annoying, when you just need to fit a couple extra functions in somewhere, but you aren't sure where's best. However: The compiler doesn't let you screw up. What you do write can become massively concurrent fast programs, easily. Pony also has some fairly good documents, for such a young language that really doesn't have the backing of Rust. So... I get frustrated with any language I am forced to deal with over time. I wish Python had compile-time contracts, but there is mypy to ease the pain now. I wish Scheme had a better stdlib, but it goes against the ethos. (See RSR6 community breakdown). I wish C was safer, but it's lack of safety makes it easier to do things like JIT. I wish Pony was more flexible, but it'll never let me point a shotgun at my own foot. If I spend too long in any world... It's time for a breath of fresh air.
- thinkpad20 10y ago> We removed the repl from the tree, as it never really worked, and was a maintenance nightmare. This one is the only one I know of today. Some people ask about one, but nobody has done the work to get a good one together yet. It’s tough! This is a bummer. I remember when I first tried out rust the repl was still a thing. As someone who writes mostly Haskell and Python, interactivity with a language is a huge plus. I hope that eventually another repl comes around.
- Annatar 10y agoIn today’s Rust, this would be an error, you need to write (e.f)(); At least the error tells you exactly what to do! If the programmer knows what the error is, and how to correct it, then their program should automatically do so, rather than molesting the user, as the purpose of computers is to speed up and automate. Why should the user have to foot the designers' bills? Another cardinal sin and a sign of lack of thinking things through is breaking backward compatibility, like the example above: imagine you were an early Rust adopter, and wrote a non-trivial application in Rust; now imagine that the newest Rust compiler has several major performance and efficiency gains. It is understandable why one would want to re-compile one's application with the newest compiler, only to be thwarted by the authors' lack of understanding of just how important not breaking users' applications is. That is one of the core differences between engineering and hacking. What other land mines await potential Rust adopters from programmers who do not have any respect for their users' time?
- kinghajj 10y ago> If the programmer knows what the error is, and how to correct it, then their program should automatically do so, rather than molesting the user But then the meaning of that syntactic construct differs contextually. Even if it could be parsed efficiently, it still goes against Rust's principal of favoring explicitness over convenience. > Another cardinal sin and a sign of lack of thinking things through is breaking backward compatibility, The examples Steve cited span throughout Rust's history, way before any commitment was made to backwards-compatibility. These sort of changes won't happen anymore (it'd require a "Rust 2.0").
- GolDDranks 10y agoIt's not the job of the compiler to speed up and automate _editing_code_. That's the job of an IDE. And we have a unfolding story for that: Rust Language Server, or RLS for short, which is a package providing pluggable Rust IDE-functionality for all kinds of text editors. Besides, the change we are talking about happened 4 years ago, when Rust emphatically did NOT have any compatibility guarantees and was in a process of rapid experimentation. This has changed a whole lot – it's a stable language now, and has been for a year and a half.
- sowhatquestion 10y agoI'm highly curious about Rust as a potential introduction to systems programming. One thing that bothers me is the lack of proper classes. This seems to have become a trend among newer languages, as though traditional OOP is an outdated paradigm. I have yet to be convinced that this is a good move. The attempted justifications I've seen hand-wave about problems with OOP, "composition over inheritance," etc. Meanwhile, in the real world, 99% of production code is OO and the paradigm continues to do its basic job--helping programmers model domain objects. Older languages like JavaScript and PHP have made their OO constructs more robust over time, which suggests to me that in the end a critical mass of developers will always clamor for this easily understandable and productivity-enhancing paradigm over some theoretically pure alternative.
- pka 10y agoSo what is it that you need classes for that dearly?
- erikpukinskis 10y agoIn the real world 99% of vehicles burn petroleum and the paradigm continues to do is basic job.