[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


You crackers told me Go was simple. Easy to use. I just can't read this shit.
>>
>>109637954
>I just can't read this shit.
Have you considered increasing contrast
>>
>>109637954
Simple, use Go before 1.23.
The new update with iterators and method generics ruined it.
>>
based, might look into trying Go again.
>>109638066
you unironically do not deserve to be a programmer if you cannot understand generics. they are central to the theory of types, just like incrementation is central to working arithmetic.
>>
>>109637954
Took me a while to see what it's doing. This is beautiful. If you don't understand this then you're better off letting a clanker do all of your programming for you
>>
Ken Thompson was against generics for a reason.
>>
>>109637954
Never written a line of Go in my life and I understand this perfectly. It's bog standard for any no Cnile language.
>>
>>109638577
retard. I know what it does. I can read the fucking code but it's fucking unreadable.
>Map[U any]
why add any? It's a generic ffs.
>>
Retard
you're not supposed to code in it, you're just supposed to larp about it
>>
Aren't those just higher order functions?
>>
is this supposed to be the fabled wholesome chungus super duper simple no bloaterino language?
>>
>>109637954
Anything that Google makes is unusable garbage. Try C++ instead.
>>
>>109639474
I think op is looking for a language that looks like less of a clusterfuck, not more
>>
>>109637954
LLMs were invented for this. You don't need to understand language syntax anymore. You just need a basic understanding of procedural logic and be able to properly and thoroughly specify what you want.
>>
>Go finally has generic receivers
Whoa?
>>
>>109639470
Seriously, C++ and Rust are way more readable than this.
How can you fuckup generics syntax so much and in supposedly simple language for beginners?
>>
I have ptsd from trying to make a drivable tank using Godot engine
I don't ever want to use Go
that was such a waste of my week and I have profound guilt and terrors from it
>>
Takes more than 3 seconds to read what it does so it's shit
>>
File: 1724257503931583.jpg (1.54 MB, 1920x1582)
1.54 MB JPG
>>109638024
fpbp
>>
It's not nice, but generics are almost never nice to read in any language.
>>
>>109638066
true
>>
>>109637954
>I just can't read this shit.
You may be clinically retarded.
>>
File: 1772531177107046.jpg (235 KB, 926x819)
235 KB JPG
>>109640231
>>
>>109638143
>>109638066
That's so crazy how less readable it is now. It used to be that you could pretty much just jump in to nearly any codebase and know what's going on.
>>
>>109637954
Go was optimized for a compiler to read, not a human.
Every single syntax decision they made was purely to make it easier to write the parser.

func ()name()()
>>
Some of y'all have never had to deal with crufty Perl 5 shit, and it shows.
>>
>>109640231
Cute Koshitan.
>>
>>109638099
complicating things is bad, if you dont understand that you shouldnt be allowed to waste oxygen
>>
>>109640641
>complicating things is bad,
objectively true
>if you dont understand that you shouldnt be allowed to waste oxygen
now you're just being retarded
>>
>>109637954
Go *is* simple.
Even the generics you're seeing aren't that complicated.
Just because it doesn't look like Java doesn't make it not simple.

A function which takes a list[T] called `l` and a function called `f` which takes Ts and outputs Us is called `Map` and does some trivial work.
What's the problem?
You don't understand generics, or you don't understand functional programming principles?

Sounds like a one-language-knower problem.
>>
>>109640641
The simplest way to travel is to walk. If you were a useful member of society rather than a net drain on everyone around you, you'd probably still have a car, even though it's more complex than putting one foot in front of the the other.
>>
>>109640757
What makes someone project this obviously. Attention?
>>
>>109640231
I can almost see her butt
>>
>>109637954
I haven't programmed in Go but have no issue reading this. Therefore, it's skill issue on your side.
>>
>>109640641
then offer an alternative solution to the problem that generics solve (the use of identical code across numerous types of data given semantic similarities across such types).
you understand the core problem, right? I want to be able to iterate over the elements of a linked list, the elements of an array, or the key--value pairs of a hash map, and I do not want to have to write separate implementations for each type. this is the problem that generics solve. you implement an iterator generic.
>>
>>109639424
>why add any
because it is specifying that the values of the map can be any value. it is only locking down the type of the key.
holy fuck you are retarded
>>
File: 1787570152238788.jpg (14 KB, 270x259)
14 KB JPG
>>109640907
nvm I'm the retard



[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.