Typical Computer science vs typical computer engineering
A MONAD IS A MONOID IN THE CATEGORY OF ENDOFUNCTORS
I have to say, I’m getting more and more frustrated by the bad code I have to write due to bad business circumstances.
I want clean, readable code with proper documentation and at least a bit of internal consistency and not the shoehorned mess of hacks, todos and weird corner cases.
todos
I found a simple trick against this: just remove them. Accept it ain’t gonna happen man.
Rust mentioned!
Instead of
if let Some(a_) = a{
()
} else if let Some(b_)=b{
()
} else {
dostuff
}
you could just use
if a.isNone()&&b.isNone(){
dostuff
}
Also if you don’t use the value in a match just use _
I’m not sure how I would go about this in an elegant way since I’m matching the string I get from a message…
If the message used enums for actions/procedures like SPAM_MEMES, then using enums would be more performant