Now that the dust has settled, was he right?
>yet another twitter screencap thread
It makes sense in certain environments where you don't know how to handle the error and dont want to exit the whole program i.e. user interfaces
>>108236456I write JS for a corpo. The code base, I work with it, has few try-catches. Every time, we have error, it needs at least an hour to debug, as It could have multiple origins and you have to test which method call fucked things up.On the other hand every uncaught exception can be traced to a single function call.After dealing this for a while, I started to remove try-catch blocks and added checks for common errors like null or undefined instead. My work got easier with each deleted try-catch block.So, yes, screw exceptions. Learn to handle errors, bitch.
>>108236547Did you really expect the poster to have any thoughts of his own or even the ability to summarize the opinion of others?
>>108236556This
the retard doesnt mind or differenciate execution environments (static VS dynamic), ranting about "Exceptions" bad without the context of thier application.thus, he's a low iq - every runtime needs try..catch. though, im not a fan of exceptions (wont ever use them) in low-level (compiled) language, i see their application to escape deep call stack may be attractive, especially if the whole thing is written in it. he doesnt even list it in his retarded rant.
>>108236456>let me pump my code full of pointless prechecks to ensure no error is produced>then i still have to handle the function producing an error anyways>BUT AT LEAST IT CAN'T PRODUCE AN EXCEPTION>oh wait, that just means it will panic/abort insteadWow, thank you based aryan man for removing all the indianess from my code.
>>108236849>panics in release codeOh shit nigger what are you doing
>>108237041Just saar things
>>108236547?
>>108236556what does that have to with exceptions, retard?java has exceptions and the stack trace always unambiguously delivers the origin.
Exceptions should only exist for inputs and outputs.If you're try catching within your own code then it's retarded.Also exceptions are better than if statements performance wise.
>>108236548>>108236548>It makes sense in certain environments where you don't know how to handle the error and dont want to exit the whole program i.e. user interfaceswhere
>>108236456do rust and go not have exceptions?
>>108240352a web server. you don't want an unhandled error caused by one request to take down the whole site for everyone.
>>108238689this post best post
>>108240391just use a failstack
this retard was ahead of his time, all the stupid vibe faggots say the exact same retardthank god he and they will never have jobs so my bank account isn't randomly included in a retarded breach because the dogshit slop they shit out doesnt work
Rust is definitely the whitest programming language, idk why this makes /g/ seethe
>>108236456>rust doesn't have exceptions>it just panics and kills the whole applicationI hear 41% of rust applications kill themselves.
>>108240486I'm a long time Java developer. Rust isn't really that different, if you like code that isn't memory safe or performant. I prefer memory safety + performance, so I use Java.
I don't even know what exceptions are.
>>108236456Isn't that retard a hasan diddy piker psycho fan? I don't care what a subhuman of this caliber has to say.
>>108240486Lunduke and his jewish viewers literalky had a meltdown because ESR, Kling and other chuds are starting to mass-try Rust and he doesn't know what to do. I always thought Lunduke just hated trannies, but he actually is severely deranged about Rust. Should get that checked out.
>>108236456that guy is a mega faggot and I blocked him years ago, but I completely agree. even better is to not have errors at all:https://www.dgtlgrove.com/p/the-easiest-way-to-handle-errorsbut that's not of course applicable to everything. optional types are a really stupid idea though, you can just return stuff with flags that indicate that the operation was not successful. what a meaningless idea
>>108240552>I prefer memory safety + performanceif that was true you would use C/C++ with memory arenas. they are the most performant way to operate on memory way while being safe
>>108240607>optional types are a really stupid idea though, you can just return stuff with flags that indicate that the operation was not successful.Then you would use an Either type in that situation.
>>108236456I dont know what an exception is but im sure it will work out in due time.
>>108240624>C/C++ with memory arenasSee, there you guys go again. With Java, you cannot write unsafe code. sun.misc.Unsafe was deprecated years ago. In the next release of Java, any code that used it will throw UnsupportedOperationException. It will be completely blocked. It's gone. No "with extra safety" thing required. Rust has an unsafe keyword, the idea of unsafe code is permanently etched in the language forever.
>>108240552>performance>java
>>108240718you can always find an edge case or benchmark where $your_lang beat Java, but the point is I don't have to give up performance in order to have memory safety. In Rust, you do.
>>108240771most ironic post in this thread
>>108240790https://abrams.cc/rust-dropping-things-in-another-thread>just write your own garbage collector bro
>>108240804GCs suck
>>108240842GC's are cool. You can choose how you want to handle memory without having to rewrite your whole app. Just swap in a different GC.
>>108240861GCs never know when it's best to release memory. Which is why reference counting is still used
>>108240861This is why cniles cannot fathom using third party libs. They have to write literally everything from scratch themselves, or someone will have handled memory in a way they don't personally like. They sperg out at one another over memory handling just like they do over tabs vs spaces. Java has the largest repo of libs of any language on maven central. Never need to duplicate effort, just grab a jar that does that thing. That's why Java developers have velocity you can't touch on other languages. Thank you Garbage Collectors for solving that problem for us..
>>108240861Lmao
>>108236849Rust error handling is mostly out of the main code, it's just an ? on the line that can fail. Unlike C where you have to if else every single function call because C sucks lmao.>>108237041It's possible to write panic-free Rust programs, I'm hoping one day this will be easier to enforce with a compiler, but it's unfortunate that by default it allows retards to randomly fail, but cniles write programs full of fprintf that can fail and is never checked either so I don't really give a fuck about what retards do because discipline is a personal matter.
>>108236456I have "Americans are fucking retarded sharing their retardation on the twatter" fatigue.
>>108240607Looking at his "nil node" example I realised this guy is an idiot. If you're looping over this structure (a linked list where every node also stores the tail and head so if I'm storing integers my memory footprint is 80% overhead from the four pointers per node) how do you know where it ends? Oh you check if the node is equal to nil_node right? So in other words it acts just like NULL except worse because it silently succeeds when you read it.I had an inkling he was full of shit before I got to that because he talks about treating error cases as normal cases and then continues to implicitly treat them as different, but when I saw the example I was assured that this guy is a dumb cunt.
>>108236456>the White manIsn't this little nigger a turkroach?
You don't to exceptions in aerospace code. You do return codes.
>>108236456why is a turk talking about white men
>>108236456Perhaps there is some valid point made about the keywords, and I think there is potential for generalizing how you express multiple paths of control flow rather than restricting yourself to just "normal" and "exceptional" flow. However, exceptions used smartly offer better (than error checking) performance characteristics for non-exceptional program flow and can even result in better code size depending on various factors. There are still some open questions regarding exceptions and function coloring, though Java's checked exceptions model has already answered a lot of that.
>>108236548it doesn't make sense when there's better alternatives. go and rust has error types and with those you can just look at what a function returns and immediately know what to write. exceptions are more prone to crashing your program because of the possibility of you missing a potential error.
>why yes i'm intentionally writing code that's going to fail so i need to handle that instead of just writing the correct code in the first placepeak pajeet
>>108246412>i have never deployed anythingpeak NEETwit
>>108240409What?
>>108236456>write program that fetches data from somewhere>you may know what it looks like right now but it could change at any moment and you have no control over it>oh well using exceptions is brown behaviour so if the data changes I guess my program will just crash>at least I'm still white!
>>108236456>twitter thread>Jeet obsessed>claiming Jeets created Exception despite it being made by white men decades before jeets were big in tech
>>108246412Yes, because the real world is literally perfect and your program exchanges data with all these other perfect programs out there... Man, thank God for that, I can deal with every single error because they're all predictable in this perfect world
>>108236456If "white" programmers are so good they would dominate the market by now, but that aint the case, no matter how cheap Indian workers are.
>>108246477US software companies still hire americans is because of "culture fit". There's literally no difference between a competent LATAM developer and a competent US developer except the american makes at least 30-50% more. If anything the industry has prejudice against foreigners not white americans.
>>108246496>There's literally no difference between a competent LATAM developer and a competent US developer except the american makes at least 30-50% moresenooooooooooor
>>108236456Is this retard actually advocating for checked exceptions!?We've come full circle lmao