What's weird is people point to this, then point at a language like Scala and say "see errors should be values! This is how you do it right!" and I'm just like...what? How is that in anyway different.
What I'm saying is there's a lot to be said for Python style exceptions.
Oh, errors are values. You just have to nil-check to see if you got an error value or not.
And "error" itself is also an interface, that just requires an Error() that returns a string to implement. So you can make your return value with whatever data and also implement Error() that returns a string, and now you have an error perfectly compatible with everything else.
You can have your CustomThingie, but actually return the type "error". To get the other properties out of the CustomThingie, just cast the error to one.
What's weird is people point to this, then point at a language like Scala and say "see errors should be values! This is how you do it right!" and I'm just like...what? How is that in anyway different.
What I'm saying is there's a lot to be said for Python style exceptions.
Oh, errors are values. You just have to nil-check to see if you got an error value or not.
And "error" itself is also an interface, that just requires an Error() that returns a string to implement. So you can make your return value with whatever data and also implement Error() that returns a string, and now you have an error perfectly compatible with everything else.
You can have your CustomThingie, but actually return the type "error". To get the other properties out of the CustomThingie, just cast the error to one.
That's what I mean though - I have no idea what people think they are saying when they make that argument. There's a whole range of language-wars BS which seems to just be people parroting something that sounded intellectual they heard one time.
this is weird and kind of cool and I've just broken my perfect colour vision
0
Options
TL DRNot at all confident in his reflexive opinions of thingsRegistered Userregular
As you inhale, set your variables. Allow the correct syntax to assume its shape without straining. Exhale into a semicolon as you return to the next line.
As you inhale, set your variables. Allow the correct syntax to assume its shape without straining. Exhale into a semicolon as you return to the next line.
Now shake the frost from your fingertips, drive your torus deep into the VM, and spin a tight-wound loop of serialization.
Before casting the spell, you invoke the four cardinal directions, as scars around your wrist: H, J, K, L. Only the J wind answers to your kind, but it never hurts to be polite.
IlpalaJust this guy, y'knowTexasRegistered Userregular
edited July 2017
Driving to lunch I saw two men standing next to a cage of bunnies on the side of the road, about four or five of them. One held a sign that said "rabbit gold $5"
Please advise.
Ilpala on
FF XIV - Qih'to Furishu (on Siren), Battle.Net - Ilpala#1975
Switch - SW-7373-3669-3011
Fuck Joe Manchin
Before casting the spell, you invoke the four cardinal directions, as scars around your wrist: H, J, K, L. Only the J wind answers to your kind, but it never hurts to be polite.
My question, since I'm not a frogram. In that article, was the insane cultist-code being put up there not only functional, but hyperefficient? Or was it all bullshit that made a problem too complex?
I ate an engineer
0
Options
VanguardBut now the dream is over. And the insect is awake.Registered User, __BANNED USERSregular
Okay I returned home with a bag of coffee.
I am simultaneously editing the poems I planned to while jotting notes on process and framework to next writing project.
When I have drank enough coffee that I can see time, I shall begin.
Driving to lunch I saw two men standing next to a cage of bunnies on the side of the road, about four or five of them. One held a sign that said "rabbit gold $5"
Posts
ryu_needs_mad_buffs the legend
if (hungerLevel > 6) {
console.log('Hunger level is ' + hungerLevel + '. I\'m simply famished.');
} else {
console.log('Hunger level is ' + hungerLevel + '. I couldn\'t have another bite.');
}
Okay that seems to work. I'll keep going because I assume next is how to do an elseif kind of thing.
Yay! I feel like you're already an uncle, but congratulations on future additional uncleism!
Oh, errors are values. You just have to nil-check to see if you got an error value or not.
And "error" itself is also an interface, that just requires an Error() that returns a string to implement. So you can make your return value with whatever data and also implement Error() that returns a string, and now you have an error perfectly compatible with everything else.
You can have your CustomThingie, but actually return the type "error". To get the other properties out of the CustomThingie, just cast the error to one.
That's what I mean though - I have no idea what people think they are saying when they make that argument. There's a whole range of language-wars BS which seems to just be people parroting something that sounded intellectual they heard one time.
Thanks! Yeah, twice over. Nice to have one a bit closer to home.
Turn that frown upside down.
:rotate:
https://www.youtube.com/watch?v=Wm8ZoVQ_OJo
this is weird and kind of cool and I've just broken my perfect colour vision
Now shake the frost from your fingertips, drive your torus deep into the VM, and spin a tight-wound loop of serialization.
But 2006 was only like....
ah dammit...
These youngling forumers, they grow so fast.
Nuh uh! I don't wanna
My mom has recently scored the sweet setup of being able to park in the garage at home, and then park in the underground garage at work.
She hasn't had to scrape ice off her car in two years. I don't even own a car and I'm still jealous!
we'll take a coding break to look this ol' game
Technically correct
the best kind of correct
PLAY ON SARGATANAS SERVER
I AM GAZING CELESTINE THERE
Please advise.
Switch - SW-7373-3669-3011
Fuck Joe Manchin
My question, since I'm not a frogram. In that article, was the insane cultist-code being put up there not only functional, but hyperefficient? Or was it all bullshit that made a problem too complex?
I am simultaneously editing the poems I planned to while jotting notes on process and framework to next writing project.
When I have drank enough coffee that I can see time, I shall begin.
short hair is best hair
desc bb this
if {
} else {
}
is really hurting me
Seems p obvious
They are selling golden rabbit poop for $5
No dry time
No effort
No hair
No weight
No nothin
But stylabiliity is cut way back
Come Overwatch with meeeee
I prefer the classic
If
{}
Else
{}
つ ◕_◕ ༽つ give scalp pics つ ◕_◕ ༽つ
To Chanus you are but a youngling.
gooey grow your hair out with me