Live data from Hacker News

"No way to prevent this" say users of only language where this regularly happens

xeiaso.net

311–320 of 342 posts

Re: "No way to prevent this" say users of only language where this regularly happens

#311

Earlier quoted context omitted.

Is security not a technical merit?

It is but there are other technical and non-technical merits too. "Security" doesn't trump all. If you need secure, turn off your computer. I tried Rust and downloaded some projects that should be comparatively simple (e.g. text editor). "cargo build" downloaded and built about 500 dependencies. The Rust ecosystem had a chance to convince me, and it sure has some convincing results. But it wasn't my cup of tea. If yo…

`cargo-geiger` would like a word. Feel free to try it.

Number of dependencies is a bad signal for JS projects, I am not so sure the same applies for Rust however.

Re: "No way to prevent this" say users of only language where this regularly happens

#312

Earlier quoted context omitted.

C/C++ being non-opinionated is the main source of the security vulnerabilities. Let's face it, it felt good to be a lone cowboy carrying a lot of responsibility and knowing what you are doing. I was there myself and I'll admit the ego trip was awesome. These times are long past and naturally, people refuse to adapt. > Unfortunately you can't just have Rust's safety checks, without opting into restrictions that Rust d…

> Show me something that does better and I'll switch tomorrow Frankly this is a very bad decision. Because now you have C code, Rust code, and yet another language's code, and you're left with a mess that you have to integrate too.

Obviously I was demonstrating that I don't shill for Rust in particular -- I simply believe C/C++ are not cutting it anymore. Rust is not perfect but it solves a sizeable chunk of their problems, that's all.

Re: "No way to prevent this" say users of only language where this regularly happens

#313
post #198

Earlier quoted context omitted.

> This is already included in the "almost anything" expression and you are the 4th person deliberately (or accidentally?) not noticing it. I genuinely think that : 1/ this field is dominated by a disproportionate amount of people with autistic traits 2/ their ability to reason only functions in the narrowest sense and their grasp of language (takes everything in the most literal sense, thinks in extremes, prone to pu…

Or maybe, just maybe they correctly interpreted "most" as "more than half" and "rarely" as "decidedly less than half", and actually disagree with the statement as is. And what can I say, "reasons like inertia, or lacking the time, or not having the budget to change, or being too tired to learn, or any other such thing" sounds exactly what almost anybody is confronted with -- so it doesn't exactly seem like just an _e…

Or maybe, just maybe, I explicitly agreed with the real-world limitations up-thread but now you are just looking to pick a fight because me agreeing with stuff does not fit your preconceived notion. :)

But, by all means, go on, I can only presume you are bored.

Re: "No way to prevent this" say users of only language where this regularly happens

#314

Earlier quoted context omitted.

It's possible to write systematically safe code in assembly, no need to use any language. People really just don't want to do it.

When the language has builtin safety, it has better ergonomics, so there's merit in switching language.

If that language you speak of is Rust or many GC more dynamic languages I'll agree. If you mean C/C++, frak no. They don't have "builtin safety" at all. Nothing that's opt-in is safe or secure.

Re: "No way to prevent this" say users of only language where this regularly happens

#315

Earlier quoted context omitted.

Simplicity.

Simple | Fast | Safe. Choose two.

Sacrificing safety might have been defensible on a 40 MHz 80386 that could barely run a C++ compiler (I think this is what I started my career on) but today we find eight-core 3.8 GHz CPUs in desktops and dual-core 1.8 GHz SiPs in wristwatches. Safety should have become table stakes a while ago; Moore's Law already paid for it.

Re: "No way to prevent this" say users of only language where this regularly happens

#316

Earlier quoted context omitted.

I love one comparison to hole hawg[0] (used for unix vs windows&mac), which is usable here. Memory safe languages are like a fancy electric drill from target. They get the job done, but if you want some more serious drilling they die on you instead of doing something dangerous. C is like one of those drills which are comprised of engine and a handle (cheap, changeable piece of steel pipe). They are designed to do one…

So what are you able to do with C that you can’t do in Rust? Somethings are more difficult to pull off, but everything possible in C is possible in Rust. Worst comes to worst you can always drop into unsafe Rust This “sometimes you need a knife" argument just doesn’t make sense. You can have the power and the safety. Stop cutting off your fingers.

Make a program for 8051 MCU. Or a lot of other microcontrollers.

> This “sometimes you need a knife" argument just doesn’t make sense. You can have the power and the safety. Stop cutting off your fingers.

Sometimes you need a scalpel.

I'm not against Rust. I still want to start a project where Rust will be worth learning for me, but I'm currently busy writing erlang and java for big systems and C for microcontrollers. This is of course only my local situation, I don't advocate for those languages (I love erlang though and I'm wishing for advertised easy concurrency in Rust, maybe someday).

Re: "No way to prevent this" say users of only language where this regularly happens

#317

Earlier quoted context omitted.

So what are you able to do with C that you can’t do in Rust? Somethings are more difficult to pull off, but everything possible in C is possible in Rust. Worst comes to worst you can always drop into unsafe Rust This “sometimes you need a knife" argument just doesn’t make sense. You can have the power and the safety. Stop cutting off your fingers.

Make a program for 8051 MCU. Or a lot of other microcontrollers. > This “sometimes you need a knife" argument just doesn’t make sense. You can have the power and the safety. Stop cutting off your fingers. Sometimes you need a scalpel. I'm not against Rust. I still want to start a project where Rust will be worth learning for me, but I'm currently busy writing erlang and java for big systems and C for microcontrollers…

Actually I’ve been pleasantly surprised by Rust on the Arduino! Things are certainly much easier with the large community behind it, I probably would’ve chosen C if there wasn’t an existing community.

I don’t think Rust should be used everywhere, but I’m firm that it could be used anywhere that C can (short of an unsupported architecture).

Re: "No way to prevent this" say users of only language where this regularly happens

#318

Earlier quoted context omitted.

Simplicity.

This. Learning Rust is like a long series of jousting matches with the compiler.

How is that different than learning any other language?

I think Rust’s reputation for being hard to learn is overblown. Yes it is probably a little more esoteric than what you’re familiar with but any decent dev should be able to pick it up

Re: "No way to prevent this" say users of only language where this regularly happens

#319

Earlier quoted context omitted.

>Show me something that does better and I'll switch tomorrow. There's no limit to perfection, but if you merely don't write C of opportunistic kind, logical errors quickly start to outweigh other types of errors.

Are you willing to die on this hill? I remember an HN post a while ago where both Microsoft and Google said something like 65% of the bugs in C code were related to memory (un)safety.

I don't deny that.

Re: "No way to prevent this" say users of only language where this regularly happens

#320

Earlier quoted context omitted.

When the language has builtin safety, it has better ergonomics, so there's merit in switching language.

If that language you speak of is Rust or many GC more dynamic languages I'll agree. If you mean C/C++, frak no. They don't have "builtin safety" at all. Nothing that's opt-in is safe or secure.

You're entitled to your opinion, the universe has an opinion too.
Post reply on HN