8 ms·
This is the sort of thing I hope to see a lot more of from Rust. Things that would traditionally be done in C/C++ moving to a new language with modern features.
by kion 12y ago
This is the sort of thing I hope to see a lot more of from Rust. Things that would traditionally be done in C/C++ moving to a new language with modern features. I'm very hopeful this trend will continue.
- zellyn 12y agoI thought tiling window managers were traditionally written in Haskell :-p
- hedwall 12y agoWMII, dwm, awesome, i3 are all written in C (and Lua).
- Igglyboo 12y agoHe's making a joke about xmonad
- lake99 12y agoHaskell is used for just one of them. https://wiki.archlinux.org/index.php/Comparison_of_tiling_window_managers https://wiki.archlinux.org/index.php/Comparison_of_tiling_wi...
- colordrops 12y agoMy understanding is that C++11 and eventually C++14 have plenty of modern language features. How does Rust compare?
- Dewie 12y agoRust doesn't have C++98, C++ version "C with classes", and so on. Less flippant answer; the usual arguments are that Rust is more memory safe, and hopefully less complex and with fewer gotchas compared to C++. It's still relatively complex - inherently, due to what it tries to do - but people seem to be of the opinion that it is much less complex than C++.
- steveklabnik 12y agoWhile they introduce constructs that significantly increase the safety of C++ written with them, they still have edge cases due to the C++ committee's commitment to backwards compatibility. So while C++ is certainly improving, Rust has a fundamental advantage in the safety department.
- dscrd 12y agoA language is often not improved by adding features. Rust has a relatively clean slate (for now), which makes it a vastly better experience.
- pjmlp 12y agoThe thing is, most languages can be used for writing a Window manager. But since the alternatives to C and C++ kind of faded away from mainstream and they are anyway the UNIX system languages, most developers seldom look for alternatives. With Rust, Go, D, Haskell, OCaml, .NET Native/Mono AOT, Java AOT compilers, hopefully developers will eventually realize that not everything needs to be coded in C or C++.
- fspeech 12y agoMost non-C languages also come with GC/managed runtime whether you want it or not. So for someone who don't want that Rust could be a fitting choice.
- pjmlp 12y agoToday yes. Not so 20 years ago. Modula-2, Ada, Object Pascal were some of the alternatives without GC. These are the ones I meant by "faded away".
- Dewie 12y agoLast I checked the memory consumption of running xmonad (you know, written in Haskell) on my computer was a pittance; doesn't hog memory, and probably doesn't use enough memory to cause user-noticeable GC pauses. Though if you're talking about applications in general, and not just WMs; yes, sure.
- codygman 12y agoYeah, I've been using Xmonad for a couple years and it's just faithfully used very little memory and never crashed. Also, this is across 4-5 different laptops.
- fspeech 12y agoYes it is more likely to be applicable to other apps other than WMs, but I also have integration in mind. So what if you want to write a WM like a library that can be used by whatever runtime a user may choose. Not sure that is a good idea but it sure would not be very portable if a GC must be carried inside the library. Memory consumption is not the only issue here.