Posadas [he/him, they/them] to chapotraphouse • 2 days agoIt's called Forbes 30 under 30imagemessage-square32 fedilinkarrow-up1138
arrow-up1138imageIt's called Forbes 30 under 30Posadas [he/him, they/them] to chapotraphouse • 2 days 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·19 hours agoyou dont need the return statement either link
minus-squarehuf [he/him]hexbear1·17 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·1 day 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