Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"My other goal is to show developers that C++ and Java kinda suck" -- really?!


Rust is one of my favorite programming language, and yet I learned how much I missed java after learning Rust. The fact that everything is dynamically dispatched and non-primitives are referential type allows you to program things without thinking too much. Plus, JIT & Hotspot can optimize these away - perform stack allocations for local objects and short-circuit dynamic dispatch for nonvirtual functions.

That said, my biggest Rust-gripe has been writing recursive / self-referential data structures. Borrow system is just not very convenient for that and you end up restructing the code to be a bit more Rust-friendly.


Yeah, it's a pretty poor way to represent Rust to an audience that is ostensibly it's target audience.


Any developer who can't name something that "kinda sucks" about their language probably isn't ready to learn a new language.


The quoted comment isn't about particular shortcomings in a language, it's a blanket pejorative, and it doesn't reflect well on the author's credibility.


Fair point, it's fixed now.


Would be a stronger argument if you had a better rating on CF :) As of now I will stick to the Petr / Egor philosophy.


What's their philosophy? I think Petr was using C# at some point.


Well I would say their philosophy first of all relies on strong tools. Intellij with CHelper plugin allows for simpler testing and also has incredibly powerful debugging as I am sure you have seen in their screencasts.

Also I think they sort of show the value of Java's simpler approach with everything being a reference in terms of writing code quickly. The alternative approach that C++ competitors use relies on a very specific style unlike what production code at say Google uses, with pointers used as sparingly as possible. With everything being a reference it is much easier to work with graphs for instance.

To me Rust goes even further into the C++ direction where it becomes more and more difficult to quickly write code that compiles. With Java I have no issue writing 100 lines and having everything compile the first time around, particularly with an editor like Intellij. With C++ even Clion struggles significantly with producing helpful info, simply due to the complexity of C++.

Anyway don’t have enough time to really eloquently think through all aspects of this. Also I was just kidding about CF rating, you are far better than me obviously.


It's not achieving it though. The code could be more idiomatic and the project could have a better file organization.


Suggestions are welcome; I'm still learning Rust.

To put context around my provocative comment earlier: I write C++ professionally. C++ is the right choice for my organization, though for purely historical reasons. In the long run, I think we'd all be better off if Rust or similar languages replaced their predecessors. So my comment came from a place of personal frustration, the same that led me to find Rust in the first place.

The old wording was too negative; I'm just excited to show that contest programming, which one might imagine to be hard to translate, is not only practical but indeed arguably nicer in Rust.


Just be careful to not adapt the michaelochurch approach. Very risky :)


It's a worthy cause. At HN we might all be aware that Java and C++ suck, but others might not know. Assuming others know what you do is a common cognitive bias. To us, this might be a slightly childish thing to have as a goal, but it might be a revelation to some readers.


> At Hacker News we might all be aware that Java and C++ suck, but others might now know. Assuming others know what you know is a common cognitive bias.

The irony here is astonishing.

I am a frequent commenter on HN and I rather like C++. I acknowledge its shortcomings without resorting to the tribalism that is marring the reputation of the Rust community.

Please don't assume that all of Hacker News has a homogenous perspective on the utility (or lack thereof) of extremely common languages like C++ or Java. I've said this before in threads like this and I'll say it again: one language does not need to win.


"One language does not need to win" is the majority position of the Rust community. Of course, it itself is not completely homogeneous either.


Oh believe me, I know the Rust community does not itself endorse this behavior (or mindset). I do believe the vocal minority that pushes that agenda actively harms the community; however, I appreciate your effort for clarification.


I'm not saying that Java or C++ are useless per se, just that they suck compared to many other options we have available.

Of course they both have tremendous utility, but so too does a 15 sqm house. Doesn't mean it doesn't suck.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: