157
Permanently Deleted (reddthat.com)
submitted 11 months ago* (last edited 10 months ago) by PumpkinDrama@reddthat.com to c/linux@lemmy.ml

Permanently Deleted

you are viewing a single comment's thread
view the rest of the comments
[-] Rustmilian@lemmy.world 3 points 11 months ago* (last edited 11 months ago)

If you go to the uutils repo you can see that it's making proper use of fuzzing, test, etc. and only makes use of unsafe in necessary areas. Uutils is also more consistent with modern standards thanks to clap & uniform design, has out of the box selinux support, etc.

The unsafe keyword isn't inherently "unsafe", nore does it disable any checks contrary to what some believe.

if you use a reference in unsafe code, it will still be checked.

Also many distros are already packaging uutils do to it "growing into remarkably robust shape", it's just not ready to completely replace coreutils quite yet and so it's not up for consideration by distros to ditch coreutils until it's at least at parity. (That's why I make use of hybrid and not outright replacing everything).

The point is not the language, it's how the project is making use of the language and uutils is doing a lot right.

[-] folkrav@lemmy.ca 1 points 11 months ago* (last edited 11 months ago)

My point was intended to be more generic than just uutils though. Agreed that this specific project looks interesting.

And yes, I know the unsafe keyword is not inherently unsafe to use, but it's also, in practice, one of the few potential footguns of the language, and is easy to abuse and get wrong. It'll raise a few eyebrows in PRs and you'll be expected to have both good reasons and a good test coverage at the very minimum lol. It's a good red flag, if you do end up with runtime memory issues, that it's probably happening in that block, but past this, you're still basically foregoing some safety for convenience. And people fail. Often.

this post was submitted on 30 Oct 2023
157 points (89.4% liked)

Linux

47814 readers
716 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS