Thread 105968378 - /g/ [Archived: 123 hours ago]

Anonymous
7/20/2025, 5:47:38 PM No.105968378
go_brainlet
go_brainlet
md5: 008e83d8c9075d3fb7ba488ec88bfe48๐Ÿ”
if err != nil {
return fmt.Errorf("oopsie wopsie: %w", err);
}


do Gotards really?
Replies: >>105969064 >>105969103 >>105970089 >>105970957
Anonymous
7/20/2025, 7:13:29 PM No.105969054
It wasn't too long ago that /g/tards wanted NO error handling structures because Unix style integer codes are good enough. You showed them a Result enum and they called you a tranny, guaranteed. Now look where we stand.
Replies: >>105970016
Anonymous
7/20/2025, 7:14:51 PM No.105969064
>>105968378 (OP)
gojeets are subhuman
Anonymous
7/20/2025, 7:20:53 PM No.105969103
>>105968378 (OP)
>no!!! i don't want to handle my errors!!!! I want the runtime to shit out a stacktrace every time i make a grammatical error!!!1!
Replies: >>105970030
Anonymous
7/20/2025, 7:30:15 PM No.105969182
>computer, create an error, let it rise up to the top level of call stack, and print a call stack as a message
>throw new Exception()
literally 22th century technology
Anonymous
7/20/2025, 7:45:54 PM No.105969332
try catch my balls tranny
Anonymous
7/20/2025, 8:45:41 PM No.105969889
>grab my balls
>grab my balls
Anonymous
7/20/2025, 8:57:43 PM No.105970016
>>105969054
>error codes
Kek. Reminds me when normgroids would ask me why windows update fails with some useless HRESULT that is also impenetrable to Google for some weird reason. Hell I can't even understand why you can find the first 500 win32 ones, but never for the other facilities.

An error code without a trace is completely worthless. At least go toddlers have those I guess.
Replies: >>105970793
Anonymous
7/20/2025, 8:58:50 PM No.105970030
>>105969103
You never do handle them though, go tranny. At least in modern languages you can pattern match exhaustively on all error variants.
Replies: >>105970044 >>105970061 >>105970458
Anonymous
7/20/2025, 9:00:18 PM No.105970044
>>105970030
>You never do handle them though
Speak for yourself, faggot.
Replies: >>105970070
Anonymous
7/20/2025, 9:00:45 PM No.105970052
Go makes faggots seethe because it's a language by the white man for the Indian man and it increases Indian software quality. Go is real Brahmins shit and has depreciated Java and Cshart.
Anonymous
7/20/2025, 9:01:48 PM No.105970061
>>105970030
>Pattern matching
Hello fellow Rust Neo-sister! :D
Replies: >>105973109
Anonymous
7/20/2025, 9:02:26 PM No.105970070
>>105970044
I know for a fact you don't. I've seen go programs, I've written go programs. The experience is objectively as bad, if not worse, than exceptions in oojeet languages. At least an exception requires you to actually catch it in a block. Still shit for exhaustiveness.
Replies: >>105970083 >>105970132
Anonymous
7/20/2025, 9:03:26 PM No.105970083
>>105970070
Post code
Anonymous
7/20/2025, 9:03:50 PM No.105970089
>>105968378 (OP)
if err != nil {
vs
if err {
Anonymous
7/20/2025, 9:08:15 PM No.105970132
>>105970070
>muh exhaustiveness
match func() {
Ok => val,
Err => err,
}


is exactly the same as
if err != nil {
return val, err
}
Replies: >>105970182
Anonymous
7/20/2025, 9:12:56 PM No.105970182
>>105970132
You're literally retarded if you believe this. Show me you handling something like opening a file and dealing with enoent in both dipshit, then repost.
Replies: >>105970239
Anonymous
7/20/2025, 9:18:47 PM No.105970239
>>105970182
let file = match File::open(filename) {
Ok => file,
Err(err) if error.kind() == ErrorKind::NotFound => {
// handle file not exist
},
Err(err) => {
// handle other errors
}
}


file, err := os.Open(filename)
if errors.Is(err, os.ErrNotExist) {
// handle file not exist
} else if err != nil {
// handle other errors
}


They're the same fucking thing with very slightly different syntax.
Replies: >>105970340 >>105970439
Anonymous
7/20/2025, 9:26:35 PM No.105970340
>>105970239
They aren't even remotely the same.
I swear to Christ. Go trannies are insane.
One is compiler enforced and discoverable from the type of the error, the other isn't and actually has to O(n) walk the errors and you better hope you picked the write package level error constant. Also now add eperm dipshit. One extra match arm, yours is a disaster. This doesn't even cover monadic handling of errors.
Replies: >>105970351 >>105970743
Anonymous
7/20/2025, 9:28:02 PM No.105970351
>>105970340
>Gets rekt
>Seethes over semantics
>Outs himself as a functional retard
>Refuses to post code
You have humiliated yourself my friend.
Replies: >>105970375 >>105970413 >>105973114
Anonymous
7/20/2025, 9:30:11 PM No.105970375
>>105970351
No, you have. It's pathetic how without fail, go toddlers demonstrate a complete lack of understanding of PLT. It's a midwit language and your post and code proves it.
Replies: >>105970958
Anonymous
7/20/2025, 9:33:34 PM No.105970413
>>105970351
Also guess what dipshit? Your code doesn't even close the file because gotoddlers don't have RAII. Again, it isn't the same. You don't know what you're doing or talking about.
Replies: >>105970958 >>105971008
Anonymous
7/20/2025, 9:35:44 PM No.105970439
>>105970239
Except Rust has heaps of syntactic sugar to make it convenient, Go has none at all because it's designed to be idiot-proof and idiots don't like abstractions.
Anonymous
7/20/2025, 9:37:43 PM No.105970458
>>105970030
exhaustive pattern matching is the most useless programming invention
and the reason why it's exhaustive is simply because it's expression so it must return something. it's byproduct of shitty FP design, nothing more
Replies: >>105970474 >>105970491 >>105970505
Anonymous
7/20/2025, 9:39:17 PM No.105970474
>>105970458
i love how c# handles it. it just throws exception if there is no matches.
Anonymous
7/20/2025, 9:41:19 PM No.105970491
>>105970458
>being able to ignore errors is actually, le bad.
why do you retards even pretend to like a type system if you won't use it? Why do you guys tout a system that's worse than exceptions like it's some breath of fresh air?
Anonymous
7/20/2025, 9:42:52 PM No.105970505
>>105970458
Exhaustive matching is perfectly fine, but even when you don't need it, Rust has if-let and while-let constructs.
Replies: >>105970843
Anonymous
7/20/2025, 9:58:54 PM No.105970684
Screenshot_20250720-155822.Chrome
Screenshot_20250720-155822.Chrome
md5: 5513de0bdd26444790c0e89f236fef76๐Ÿ”
Alongside Erlang, Golang is the whitest language to date.
Replies: >>105970695 >>105970712 >>105973036 >>105973114
Anonymous
7/20/2025, 9:59:52 PM No.105970695
>>105970684
erlang is for white people (aryan chads)
go is for white people (effeminate liberal faggots)
Anonymous
7/20/2025, 10:01:04 PM No.105970712
>>105970684
That's probably why it's shit. It's made for nepobabby midwits. Chinese century, whittu piggu. Cope.
Anonymous
7/20/2025, 10:02:56 PM No.105970729
1731123507289762
1731123507289762
md5: e3179b78e34c34f637d20747dc8ef70b๐Ÿ”
void* important_ptr = do_something();
assert(important_ptr != NULL);
Replies: >>105970758
Anonymous
7/20/2025, 10:03:45 PM No.105970743
Screenshot_20250720_230154
Screenshot_20250720_230154
md5: 2f23fc315485b0314e2142bf607d33f6๐Ÿ”
>>105970340
>~43% more symbols for the same result
Enjoy your bloated let me hold your hand language.
Also consider joining the 43%
Replies: >>105970773 >>105970843
Anonymous
7/20/2025, 10:04:36 PM No.105970758
>>105970729
>Compiler assumes pointer can never be NULL and deletes your assert
Heh, nothin personnel, kiddo.
Replies: >>105970979 >>105971004
Anonymous
7/20/2025, 10:05:59 PM No.105970773
>>105970743
It's not the same code nor does it do the same thing.
EINVAL
Anonymous
7/20/2025, 10:07:56 PM No.105970793
>>105970016
> HRESULT is bad, I need it to drop into my source level debugger for every error
Usually you donโ€™t have the source code for every windows program.
I can tell youโ€™re very new to working with computers, but most (if not all) of them are written in C. Look into it.
Replies: >>105970854
Anonymous
7/20/2025, 10:12:19 PM No.105970843
>>105970743
>gotard complaining about more typing
you can't make this shit up
also see >>105970505
Anonymous
7/20/2025, 10:13:21 PM No.105970854
>>105970793
What the fuck are you talking about retard? The point is even normie centric shit like Windows Update forwards deep error hresults with zero context to users. Error codes tend to do that. With exceptions, at least you get a backtrace to go with it. Nothing stops you from having a backtrace of codes too.

>usually you don't have the source code
Sounds like a wincuck problem and all M$ shit has a symbol server anyway so you
a) can't read
b) don't even know windows or debugging in windows
Replies: >>105971031
Anonymous
7/20/2025, 10:21:54 PM No.105970957
images
images
md5: d008e964fd01e50eecc7b3bb5f18bc62๐Ÿ”
>>105968378 (OP)
Posted it again award
Anonymous
7/20/2025, 10:21:56 PM No.105970958
>>105970375
>>105970413
Seething same fag. Post code or keep coping.
Anonymous
7/20/2025, 10:23:37 PM No.105970979
>>105970758
That is the sensible thing to do. Asserts are declarative about program state; they are not for doing error handling. When you use an assertion you are telling the compiler a Truth.
Anonymous
7/20/2025, 10:26:07 PM No.105971004
1729137652146091
1729137652146091
md5: b21658149613a2be93bedc965b9832f5๐Ÿ”
>>105970758
Not my problem, my game code does not really do error handling except for cases where the user could do something stupid. I spam asserts everywhere and fix all errors I can find when developing, as that's what asserts are for.
Replies: >>105971064
Anonymous
7/20/2025, 10:26:13 PM No.105971008
>>105970413
If the lifetime of the data is the same as the application there is no need to manually clean it up, the os will mark all the pages to be reused. In fact this is memory safe as proved by Rust because parts of Rust's stdlib just lets the os clean up shit after it's done making a mess and leaks memory if that shit is expected to life the entire life of the program. Don't believe me? Start valgriding your Rust code.
Anonymous
7/20/2025, 10:28:36 PM No.105971031
>>105970854
My C programs explain what's wrong and which line in the source the error is on, you're simply full of shit.
Anonymous
7/20/2025, 10:31:24 PM No.105971064
>>105971004
I was making a joke, but that's just a harrowing comment...
Anonymous
7/21/2025, 2:08:48 AM No.105973036
>>105970684
>Brian Kernighan
the eternal intern
Anonymous
7/21/2025, 2:20:48 AM No.105973109
>>105970061
rust > java >= c++ > c# >>>>>>>>> gojeet
Anonymous
7/21/2025, 2:22:28 AM No.105973114
>>105970351
ok saar
dont forget to redeem if err != nil saaaaaaar

>>105970684
go is brahmin tier language saaaaar *braaaaaaaap*