[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1711259880659786.png (406 KB, 603x898)
406 KB
406 KB PNG
Fucking kek..
>>
>>103238183
>is Java replacement
>looks like Java
I don't see the problem
>>
Did Yanderedev write that?
>>
File: 1731992250773032.jpg (9 KB, 235x176)
9 KB
9 KB JPG
take that faggot shit back to plebbit
>>
it just works
>>
>>103238204
>>looks like Java
It looks nothing like Java
>>
>copy code
>open chatgpt
>how do i fix this code: PASTE
done
>>
>>103238183
>every variable needs a catch error case
Why?
>>
at least error mesaages and stack traces would be really easy to debug...
>>
File: 1731993813296857.jpg (47 KB, 755x755)
47 KB
47 KB JPG
>>103238225
this is what a superior language looks like
>>
>>103238183
this is how we do error handling in a no exception C++ codebase, but the difference is we have a
CHECK(…) type macro that takes a std::expected<T,E> and returns early like this code is doing. The idea is fine, but manually having to write the conditionals after each function is stupid. It would look better like

std::expected<int, void> f() {
CHECK(a());
CHECK(b());
CHECK(c());
return 69;
}


I think that Zig has something like this built in? Not sure.
}
>>
>>103238183
Go is retarded. Zig is THE perfect language
>>
File: 1731991419962340.jpg (31 KB, 500x368)
31 KB
31 KB JPG
>>103238311
nah
>>
>rust gives you ? in your path
say sorry
>>
>>103238183
> ...varV1
> ...varV2
> ...varWeReallyFixedItThisTimeV3
I dont think go's error handling is the problem here
>>
>>103238225
https://go.dev/blog/errors-are-values
learn go
>>
bait
>cherrypicking unusual initialization code
>>
>>103238513
This is bad because then I have to actually think about the program I am writing. A good language should solve my problems for me.
>>
>>103238569
90% of Go code out there looks like this
>>
>>103238183
all it needs
or_return

>t. Odin enjoyer
>>
>>103238712
Actually go needs less useless language features not more. No amount of language features will save programmers from their own choices.
>>
This is why Rust has the ? operator.
>>
>>103238271
cpp macros are crap
>>
>>103239456
whats the alternative if you're trying to have non verbose error handling without exceptions?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.