T O P

  • By -

aquartabla

finally


Borfis

Applause


horenso05

I love languages without exceptions šŸ˜


talescaper

No exceptions?


horenso05

yes like C, Zig, Rust, Roc, sometimes C++


morpowababy

Wooosh


horenso05

haha just got it now I'm dumb šŸ˜„šŸ˜„


Jjabrahams567

Roc? Thatā€™s a new one.


horenso05

It's very cool if you're into functional programming, it's early development though.


rover_G

Zig still has try keyword


horenso05

Yes, it's similar to rusts ? operator. let result = my_function(); if result.is_error() return result.error; let value = result.value(); or something similar can be done in any language, but the try just makes it convenient.


Cheap_Application_55

You're talking about Javascript?


Wire_Hall_Medic

My code's love language is exceptions.


ImpressiveContest283

Lol


SCP-iota

I love Rust, too


1Dr490n

Idk, I donā€™t have a lot of experience in error handling in such languages but I do think it has its benefits, but exceptions, especially in combination with try blocks, are reaaaaally useful sometimes because you donā€™t have to handle errors everywhere


DrFloyd5

You donā€™t need a special language to not handle errors everywhere. ;)


1Dr490n

Yessss but sometimes you shouldšŸ˜‚


horenso05

Rust's result is the same as only checked exceptions. I just prefer the explicit my_fun()?; instead of my_fun(); to know that it may bubble up the error. What I love about Rust is that you yan can do my_fun().unwrap(); to just crash the program when an error occurs and then just find all unwrap()s later.


LongjumpingAd2829

I miss working with Visual Basic's awesome "On Error Resume Next" switch.


morpowababy

Only a sith deals in absolutes.


Dope_Ass_Panda

Took me a bit to CATCH the joke


stidmatt

Honestly not terrible advice. I generally try to use try as a method of least resort, if statements give far more control over the workflow.


talescaper

This is true, though Java doesn't give you a choice a lot of times when some libraries have methods that require an exception in the method or a try catch block, regardless of how well your flow is.


Wire_Hall_Medic

Do while or throw an exception, there is no try.


jarjarpfeil

Safe coding? If theres an error itā€™s cearly the userā€™s fault since my code is perfect since I found it on chat gpt and stack overflow. Itā€™s best that they suffer for their own mistakes rather than me


experimental1212

Exceptional


MineKemot

Where's the catch block?


SCP-iota

Rust team refusing to stabilize \`try\` blocks:


SynthRogue

No try, no catch. Do or die.


Jjabrahams567

Golang has entered the chat


kilgorezer

But try{} makes everything easier!