Posadas [he/him, they/them] to chapotraphouse • 1 day agoIt's called Forbes 30 under 30imagemessage-square32 fedilinkarrow-up1134
arrow-up1134imageIt's called Forbes 30 under 30Posadas [he/him, they/them] to chapotraphouse • 1 day agomessage-square32 Commentsfedilink
minus-squarehuf [he/him]hexbear24·1 day agoew... pub fn predict_crime(suspect: Person) -> bool { return suspect.race() == Race::Black } link
minus-squareProletarianDictator [none/use name]hexbear2·12 hours agoyou dont need the return statement either link
minus-squarehuf [he/him]hexbear1·10 hours agoi 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 link
minus-squareTheDoctor [they/them]hexbear15·1 day agoGood 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? link
minus-squaregay_king_prince_charles [she/her, he/him]hexbear15·24 hours agorace() is a getter method as it is dependent on which Eastern and Southern Europeans are considered white at the time link
ew...
pub fn predict_crime(suspect: Person) -> bool { return suspect.race() == Race::Black }
you dont need the return statement either
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
Good change but also why is
race
a getter method whileRace::Black
is a constant enum? Israce
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