6 ms·
Much as I like Rust, I have to agree. When you have to get it done, use Go. When you want to explore advanced experimental programming constructs, use Rust. Th
by Animats 9y ago
Much as I like Rust, I have to agree. When you have to get it done, use Go. When you want to explore advanced experimental programming constructs, use Rust. The Go guys knew when to stop. Arguably they stopped too early, before generics or parameterized types, and "interface[]" is used too much. But that doesn't seem to be a big overhead item.
Rust has the complexity of C++ plus additional complexity from the functional community. Plus lots of fancy template cruft.
The trouble with language extensibility is that people use it without an overall plan. The end result is a Winchester Mystery House language.[1] LISP went down this rathole, and Scheme had to be developed to get out of it. C++ went that way when nobody stopped the Boost crowd before it was too late. Now it's happening to Rust.
(Anyone involved in language design should see Václav Havel's "The Memorandum". Or at least read it; I've seen it performed, but it's not performed often.)
[1] http://www.winchestermysteryhouse.com/ http://www.winchestermysteryhouse.com/
- wyager 9y ago> When you want to explore advanced experimental programming constructs This is a weird euphemism for "get it done correctly". It seems to come up in any discussion about languages that help you to write correct code.
- jstimpfle 9y agoNow what was wrong with that? I totally subscribe to the view that advanced experimental programming constructs are neither a guaranteed way, nor the only one, to write correct code. Doesn't a language which helps you to get code done (and makes it easy to iterate on it, and has the right psychology to let you move on instead of trying yet another way to get at the old problem) help you write correct code, as well?
- wyager 9y agoNothing in Rust is an "experimental construct", so I'm not sure why you keep using that phrase. Lightweight formal tools like those available in Rust do guarantee that your program satisfies certain correctness properties that Go cannot. To guarantee correctness in all aspects you need more heavyweight tools than Rust provides, but they do exist. No, languages that let you "iterate" and don't provide any sort of formal guarantees don't help you make correct code. They help you pump out a lot of mediocre code that probably works acceptably enough to satisfy a business with a medium-low focus on correctness.
- jstimpfle 9y ago> Nothing in Rust is an "experimental construct", so I'm not sure why you keep using that phrase. I don't do Rust (but I did some Haskell), and apart from the fact that both are very small elitist communities, some idioms are definitely evolving or changing as people try to find out what actually works in practice. So, from this practical standpoint, yes, experimental. What's lightweight lies in the eyes of the beholder. I certainly don't think of the line noise that is Rust code in the wild (again, to an outsider) as "lightweight". Nor do I think of the bazillions of ways you can obfuscate the simplest things in Haskell (moving 10, 20, or 90 percent of the perceived required invariants from value to type level), requiring large and possibly incompatible sets of language extensions, as lightweight. It's a burden of choice, and changing choices has huge ramifications on the rest of the code (these decisions are inherently unmodular, which is BAD). > No, languages that let you "iterate" and don't provide any sort of formal guarantees don't help you make correct code. They help you pump out a lot of mediocre code that probably works acceptably enough to satisfy a business with a medium-low focus on correctness. I'm sorry, but that's a very one-sided view. You can absolutely write correct code in them, and something that helps you to do it faster does help you write correct code. Simple as that. You seem to think that there is exactly one reasonable, justified level of formal correctness. And that is the level where you stand, Rust in this case. But that's wrong. Everything has a cost. And formalisms like Rust are still pityful attempts at constructing "formally correct" software. There might be some software that is "completely" verified, but at a cost that is simply not justifiable for the vast number of applications. Ignoring the fact that most real-world problems are ill-specified from the start. There is more than one valid approach to do things, and more so, to do many different things. It's cool what you're doing, but there are other valid approaches to find things to do and make them work. Get out of your little corner mate.
- wyager 9y ago> both are very small elitist communities Yet another irrelevant, unjustified, negatively connoted description that has no basis in realty; first "experimental", now "elitist". Come on. > What's lightweight lies in the eyes of the beholder. In terms of formal methods that exist, both type systems simple enough for decidable inference and lifetimes are absolutely "lightweight". But sure, I guess every description is subjective. > You seem to think that there is exactly one reasonable, justified level of formal correctness. And that is the level where you stand, Rust in this case. This is untrue. I don't believe Rust is a paragon of correctness-oriented programming; I just think it's a hell of a lot better than something like Go. Rust at least lets you prove a sizeable chunk of practical safety and correctness properties. > And formalisms like Rust are still pityful attempts at constructing "formally correct" software. What Rust provides, including type and memory safety and completeness checking, gets you a surprisingly large way towards complete formal verification, imo. > Get out of your little corner mate. What was your goal with this statement? This is a fairly technical discussion, not a Reddit politics thread. There's no need for you to stoop to vague insults.
- tatterdemalion 9y ago> Rust has the complexity of C++ plus additional complexity from the functional community. Plus lots of fancy template cruft. This is so patently false. C++ contains an order of magnitude more complexity than Rust (as one would expect for a language that continues to evolve radically 30+ years after it was designed; for better or worse, complexity is C++'s game).
- adamnemecek 9y ago> Rust has the complexity of C++ plus additional complexity from the functional community. Not even close. C++ has IIRC whole books just on exception handling. And it's crazy how many styles of writing C++ there really are. Exceptions or not, standard library or not, templates or not, boost or not, etc, etc. C++ templates are a language of their own. A lot of times, if your code made a particular choice, you are stuck with a set of libraries that made the same choice, or you'll be writing an insane amount of boiler place to duck tape it together. This code tends to be some of the most sucky code in existence. Rust on the other hand feels very cohesive and there seems to be like one style of really writing it. What parts of Rust do you find experimental? The only thing that's new (in a popular language) is the borrow checker but we can all agree that despite it's novelty, it's a huge step forward. Another thing about Rust is the community. Just about every Rust package I've come across was very well written. Some even teach me a thing or two. E.g. I haven't seen trees implemented the way they are in this package previously https://github.com/PistonDevelopers/history_tree https://github.com/PistonDevelopers/history_tree. Go packages are more all over the place. Also the community seems to concentrate mostly on web stuff. The recent Vulkan tutorial by the Khronos group (i.e. the people behind the standard) used Vulkano.rs which blew my gourd. https://www.khronos.org/blog/beginners-guide-to-vulkan https://www.khronos.org/blog/beginners-guide-to-vulkan > Now it's happening to Rust. Please elaborate. > Václav Havel's "The Memorandum" It's crazy that you are aware of this, I always thought that his work had only a local appeal. I've written a modicum of Go and the boiler plate was driving me crazy.
- Animats 9y agoMost things about Rust are well thought out and well designed. It's the total weight that gets you. Like LISP, back when too many smart people from MIT were adding to it without an overarching vision. It's hard to keep it all in your head. The add-ons aren't libraries with specific functions; they're new control structures. This gives me the feeling I had dealing with the MIT Loop Macro.[1] Proliferation of control structures is not a good thing. > Václav Havel's "The Memorandum" It's crazy that you are aware of this, I always thought that his work had only a local appeal. Saw it at Fort Mason in SF in the 1990s. I've written a modicum of Go and the boiler plate was driving me crazy. That's how I felt about Rust. See some code I wrote at [2], at "Return type and its error handling". Now that's boilerplate. The last time I mentioned this, it was brushed off with "Oh, you'll be able to do that with the '?' operator when it's implemented." Feel free to submit a pull request for the rewrite. [1] https://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/iter/loop/mit/0.html https://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/... [2] https://github.com/John-Nagle/rust-rssclient/blob/master/src/rssread.rs https://github.com/John-Nagle/rust-rssclient/blob/master/src...
- goatlover 9y agoWhich is used more, Common Lisp or Scheme? C++ is as popular as C. Python and JS remain heavily used despite becoming more complex over time. Java is still widely used after adding major features like generics, lambdas, streams.
- carussell 9y agoIs this intended to be a response to the parent comment? What's the connection?
- goatlover 9y agoIt is. The parent was praising Go's simplicity in comparison to languages like C++, and that Lisp had gone down the complexity rabbit hole, thus the need for Scheme. As a counterpoint to that, complicated languages have seen continued widespread use, so it's not obvious why being simple (intentionally leaving certain language features out) is preferable. Meaning, the entire programming community hasn't quit on C++, CL, Java, etc in favor C, Scheme, Go or pick your simpler language. Most of the JS community seems very pleased with ES6 & 7 additions.
- kibwen 9y ago> Plus lots of fancy template cruft. I should start a tally of the number of times that I have told you that Rust doesn't have template metaprogramming. You've been saying this for years; what have you actually written in Rust?
- andrewflnr 9y agoI'm not sure this is a useful distinction. I'm sure you're correct for whatever definition of "template metaprogramming" you're using, but Rust does have a pretty powerful generics system. That gets you most of the way to what C++ templates are used for, albeit less cruftily IMO. Coming at it from a different side, if a C++ person asks you, "does Rust have templates?", you're likely to say "no, but it does have generics which let you do most of what you need templates for". It's definitely enough to let you write complicated, over-general code if you want to. So in an informal context like this, the difference between "template metaprogramming" and generics is probably not one you want to stand on, at least not for your whole argument. There's lots of better arguments to make even if you accept Animats' language.
- tatterdemalion 9y agoThe claim that Rust's generics system is "fancy template cruft" on top of "all the complexity of C++" is absurd, though.
- andrewflnr 9y agoYes, which is why I carefully phrased my post to avoid any implication that I might agree with that claim. To nevertheless get a reply like this is profoundly irritating.
- tatterdemalion 9y agoI'm sorry.
- 9y ago
- bluejekyll 9y ago> When you have to get it done When you have to get what done? Seriously. There are different reasons to pick different technology stacks, some of them because of language features, some of them because of technology stack. Getting it done at my current job is generally Java, b/c that's the tech stack used by most. > The Go guys knew when to stop. Arguably they stopped too early... The stuff you mention Go not having is exactly what Rust brings over Go, is it not? > But that doesn't seem to be a big overhead item. I disagree, it's the fundamental reason I don't use Go by choice, and instead turn to languages that allow for more expressiveness. > Rust has the complexity of C++ You say you like Rust, but I find this statement hard to believe if you've learned the language. It has almost none of the complexity of C++. That's not to say that the language isn't more complex than Go, it is. But to say it's anywhere near C++ feels disingenuous. The Rust RFC process is very good IMO at preventing inappropriate changes from being introduced into the language, "Winchester Mystery House language" is unnecessary FUD. Look, you don't have to like the language. But, making statements that seem unfounded isn't really appropriate.
- deleted 9y ago[deleted]
- candiodari 9y agoWhy the duality there ? Rust vs Go. Go is quicker to get hacks done in. Okay ... so is Python, Ruby, Perl, ... and they will beat Go by a mile on quickly constructing small programs. Even if it must be fast, there's still C#, Java and quite a few others.
- imtringued 9y agoThe problem with templates in C++ is that they are just that. The compiler will hapily generate broken code if you use a map with a type that doesn't implement comparison operators and then spew out hundreds of lines of compiler errors at a location that is another hundred lines deep in library code away from the line of code that caused the error in your application. Something as trivial as type constraints for type parameters like you see in virtually any programming language with generics is the solution. I don't feel that C++ is complex at all. It just has more crap and every programming language has crappy parts.
- wtetzner 9y ago> When you have to get it done, use Go. Or Java? I mean, I've never seen any reason to use Go over existing, better languages. Never thought I'd call Java better than anything, but there you go.