Live data from Hacker News

Rust’s dependencies are starting to worry me

vincents.dev

591–593 of 593 posts

Re: Rust’s dependencies are starting to worry me

#591

"Not thinking about package management careful makes me sloppy." Isn't the point of a memory safe language to allow programmers to be sloppy without repercussions, i.e., to not think about managing memory and even to not understand how memory works. Would managing dependencies be any different. Does Rust allow programmers to avoid thinking carefully about selecting dependencies.

Computer users that use third party software need protection from the mistakes of programmers. This is achieved by avoiding software written by careless programmers.

These programmers generally do not need protection as they have no liability to the computer users they target with their hastily written software.

It is the computer users that need "protective gear" not the programmers who make sloppy mistakes.

Re: Rust’s dependencies are starting to worry me

#592

Earlier quoted context omitted.

> Taste most certainly plays a role, and there are engineering products that clearly show good or poor taste. No. Get over yourself.

Wow, I’m convinced! In all seriousness: why do you insist on an intellectual totem pole with art being more “hoity toity” as you say, and more worthy? And if so, why is engineering below painting? In mathematics and some hard sciences, and in absolutely elementary aspects of other fields like programming, things can be proven to be right or wrong. In every other endeavour, we need to repeatedly apply fuzzy judgements…

> why do you insist on an intellectual totem pole with art being more “hoity toity” as you say, and more worthy

More worthy? Where are you getting that?

Am i responding to a bot?

Re: Rust’s dependencies are starting to worry me

#593
post #414
post #372

Earlier quoted context omitted.

"dependency" here I guess means something higher-level that your compiler can't make the assumption you will never use. For example you know you will never use one of the main functions in the parsing library with one of the arguments set to "XML", because you know for sure you don't use XML in your domain (for example you have a solid project constraint that says XML is out of scope). Unfortunately the code dealing…

Why the compiler can't detect it will not be used? Tree shaking is well implemented in Javascript compilers, an ecosystem which extensively suffer from this problem. It should be possible to build a dependency graph and analyze which functions might actually end up in the scope. After all the same is already done for closures.

A more realistic example: something like printf or scanf. It can take an object of multiple types as argument. It takes computer's locale from environment and does locale dependent number and date formatting, also supports various timezones that it reads from OS.

And you always run it in a data center that uses a specific locale, and only UTC time zone, and very few simple types. But all this can only be known at runtime, except maybe types if the compiler is good.

Post reply on HN