5 ms·
> Rust is basically a better alternative to C++ for almost any usage of C++ that doesn't require interoperating with existing C++ libraries What often isn't me
by santaclaus 11y ago
> Rust is basically a better alternative to C++ for almost any usage of C++ that doesn't require interoperating with existing C++ libraries
What often isn't mentioned is that C++ has a much more diverse ecosystem than Rust. C++ has four major compilers, three major standard library implementations, and 30 years of associated tooling and library development. Occasional serious issues in GCC and libstdc++ (or Clang and libc++, or in Microsoft, ...) do crop up, and the ability to cross reference alternative toolchains is quite valuable. If Rust can hit enough critical mass the ecosystem will develop, but it isn't there, yet.
- forrestthewoods 11y agoCan I easily use and debug Rust on Windows, Mac, Linux, iOS, Android, Playstation, and Xbox? Then it's not a viable option.
- tomjakubowski 11y ago> Can I easily use and debug Rust on Windows, Mac, Linux, iOS, Android Yes. > Playstation With a little effort, probably; the toolchains both use LLVM, and writing a custom target for Rust is possible. Someone managed to do it back in the dark times when Rust still depended on libuv [1]. I think that was before the "flexible target specification" [2] was a thing, too. Whether Sony would allow you to distribute a game written in Rust is another question ;-) > Xbox Nope. [1]: https://twitter.com/wickerwaka/status/479842553831776257 https://twitter.com/wickerwaka/status/479842553831776257 [2]: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md https://github.com/rust-lang/rfcs/blob/master/text/0131-targ...
- pjmlp 11y ago> Can I easily use and debug Rust on Windows, Mac, Linux, iOS, Android > Yes. Easily means using something like Visual Studio debuggers, with its graphical visualizers. Command line gdb is something I use when there isn't any other option available.
- dkersten 11y agoAs someone who used to write a ton of C++ and only occasionally fired up gdb (and never anything fancier), I feel like maybe "easily" means different things to different people. Going by what was said above and how I developed in C++, it sounds like "easily" to me.
- pjmlp 11y agoYeah, I always been an IDE guy since Turbo Pascal 5.5 and only reluctantly used vi and Emacs as poor man's IDE replacement.
- steveklabnik 11y agoI haven't used it yet, but https://github.com/pistondevelopers/visualrust https://github.com/pistondevelopers/visualrust claims to have started MIEngine integration.
- pjmlp 11y agoThanks for the heads up.
- forrestthewoods 11y agoEasy means: * breakpoint debugging * ability to step debugger line by line * high quality watch window GDB does not qualify as easy. Ability to printf debug, while 100% mandatory, is also not easy.
- pcwalton 11y agoRust debugging works beautifully with Xcode. I would assume it works with Linux graphical debugging tools as well. Visual Studio support is mostly gated on LLVM support for PDB. We do have support for using the MSVC toolchain as of a couple of releases ago, so I'm not actually sure what if anything is left to get that working.
- pjmlp 11y agoThanks for the update, I thought it was worse than that given my experience on Windows. Also many thanks for the MSVC toolchain, that is what I have been using.
- dikaiosune 11y agoBut those same features make it very bewildering and difficult for newcomers. Four different compiler behaviors to read about in any area not defined by the standard, tooling that can require a long and complex setup from an expert, and 30 years of differing opinions about good development practices crufting up learning resources.
- fsloth 11y ago"But those same features make it very bewildering and difficult for newcomers" Yes, that is very true. "tooling that can require a long and complex setup from an expert" If one is on windows, one can 1. install visual studio community edition and 2. click "new project". Sure, it's nowhere close to npm or Rusts's crates or go's dependency management but that's bit hyperbolic way to express it. I can waste hours trying to get Rusts' dependencies working if I'm using something bleeding edge.
- dikaiosune 11y agoNot having used C++ on Windows, I have to take that at face value. But getting autotools or cmake set up as a new C++ developer...not super fun. Also, spending lots of time setting up bleeding edge features is different than trying to get a single working build with a couple of fairly standard dependencies.
- pjmlp 11y agoHaving started with C++ IDEs on MS-DOS, OS/2 and Windows, UNIX development was never appealing to me. I have spent a big part of my time trying to find that IDE developer experience back. Nowadays Qt and KDevelop do a good job, but it wasn't always like that, specially in the mid-90's when we were already enjoying C++ Builder and Delphi on Windows.
- fsloth 11y ago"But getting autotools or cmake set up as a new C++ developer...not super fun." Yes, this is the main reason I prefer visual studio :). I know my way around unixes but since I don't use them for my daily work I forget most of the things I would need to remember to be productive.
- pcwalton 11y agoYou could say the same thing about any new language that has come up in the past 20 years. Yet new languages do appear and become popular all the time.
- AnimalMuppet 11y agoThey don't become as popular as C++ very often, though...
- deleted 11y ago[deleted]