118
you are viewing a single comment's thread
view the rest of the comments
pub fn predict_crime(suspect: Person) -> bool {
   if suspect.race() == Race::Black {
       return true;
   } else {
       return false;
   }
}
[-] huf@hexbear.net 17 points 3 weeks ago

ew...

pub fn predict_crime(suspect: Person) -> bool {
   return suspect.race() == Race::Black
}
[-] TheDoctor@hexbear.net 11 points 3 weeks ago

Good change but also why is race a getter method while Race::Black is a constant enum? Is race an impure function dependent on global state? Is it derived from some other internal immutable state?

race() is a getter method as it is dependent on which Eastern and Southern Europeans are considered white at the time

[-] ProletarianDictator@hexbear.net 1 points 3 weeks ago

you dont need the return statement either

[-] huf@hexbear.net 2 points 3 weeks ago

i dont even know what language this is :D i just thought it'd be a nice bit to silently pass over the racism aspect and nitpick the code

[-] ProletarianDictator@hexbear.net 2 points 3 weeks ago

It's Rust.

If you omit the semicolon on the last line, it will return that value, so suspect.race() == Race::Black will return true/false for the containing expression.

[-] Barx@hexbear.net 10 points 3 weeks ago

Nerds with a rudimentary understanding of undergrad stats do this all the time with extra steps by just building a simplistic model based on (racist) "crime data". Sometimes literally just a basic Bayesian model.

And they get hired by Palantir to do versions of that for $300k/year.

this post was submitted on 03 Dec 2024
118 points (100.0% liked)

chapotraphouse

13609 readers
698 users here now

Banned? DM Wmill to appeal.

No anti-nautilism posts. See: Eco-fascism Primer

Slop posts go in c/slop. Don't post low-hanging fruit here.

founded 4 years ago
MODERATORS