4 ms·
Very much matches my experience with the last ~2.5 years of Rust. One of the really eye-opening ones for me was building a UI library on win32 and watching it
by vvanders 8y ago
Very much matches my experience with the last ~2.5 years of Rust.
One of the really eye-opening ones for me was building a UI library on win32 and watching it just work on Linux, OSX, Android and WASM(with some Canvas work). Obviously each platform took some work to build out their respective rendering primitives but the core engine(including embedding Lua via gcc crate) just worked.
As someone who's done x-platform stuff most of their career it was nothing short of incredible.
- weberc2 8y agoI have the same experiences with Go regarding xplat. I was particularly amazed that I could trivially cross compile by simply setting the GOOS and GOARCH env vars to the correct operating system and CPU architecture and then running `go build`. EDIT: Curious why people are downvoting this. Is it really so taboo to suggest that Go could be nearly as pleasant as Rust at something? Do I really need to roll out my Rust fanboy creds every time I participate in a thread on the language?
- vvanders 8y agohttps://crates.io/crates/gcc https://crates.io/crates/gcc is even more amazing, it will cross-compile your C dependencies(assuming you have the right compilers setup, which is mostly handled already via rustup or base install). For Android all I had to do was point it to the NDK(for both Rust and the crate) and I got all my C dependencies for basically free. Anyone who's had to work with the NDK knows how nice that is. That's also with zero changes to my build script/code/ifdefs/whatever.
- mastax 8y agoI upvoted you, but perhaps bringing up Go (or Nim, etc.) In every Rust thread is as annoying as bringing up Rust in every Go thread. This article is about comparing languages more or less, though.
- weberc2 8y agoThanks; I used Go because it was specifically referenced in the article. I don’t personally mind people bringing up Rust in Go threads; I do mind pretending there aren’t trade offs, however.
- mpweiher 8y agoHmm..I had the same experience with Objective-C. First on NeXTStep, later with GNUStep. And durability is pretty good, too. I am currently using code I wrote back in the late 90s. Whereas all of Apple's Swift sample code I tried (about non-Swift-specific features such as Apple pencil) would no longer compile. And of course Smalltalk images can be saved on one platform and restarted on another, but that's with a VM.
- pjmlp 8y agoI had the same experience with any programing language with a rich set of libraries since the 16 bit days.
- vvanders 8y agoOh come now, anyone who's worked with C or C++ knows there's a million pitfalls in porting code across platforms. Heck, C doesn't even guarantee that a byte is exactly 8 bits. The point I was making is that I was able to do this without a single ifdef/platform specific code without even planning for it(since it was the first time I'd cross-compiled for more than one other platform). While that's common in the VM language space seeing that in a compiled language was refreshing.
- pjmlp 8y agoThere are more languages on this world that compile to native code, besides C and C++. It not my fault not everyone bothers to learn them.
- vvanders 8y agoYup, which you're happy to point out in every single thread about Rust. I can set my clock to a post from you about how another language did it first, it's about a useful as a comment saying "+1" these days. Why not celebrate that these concepts are making it into more and more languages? Languages that have rich, vibrant communities and ecosystems. Seems a lot more productive to me then yelling at the kids to get off your lawn.
- pjmlp 8y agoBecause many praise Rust as being the language that did those features first, as if they were re-writing history. Those misconceptions eventually become urban myths and lead to situations like many young devs nowadays thinking that C was the very first systems language, while we old timers know for fact we had plenty of other choices. Rust is a great language, just lets not pretend it is the first in many of its safety or portability features.