Earlier quoted context omitted.
For that I see it as a matter of tooling more than the language design: wasm is nicely integrated into cargo and is maintained far better than other choices. You can also compile C/C++ to WASM if you want (and the language semantics definitely allows for it, since it doesn't have a garbage collector), but you just really don't want to deal with CMake while doing so.
garbage collector isn't a limiting factor for wasm. my main issue with wasm is no standard interopt for primitive types. thankfully some sort of FFI is in the works from my understanding.
Ask HN: What's the Deal with HN and Rust?
101–108 of 108 posts
Re: Ask HN: What's the Deal with HN and Rust?
#102- learn to hate memory safety issues
once you master both of those bullet points, rust starts looking very attractive.
Re: Ask HN: What's the Deal with HN and Rust?
#103Earlier quoted context omitted.
> strcpy in C is Turing complete How so? You've made this claim twice ( https://news.ycombinator.com/item?id=27910640 ), but I can find nothing else to back this up. We know about C++ templates "accidentally" being discovered to be Turing complete, but I've never heard of strcpy() being so... while((*p++=*q++)); ... I'm not seeing it. Honest question, can you shed light on how this can be?
Strcpy is a good setup for a buffer overflow despite having to run a gauntlet of countermeasures to really pull it off in 2022.
It's fair to say that C allows unsafe calls. It's useless to point out that undefined-behavior and unsafe calls could result in Turing completeness. Strcpy() is not Turing complete - it doesn't automatically detect and protect against unsafe usages. That are evil.
Re: Ask HN: What's the Deal with HN and Rust?
#104I'd love a Rust job but there are even fewer around than golang and much less than C++. Any suggestions for a newbie?
Re: Ask HN: What's the Deal with HN and Rust?
#105Earlier quoted context omitted.
> 2 performance cost of a managed language like Java It can be a lot worse too. Java lacks the ability to have really compact data structures and can not lean in too much into the hardware acceleration without becoming incompatible. You can't exactly set `--fast-math`. Shame GCJ got dropped. > strcpy in C is Turing complete Not something I've heard of - is this an abuse of Unicode? > most code has to portable to at l…
> strcpy in C is Turing complete I was curious too, but my google-fu did not succeed. The closest I found is about printf being Turing-complete [1], which is also new to me. [1] https://www.ioccc.org/2020/carlini/index.html
Re: Ask HN: What's the Deal with HN and Rust?
#106As someone who looks at Rust and other alternative languages every now and then. I think many C/C++ programmers are looking for an alternative. C/C++ accumulated a lot of legacy stuff over the years, and things like #includes, .h vs .cpp, non-trivial metaprogramming, limited IDE capabilities, no standarized package manager show how old these languages are. Compare it to Rust, which has one build tool/package manager.…
> 99% of projects I don't know where you got this figure from, but I highly doubt 1% of Rust projects use a different build/package system. More like 0.001% (this number is scientifically extracted from thin air).
OP doesn't literally mean 99%, they mean "almost everyone". The actual numerical value is irrelevant.
Re: Ask HN: What's the Deal with HN and Rust?
#107IMO C++ was and is still the leading language for writing performance-intensive and memory-intensive applications (excluding Rust), and C++ is really flawed. Like, I know that Java and JavaScript and Python get criticism, but the fact is those languages are still usable compared to C++: - There are several different ways to do everything and half of them are wrong. For example, you can define an unsigned int type wit…
Re: Ask HN: What's the Deal with HN and Rust?
#108Rust might be a better C++. (Zig is the better C) The memory safety thing seems to be appealing to some people who believe it will dramatically reduce the security issues found in many software. (they usually know very little about actual security exploits) Rust is building a cult-like community around it, and I think it could be its demise, I personally hate it (the community)
> The Chromium project finds that around 70% of our serious security bugs are memory safety problems. Our next major project is to prevent such bugs at source. https://www.chromium.org/Home/chromium-security/memory-safet... > As was pointed out in our previous post, the root cause of approximately 70% of security vulnerabilities that Microsoft fixes and assigns a CVE (Common Vulnerabilities and Exposures) are due to…
But I am not convinced that Rust is the solution.