Golang is BAD for SMART PEOPLE

  Рет қаралды 238,552

ThePrimeTime

ThePrimeTime

Жыл бұрын

Recorded live on twitch, GET IN
/ theprimeagen
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact

Пікірлер: 751
@BudgiePanic
@BudgiePanic 3 ай бұрын
I'm reminded of the TempleOS guy quote "An idiot admires complexity, if you build something so clusterf***ed that no one can understand whats going on, they're going to think you're a god"
@justinforder2835
@justinforder2835 2 ай бұрын
Tony Hoare made the distinction between simple programs with obviously no errors, and complex programs with no obvious errors
@auntiecarol
@auntiecarol 2 ай бұрын
@@justinforder2835Just want to clarify that Sir Tony Hoare is not Terry A. Davis. One was God, the other wrote for God.
@Rundik
@Rundik Жыл бұрын
At a company, half of the 500k lines of golang code in the codebase were leaked. Luckily, in this half, all the lines were "if err != nil {"
@fortuneosho8137
@fortuneosho8137 11 ай бұрын
😂 my hands are sore from writing that boiler plate code... I wish there is a better way of catching errors
@GK-we4co
@GK-we4co 11 ай бұрын
@@fortuneosho8137 Monads.
@emilien.breton
@emilien.breton 10 ай бұрын
@@GK-we4co I needed that. Something that drives me absolutely crazy is how Go keeps talking highly of its brand new clever ways of doing things. The issue is that they completely miss the mark every single time. Error handling is a great example of that.
@kahnfatman
@kahnfatman 6 ай бұрын
@@GK-we4co Gonads
@petarpetrov3591
@petarpetrov3591 3 ай бұрын
but hey ..... EXCEPTIONS .. BAD... THE OCULT!
@esra_erimez
@esra_erimez Жыл бұрын
As a backend developer that is migrating a not so insignificant body of code from C++ to Go, I can say that Go is a Godsend. When we code in C++ we are constantly second guessing ourselves and feel like we are trying to avoid mines in a minefield. We are far more productive and have progressed much faster in Go.
@NathanHedglin
@NathanHedglin Жыл бұрын
Anything is better than C++
@esra_erimez
@esra_erimez Жыл бұрын
@@NathanHedglin Never have truer words been spoken. I cannot agree with you more.
@NoX-512
@NoX-512 Жыл бұрын
@@NathanHedglinExcept for Lisp, Prolog and Forth.
@sck3570
@sck3570 Жыл бұрын
@@NoX-512 and JS
@devnexen
@devnexen Жыл бұрын
@@NathanHedglin even C 😛
@bestformspielt
@bestformspielt Жыл бұрын
Absolutely based! The moment you transition from junior to senior developer is the moment you realize that clever code is the worst.
@draakisback
@draakisback 10 ай бұрын
Exactly. Overengineering is the absolute worst thing you can do for any project. The reason why go is a popular language and very popular specifically with startups is because it is very easy to get started with. There's nothing wrong with that and to say otherwise it's just idiotic.
@sasukesarutobi3862
@sasukesarutobi3862 10 ай бұрын
"A junior dev tries to write code only a senior dev could understand, and a senior dev tries to write code that even a junior could understand."
@TheMrKeksLp
@TheMrKeksLp 10 ай бұрын
@@draakisback I mean there are plenty things wrong with simple languages. They are just popular because people are lazy and don't want to think a lot
@BosonCollider
@BosonCollider 9 ай бұрын
The counterpoint to that is that you do want your core libraries to export an API that allows your code to be both short and not clever. That is a lot harder to do if the library code is not allowed to do clever things. No generics? Then all of a sudden, libraries can't export a good BTree data structure of any fixed type. No metaprogramming? Enjoy dealing with ORMs that use a DSL that compiles to Go instead of just being implemented in Go, which is literally much worse than any in-language trick a library could have used up to and including advanced macro usage. The flipside of having a dumb language is that your libraries become much more horrible. Limiting application code to be dumb is good practice. Limiting libraries to be dumb makes it hard to make the application code dumb. You will end up writing code that no one wants to read instead of code that is basically a configuration file.
@b_delta9725
@b_delta9725 9 ай бұрын
@@TheMrKeksLp if that was the case java wouldn't have been so famous for so many years. I get your point, especially nowadays when it seems github copilot will be the next best programmer, but you can have simple and good at the same time, maybe not python levels of simple but Go is in a good spot i think
@steve-adams
@steve-adams Жыл бұрын
What I like about Go: 1. It's a sane balance of very familiar paradigms, but it doesn't go too hard on any of them. So you've got OOP patterns, composition, procedures, first class functions, etc. It takes a lot of what's good about these things without borrowing too much to become dangerous. 2. It eliminates a lot of cognitive burdens by not allowing you to get too clever. Abstractions need to stay fairly simple. The type system lends itself well to creating interfaces that are clear, concise, and easy to reuse, extend, etc. 3. The standard library is excellent, consistent, and serves as a great reference for how to do things in your own code. 4. Super portable, snappy feedback loop, standardized tooling, makes for super easy development and deployment experiences. What I don't like about Go: 1. It isn't intuitive for a lot of developers, and they reach for familiar patterns that don't quite work in Go. They end up feeling defeated and frustrated. I've seen this across all experience ranges. I've even seen a team drop Go for Rust in a case where Go made so much sense, and instead they punished themselves with Rust for months because... I don't know, Rust is better? I mean, it's awesome, but sometimes you just need a dumb API or CLI and Go will let you iterate on it super fast. And let's not kid ourselves, half the stuff we build will get thrown out or deprecated; making it 1000% bug-proof and memory safe and so on isn't important or necessary when you can get like 95% of the way there with Go. If something proves itself, go ahead and write it in something else, but don't cheese-grate your brains over it. 2. Still don't like error handling 3. I'd be 10x happier with some sort of expressive pattern matching syntax 4. The gopher
@TheNewton
@TheNewton Жыл бұрын
"1. It isn't intuitive for a lot of developers, and they reach for familiar patterns that don't quite work in Go." The counter-crux of that article, got to choose the right tool and then not try to use like another tool. Banging a single nail with a wrench can work with a heavy wrench, but really get a hammer when building a house. Article complains GO is "simple" while wishing for a different feature set that already exists in another tool that is literally shown in the article.
@depafrom5277
@depafrom5277 Жыл бұрын
There is so much wrong with the Go language, only reason why its popular is there is no alternative right now that fits this niche so well.
@marcs9451
@marcs9451 11 ай бұрын
I love the gopher, much cuter than ferris
@yongkangchia1993
@yongkangchia1993 11 ай бұрын
The gopher 😂
@max3446
@max3446 11 ай бұрын
I agree - I feel most of the issues with the Go language could be solved by introducing sum types and pattern matching.
@dubonzi
@dubonzi Жыл бұрын
I would be terrified of having a guy like the author in my team.
@metalwarrior6657
@metalwarrior6657 11 ай бұрын
I had
@SleepyHarryZzz
@SleepyHarryZzz 11 ай бұрын
IMO anyone implicitly putting themselves in the bucket of "Smart Programmer" is a pretty immediate red flag
@afifdev
@afifdev 11 ай бұрын
@@SleepyHarryZzz why is red flag? can you tell me? for my opinion, we can discuss and talk to him to get attractive information or sharing the knowledge right? I think it's good
@ZephrymWOW
@ZephrymWOW 10 ай бұрын
@@afifdev Because people like that talk from ego not experience.
@afifdev
@afifdev 10 ай бұрын
@@ZephrymWOW I see, that people is not smart, just full of ego, it's not smart people, the discussion is making the decissons what is best. Don't generalize people like that, it's not smart or clever people, just ego
@isaactfa
@isaactfa Жыл бұрын
I really like that I can just look at a foreign Go module and grok what's going on pretty quickly, because there are barely any fancy language constructs to be aware of. I'm decently proficient in Rust, but looking at libraries, I often struggle to figure out what's going on because of macro invocations, weird Trait hacks, or unsafe code.
@parlor3115
@parlor3115 Жыл бұрын
Don't get me wrong. I know how convoluted and rapidly evolving Rust and C++ are, but it doesn't have to be one way or the other. The GO team took the concept of api stability too seriously which lead to the language becoming stagnant. Just look at how long it took for them to support generics. How were Docker and K8s developed without this simple feature is beyond me. And that's just one aspect of the language. The others are the useless and obnoxious code formatting rules and the terrible module system. They could've done something about those things but nothing. God, I hate this language so much.
@TheNewton
@TheNewton Жыл бұрын
Readability is important to teams, users and the future self. It's hilariously sad how devs on the slope of the bell curve tend to be oblivious to Literate Programming being smart and want dumb inscrutability is as the "smart" thing.
@dipanjanghosal1662
@dipanjanghosal1662 11 ай бұрын
@@parlor3115 man the module system truly is the worst lol
@TehKarmalizer
@TehKarmalizer 11 ай бұрын
@@parlor3115 C++ may be rapidly evolving, but it's a lot like vomiting into a bucket that hasn't been emptied in a while. It's a big stew of unpleasantness. It's like the goal is to make every feature clunky and hard to use, but at least you can say it's there.
@muhwyndham
@muhwyndham 9 ай бұрын
@@parlor3115 Just look at how long it took for them to support generics. in almost every case when you think generics is the solution, it will be the worst solution. You basically throws type safety away from your type safe language to do some fancy pants things, hoping someone that will use it later making sure it has the right characteristic to be used in the generics that we create. I come from JVM languages (kotlin, java) which is a language that in love with generics, and I very much use it extensively. But I have program go for 2 years now and does not miss it at all.
@ClaudioBrogliato
@ClaudioBrogliato Жыл бұрын
"This language was offered in the simplest form to meet your inferior mental capabilities." sounded like this.
@ThePrimeTimeagen
@ThePrimeTimeagen Жыл бұрын
agreed
@rj7250a
@rj7250a Жыл бұрын
Yeah, the type of programmer that writes code as complicated as possible, to flex how "smart" they are, then call you dumb if you do not understand their code maze
@zhamed9587
@zhamed9587 Жыл бұрын
@@rj7250a No one is saying you have to write complex code. However, the language needs to support some complex constructs because reality is complex, and there is no getting away from a base level of complexity for many systems. By making the language anemic and dumb, the golang authors simply pushed the burden onto the programmer and the code, resulting in messy verbose spaghetti code bases that take so many lines to describe something that would have taken half or less code to model in a good language like Java or C#.
@anon-fz2bo
@anon-fz2bo Жыл бұрын
​@@rj7250a fr and let's be honest the guy who wrote the article probably sucks too & that's why he's writing articles and not actually coding something.
@anon-fz2bo
@anon-fz2bo Жыл бұрын
​​@@mythbuster6126 I had a harder time making sense of the tinygrad llama example than kubernetes but that's just me. Although I didn't go through all of kubernetes only a few source files.
@saidultima
@saidultima Жыл бұрын
I'm a C programmer and ended up using Go for my webserver, I'm happy that it's simple to learn and use for this purpose and fast in production since it's a compiled language
@captainfordo1
@captainfordo1 Жыл бұрын
Hey this is literally me.
@vaisakhkm783
@vaisakhkm783 Жыл бұрын
c prorammer means, learning c in collage, or having a job the uses c and/or contributed extensively in big c opensource projects??
@anon-fz2bo
@anon-fz2bo Жыл бұрын
+ u can do this all in the std lib vs using a 3rd party header (which tbh I have no problems with)
@saidultima
@saidultima Жыл бұрын
@@vaisakhkm783 Professionally and open source as well
@saidultima
@saidultima Жыл бұрын
@@vaisakhkm783 my main open source project is about 20k lines of code in C99 I can't post about it or my comment will be deleted, but I also do contracting for companies I am an auto-didact
@Impatient_Ape
@Impatient_Ape Жыл бұрын
IMO, "clever" code in modern languages is often less efficient from a big-picture perspective. It's often slower than easier-to-read code, and it can add a financial cost in terms of the extra time required by non-original authors to understand and debug it. (EDIT: I used to have to decipher FORTRAN, which HAD to be "clever" because of system resource constraints.)
@ThePrimeTimeagen
@ThePrimeTimeagen Жыл бұрын
traits in rust is "clever" in some sense, but it makes things really nice its the one thing i wish all languages had, a trait system
@erickmoya1401
@erickmoya1401 Жыл бұрын
Most "clever" programmers ignore the cost you are mentioning. But some want that, if only they can understand the code, then they have to be in the company forever or make the company some bleeding of money through their code.
@hfspace
@hfspace Жыл бұрын
i think it is difficult to generalize here. i have seen some programmers who sincerely have a lack of trying to understand programs from a systems perspective. they try to make things easy in every regard, but i have seen how that complicates things in the long run. sometimes you just need some complex and clever code at the right place, to make life easier for everything else. prime has taught me well about the importance of performance and given me ideas how to achieve it, so i get that using loops instead of functional programming is better in some languages (hi @older javascript versions), but clever abstractions can be so powerful, that it would just make you a lot more unproductive if you did not use them and make life a lot harder (also regarding bugs). in such cases performance really has to be an important thing, if i would consider giving up an elegant abstraction. so i personally prefer the language that allows such powerfull abstractions, because that allows me to solve problems better. but sure with great power comes great responsibility and i am more of a guy that sees that as a challenge. i feel like you constrain yourself too much, if you don't take powerfull abstractions into consideration just because it is difficult to understand when to use them correctly. and you will never be able to solve certain complex problems without them imo.
@JanVerny
@JanVerny Жыл бұрын
I would really challenge people who think they write "easy to read" code to start regularly showing their code to people who are not working on the same project or ideally not even with the same technology. I think you will find out that the biggest factor in quickly understanding code is familiarity with the project and the problems. This can't really be acquired through any other means than just reading the code. And usually the more code there is to read, the longer it takes to familiarize yourself with it. I think this is how the "DRY" concept started and how it grew to it's absurd conclusions. I definitely don't think you should abstract everything, but it really does help, when you don't have to go through 30 dialog components and check if each one really does the same thing.
@depafrom5277
@depafrom5277 Жыл бұрын
What is "clever code"? Are we saying that 100 lines of readable code is better than 10 lines of code that accomplishes the same and runs faster, and who is doing the "reading"?. I think if the 10-line-code followed conventions then its preferred, for me "clever code" is acceptable as long as there are good merits, and its not superficially clever when in fact the code is poorly architected and littered with magic. As for the video's comparison, lets stop the bias, that D code is by far more elegant than Go, and I'm sure it will be even more evident in a large application.
@ohLyln
@ohLyln Жыл бұрын
One thing about Go being so simple is that you can dig into the source code of any library (especially the standard lib) and understand what code is running under the hood super easily. I had to look under the hood of the Azure Blob Storage SDK in Go today and could see exactly why it didn't like a parameter I was giving it. I also dug into the std lib to see why a stream I was building was EOFing early etc. It's so powerful to read these libs made by way smarter people than I and understand exactly what is getting run on my computer, such a blessing.
@robfielding8566
@robfielding8566 11 ай бұрын
I'd say that it's more advanced to have a more primitive language, not dumbing things down. You need features designed in such a way that you could implement them out of more primitive functions. Using high-level features with no idea how it's implemented isn't "advanced".
@valethemajor
@valethemajor 9 ай бұрын
Precisely why I fell in love with Go. I've not been able to do this with any other language I've worked with. I've always dreaded trying to sniff through people's code and have banged my head against the desk in confusion many times. Didn't happen when I did this with GO....
@unicodefox
@unicodefox 6 ай бұрын
this is one of the things i like about writing javascript, if youre running an LSP you can just, cmd+click into a library
@ohLyln
@ohLyln 6 ай бұрын
@@unicodefox yeah except that it usually takes you to a definition file so you have to find it yourself and the actual code will be made up of crazy shorthand for everything. Go has only a single way to do things so once you learn it you can read all of it easily.
@kozas0
@kozas0 5 ай бұрын
I checked once a Go library. In a single file of about 2000 lines, it was declaring an empty object (or "structure", whatever) and then it was full of receiver methods for that empty object. How is that supposed to be easily readable? I only understood it was designed like that after I scanned the whole 2000 lines to actually see every function was a receiver method, whereas in pretty much every other language you declare a class and put the methods in (a class doesn't need to have any fields), and what I do in those cases is just follow the closing bracket and I would know all these 2000 lines are methods within that class cause they are within the brackets. But in Golang they are on the same level. They could literally be half of them just functions. Very bad design. Very hard to read.
@leetaeryeo5269
@leetaeryeo5269 Жыл бұрын
Just for those who aren’t familiar, D has a Uniform Function Call Syntax system. You can suffix call a function on an object and it rewrites it so that it calls the function and passes the object as the first argument. Eg. A.writeln is equivalent to writeln(A)
@fakt7814
@fakt7814 11 ай бұрын
I wish this feature was in more languages, it's awesome.
@ed_iz_ed
@ed_iz_ed 11 ай бұрын
​@@fakt7814 look up "koka language"
@some1and297
@some1and297 11 ай бұрын
Still feels pretty cursed, idk. Like trying to tell if someone is calling an attribute or a function on an object seems like hell.
@leetaeryeo5269
@leetaeryeo5269 11 ай бұрын
@@some1and297 I mean, in theory, an attribute is a noun and a function is a verb, right? Like, if you see A.readText, you expect that to be a function call because it has a verb in it. But A.textContent is likely to be an attribute because it’s all nouns. I don’t really see a problem with it.
@bultvidxxxix9973
@bultvidxxxix9973 10 ай бұрын
@@some1and297 It makes reading the code easier though. Take the example from the Video: [1, 2, 3, 4, 5].reduce!((a, b) => a + b).writeln You could write this as writeln(reduce!((a, b) => a + b)([1, 2, 3, 4, 5])) When reading this, you usually read from left to right. So you read "writeln", ok, we are printing something, what are we printing? "reduce", ok, looks like we are printing the result from condensing an array by adding the elements, what is that array? Oh, it's just the numbers from 1 to 5, ok. Most programmers are used to that, because that is how it is in most languages, but for the other way around you don't need to keep that much context in your head. You read it in the same order it is executed in. You take an array with the numbers from 1 to 5, condense it by adding them up, write the result. But as always, tools can be used badly. For example writeln can take multiple arguments to print multiple things. So one could write "hello ".writeln("world"); to print "hello world". Just because you can use a tool doesn't mean you should always use it.
@isodoubIet
@isodoubIet Жыл бұрын
The .writeln stuff is what he was describing as "alternate function call syntax", also known as uniform function call syntax in C++ lands (where people have been trying for years to put it into the language, without success). Essentially you get to call non-member functions with the same syntax as member functions, which lets you use post-fix notation so that the code reads in the order of execution: first I take this list, then I join, then write, where the usual order would have you read the same operations from the inside out.
@Afief
@Afief Жыл бұрын
As someone who had to deal with a large (500k+ loc) project written in Go, here's my perspective: Go is great, if you were going to write it in C you are going to feel right at home along with a few more conveniences. But there is a limit to the size/complexity that a project can grow to in Go before becoming a horrible mess. Of course every language has this limit, but it seems that Go's ceiling is much lower than other languages due to how it amplifies every single line from a modern language (e.g. Rust) to ~10 lines. It is very good for async programming though. So if all you do is reply to server request with relatively simple internal logic, then Go is perfect.
@zhamed9587
@zhamed9587 Жыл бұрын
This sort of mimics my experience working on one of the largest golang code bases on the planet. Sure you can use golang for smallish programs that you would have written in Python or Ruby, but you get types. But the anemic design of the language leaves much to be desired when you work on large programs. While the "uncolored" async approach they're using is better than the typical async/await approach, it's still half baked. The `go` keyword does not handle the return type of the function being run, so you have to resort to hacks like passing in a channel then selecting on it. The Java folks have the right idea with Project Loom (virtual threads). They integrate very nicely with Futures/CompletableFutures, so you don't have to use hacks to pass channels and wait on them. They are also building a structured concurrency API to nicely handle timeouts and cancellations, unlike the hacky golang way of having to pass context.Context to all async functions, thereby reverting to a colored approach.
@guillemgarcia3630
@guillemgarcia3630 Жыл бұрын
I mean, have you worked in a typescript 500k lines codebase? or a java 500k lines codebase? I haven't, just curious how it does compare.
@Afief
@Afief Жыл бұрын
@@guillemgarcia3630, unfortunately not, my Java and typescript experience is fairly limited. I have, however, worked on C++ projects that are an order of magnitude larger, but felt much more cohesive. Obviously this is anecdotal, but in C++ (and I would imagine other expressive languages) the ability to express your ideas is much more stratified, while on Go and C it feels like you must first translate those ideas to the most basic constructs. For example if I want to find an element in a container in C++ I can use std::find_if, and it'll work for any container. In Go you must write a loop, and if your container is anything other than a slice or map, prepare for pain. Of course find_if is only the most trivial example, but this applies to basically any algorithm. Another famous example is following and mapping one collection of items to another, in rust you simply do in.iter().filter(...).map(...).collect(), in go this one liner expands to about 5 lines, meaning every time you perform such an operation you need to parse the loop and understand what it does instead of the names of the operations literally spelling out what's going on. And of course seeing such things once or twice is simple, but when dealing with a huge code base and trying to follow the logic, this inefficiency of expression and communication ends up eating a significant amount of brain cycles.
@zhamed9587
@zhamed9587 Жыл бұрын
@@Afief Well said, this is one example of what I meant in my other comment where I said that a simplistic (naive) language (golang) pushes complexity onto the user instead of being able to express it cleanly and concisely.
@Afief
@Afief Жыл бұрын
@@zhamed9587 I fully agree. Not being able to express the things we want to express in the language means we copy pieces of logic all over the place that should have been encapsulated and standardized. Map, filter, reduce...etc are just the most basic and obvious candidates.
@sqwert654
@sqwert654 Жыл бұрын
I'm an extreme coder, I code bare arsed.
@pastenml
@pastenml Жыл бұрын
unsafe { }
@lennyedwards62
@lennyedwards62 Ай бұрын
Prove it
@Magicwillnz
@Magicwillnz Жыл бұрын
I've never used Go (I'm a beginner), but I have used Lua, another simple language. I love that I can have Lua's complete syntax memorized after a few days of work, I like that there are 0 surprises and everything works exactly how you'd expect. If I want to do something clever, I can use metatables. It was cool implementing my own type system and it helped me understand how OOP works.
@13zebras
@13zebras Жыл бұрын
I was literally talking to a colleague today about how DRY is too confining in many cases. I'd rather repeat a function than create weird logical statements to have the function do multiple things.
@ThePrimeTimeagen
@ThePrimeTimeagen Жыл бұрын
This
@SimonBuchanNz
@SimonBuchanNz Жыл бұрын
Rule of thumb: if you can remove an if statement, you're not repeating yourself.
@jacerivera7907
@jacerivera7907 11 ай бұрын
@@SimonBuchanNz Im going to be citing this comment!
@2k10clarky
@2k10clarky 6 ай бұрын
If you have multiple signatures for the same method its probably worth a refactor... nowhere near as bad as multiple inheritance but yeah not ideal and I see juniors going ape with DRY all the time
@filiformis
@filiformis Жыл бұрын
"This'll be a Rust article" AND THEN D LANG, FROM THE TOP ROPE
@animeshthakur5693
@animeshthakur5693 Жыл бұрын
6:36 Zignificantly better
@omarkhattab59
@omarkhattab59 Жыл бұрын
You are amazing. I love to watch you before sleep, in transport, while eating, and literally all the time. Thanks for providing this amazing new type of content
@ThePrimeTimeagen
@ThePrimeTimeagen 10 ай бұрын
thank you my man
@soggy_dev
@soggy_dev Жыл бұрын
If I remember right, D has UFCS which means you can do things like expression.writeln and expression gets passed to the writeln function as the first argument. I've always thought that was kind of interesting, but I didn't really think about how non-obvious it is what's happening here
@stilldreamy5181
@stilldreamy5181 7 ай бұрын
I would have used Go for my new project, because of the simplicity and fast compile and run test cycles, if it had support for extension methods. So I ended up going with Dart instead. Dart is also simple like Go, but not quite as simple, it has some of the things Go is missing without getting too crazy. It also can compile to and run on many different platforms, and has a fast compile and run test cycle like go. Dart has turned into, basically, a modern, better designed Java/JVM that can also compile to JavaScript. With Dart, the compiled executables have a small Dart VM inside them, so it doesn't put the burden of runtime environment/version on the user like the JVM does.
@evgen5647
@evgen5647 8 ай бұрын
Reading articles behind paywall on KZbin is the new level of the Internet !
@salvatoreshiggerino6810
@salvatoreshiggerino6810 10 ай бұрын
Good point on TypeScript, I love what you can do with the type system, but it’s more of a foot cannon than a foot gun. If you hit a weird edge case that the TypeScript devs didn’t think of you’ll blow off your whole lower body and have to start over.
@marcusrehn6915
@marcusrehn6915 Жыл бұрын
Just because you can handle something more challenging doesnt mean that you should. With the exception for Rust, of course 🦀
@ko-Daegu
@ko-Daegu Жыл бұрын
Why do I fee majority of rust lovers barely write any rust right ?
@NathanHedglin
@NathanHedglin Жыл бұрын
Go is like writing a paper on rockets using a 5 year olds vocabulary
@derschutz4737
@derschutz4737 Жыл бұрын
@@ko-Daegu Because the majority of people who watch prime know how to program the equivalent of someone who has taken 2 CS classes or less. But, Rust all the way... Which is fine of course, but it's funny seeing people have completely nonsense strong opinions. At least have nonsense weak opinions!
@NoX-512
@NoX-512 Жыл бұрын
@@derschutz4737When I first heard about Rust memory safety features, I thought, I gotta learn this language. Then I looked at some production Rust code and thought, nah, I’m good. Zig looks promising as a replacement for C/C++.
@notoriouslycuriouswombat
@notoriouslycuriouswombat Жыл бұрын
@@ko-Daegu yep, rust has some kickass confusion engines with multiple ligma algorithms
@lucas404x
@lucas404x 11 ай бұрын
This channel is probably one of the best things that I discovered at this year. Thank you Prime
@NoX-512
@NoX-512 Жыл бұрын
The meme, when I was young in the 80’s; new programmers write simple code (ala GO style). As they get more experienced, their code become more and more complicated, until one day they reach god level and they go back to writing simple code. I don’t understand these programmers who feel everything should be done in one line of code. I like readable code. This is also the reason I put the opening { on a new line and have plenty of white space. It’s just easier to read than a wall of text.
@aazzrwadrf
@aazzrwadrf Жыл бұрын
always here for the go slander
@ThePrimeTimeagen
@ThePrimeTimeagen Жыл бұрын
its... an intense one
@SimGunther
@SimGunther Жыл бұрын
You shouldn't need to have a PhD to understand what pieces of code are doing. That's why I love Odin/Golang/Zig and how they spell things out without NEEDING an LSP.
@TheNewton
@TheNewton Жыл бұрын
But if others are NOT confusedly bamboozled by your inscrutable arcana then how will you make sure others know how your so much smarter than them? ❓🤔🤡 /s
@grawss
@grawss 11 ай бұрын
@@TheNewton Because it's actually rather simple. "Inscrutable arcana" is rather 'clever' but it's just a matter of understanding each others coding styles. I have a pretty good idea of your style since it's the usual way of doing things, which is fine, but I can pretty easily teach you how to read mine if you're a good learner.
@ThePandaGuitar
@ThePandaGuitar 11 ай бұрын
Wow nice selection. Odin, Golang, and Zig are really great languages.
@grigorigahan
@grigorigahan 10 ай бұрын
I'm consciously trying to migrate myself from being primarily a C++/Python programmer (the former being my job) to a Rust/Go programmer and honestly the contrast is so stark. My seeming inability to figure out package management in Go aside, once I get going, its really really easy to write code I'm happy with in Go, that I know behaves the way I expect. Rust on the other hand it feels like I'm falling from one rabbit hole into another just to get beyond the basics (I'm not knocking Rust in any way here -- but its a 'commitment' language like Java or C++). Take it with a grain of salt as I'm still a pretty junior dev -- but I find that anything that helps me in six months understand what the hell me today was thinking is a massive win. The programs I've had the least BS maintaining were the ones where I didn't try to be cute or clever, where I prioritized readability and simplicity of the design over everything else. At least for me, your always dumber looking at your code down the road. Sometimes it pays to throw future you a bone.
@mage3690
@mage3690 8 ай бұрын
If statements are always better than ternary operators, change my mind. And not just because ternary operators confused the absolute fuzz out of me for several years before I sat down and spent an hour learning how they work. Ternary operators invite new programmers like me to display their intelligence in the codebase by running the line length out into JavaScript levels of insanity when an if statement does _exactly the same thing._ Heck, _any_ feature that encourages developers to be smart should be discouraged, IMHO. As you mentioned at the end, it just turns into a clusterbomb of epic proportions just _waiting_ for something to go wrong. Have I dealt with code that was too smart? Yes. It was mine. I thought I'd display my intelligence in the codebase by only using GOTO for everything. When I had to use that program later, I rewrote it like a normal person. "It takes twice as much intelligence to debug code as it does to write the same code. Therefore, if you write to the limit of your intelligence, you are by definition not smart enough to debug your own code." -author unknown. I try to live by that statement.
@dtg5790
@dtg5790 Жыл бұрын
Regarding D and the `writeln` example you mentioned, I think that is D's "uniform function call" syntax, which allows you to express a normal functional call using method call -style syntax. It is a nice feature of the language. IIRC, the "bang" syntax indicates a template instance, in this case calling a templatized function. D is a really nice language but much of the mindshare went to Go and Rust -- the former likely because of the simpler programming model that the author is complaining about and the latter because D's standard library largely depends on garbage collection, which I think made it less attractive for D's original target audience. Andrei Alexandrescu, one of the big D contributors, had a really interesting post on Quora about this a while back, which has unfortunately been deleted.
@mccGoNZooo
@mccGoNZooo Жыл бұрын
What look like methods are indeed just function calls with the first argument being the thing that comes before in the chain, so you can chain function calls as if they were methods. It makes for incredibly nice and straight forward code overall. D is excellent, but this blog post did nothing to sell it properly. Go doesn't need to be D, though, and I don't get why people are so offended by its popularity. Most popular languages are shit, honestly, and Go is preferable to most of the other ones for a good chunk of work.
@vuongnh0607l
@vuongnh0607l Жыл бұрын
​@@mccGoNZooo that sounds like a combination of pipe operator and currying, with dots and braces
@isodoubIet
@isodoubIet Жыл бұрын
@@vuongnh0607l It pretty much is the pipe operator. C++20 ranges accomplish more or less the same thing using a literal | symbol (only it uses template magic instead of a language feature).
@johnheilman818
@johnheilman818 Жыл бұрын
I feel like this has given me insight into different types of problem solvers and I love that I learned that from you. I also don't like your take, but I appreciate we have different strengths and strategies. Take care 😀👋
@cheaterman49
@cheaterman49 8 ай бұрын
24:00 In Dijkstra's wise and eternal words: « The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. »
@zoravursingh5617
@zoravursingh5617 4 ай бұрын
"An idiot admires complexity. A genius admires simplicity." -- Terry A. Davis
@0xTas
@0xTas Жыл бұрын
Has Prime ever read Amos' blog article "I want off Mr. Golang's Wild Ride"? That article contains much more compelling reasons for potentially avoiding Go 😂
@00jknight
@00jknight Жыл бұрын
Been writing a Go backend for an indie game. It's great. I really like the json marshall/unmarshall system. Ive written a handful of powerful functions and systems to create a few abstractions that allow us to write new API endpoints quickly with very little boilerplate. Go is clean!
@aidanbrumsickle
@aidanbrumsickle 11 ай бұрын
I've done some Go and I enjoyed it, but I really missed the ability to control mutability at compile time.
@user-of1oq5rv2v
@user-of1oq5rv2v Жыл бұрын
Can you provide more information about problems with channels and which library solves them. Thanks!
@danielcoats713
@danielcoats713 Жыл бұрын
This is something I see all the time sentiment-wise with folks who are outside, and in this case inside, the tech world: the idea that Google hires the best and the brightest. For unrelated reasons this annoys me, because you don't really know one's capabilities or motivation to work on a project until you have them. You can vet that they know what they're talking about, but only so far. This mindset creates a world where we adopt the way business looks at us, and make it our point of view, rather than advocating for ourselves and our capabilities. Even if it's just advocating for where we're at and that we're getting better, it should be the default in the face of businesses that want to take you for what you're worth and then dump you when they feel like it's good for their bottom line.
@Andy-lo9sp
@Andy-lo9sp 11 ай бұрын
I mean you can use proxies that predict job performance; research is pretty clear that job performance can at least on an aggregate scale be predicted reasonably well. Google’s hiring bar is not what it was in 2007, but it’s still very high, especially for its top teams.
@rafae5902
@rafae5902 11 ай бұрын
Yeah, I don't doubt those big companies have geniuses working for them, but most people are just average. Also you will have many great devs who will never works for those companies because their hiring process sucks and they just don't want to have to put up with it.
@drewsarkisian9375
@drewsarkisian9375 5 ай бұрын
Love that confusion engine!! Esp. how it reaches around! Also agree about the over worship of DRY.
@esra_erimez
@esra_erimez Жыл бұрын
Go gives you a feature rich library like Java/C# without the problems of the JVM and the Microsoftness of C# and the performance of compiled languages.
@esra_erimez
@esra_erimez Жыл бұрын
@@fastasashark Poop... Agreed!!!
@fantasypvp
@fantasypvp 8 ай бұрын
a month or so, i did a couple of weeks work experience for a software development team at a company and spend most of my time there writing software in go. it was mostly stuff like http requests, json handling etc. I personally agree with the title of the video, coming from rust I honestly feel like go is catered more towards developers who want to just get stuff done easily and have easy to read code without any advanced patterns. to me it just feels quite limiting and simplified. having to write out an 'if err != nil' block after every function call got really repetitive and i found myself really wishing i had access to some of the patterns that rust has to make code more concise and less repetitive. i do like the idea of goroutines but again you can pretty much do the same thing in rust.
@cbbcbb6803
@cbbcbb6803 9 ай бұрын
Is Go a good choice to replace large Cobol business systems?
@fswerneck
@fswerneck 3 ай бұрын
15:00 "I really don't get this writeln at the end" Not sure if you heard about it after, but in D that's UFCS, or Universal Function Call Syntax. In a few words, it means that a function with signature e.g. fn(T) -> U can be written with dot notation after some T. So writeln("some string") and "some string".writeln are the same thing. And since writeln can take in any type...
@asdfqwerty14587
@asdfqwerty14587 Ай бұрын
I could almost accept it if it were .writeln() instead of just .writeln (so that the syntax is similar to a method rather than looking like it's an attribute).. but even then, I feel like it opens a bag of worms where you constantly have to worry about whether any functions or methods you create have the same name as a different function/method somewhere else which would make it very easy to misread what the code is doing. There's not enough of a clear upside to it to me to want to create that kind of ambiguity.
@anderdrache8504
@anderdrache8504 Жыл бұрын
What I hate about many languages (but go especially) is the inability to discern optional/fallible values and sum types in general. After using Rusts Option/Result and enums, I just notice how terrible writing other code is. Go makes this even worse by just returning (value, error) instead of Result. And implicit nullability is also terrible but go also makes some decisions like representing "missing" strings as empty strings. Struct fields in go are also zero-initialized by default, so forgetting to set a field yields a bunch of terrible runtime problems. I like simplicity and have a bunch of hope for zig for example because it is still kept simple without making so many terrible decisions.
@lydianlights
@lydianlights 10 ай бұрын
Totally agree. Go is a really nice language when it comes performance and ease of use, but man do I hate a lot of the design decisions.
@marcs9451
@marcs9451 9 ай бұрын
Zero initialization is amazing tho, it's a simple and cheap solution to a potentially dangerous problem
@anderdrache8504
@anderdrache8504 9 ай бұрын
@@marcs9451 I disagree, just force initialization of anything that doesn't have a default value
@BosonCollider
@BosonCollider Жыл бұрын
My main complaint about Go last time I tried it is that the GC is horrible for long-running processes because it does not defragment memory, so trying to run something that allocates memory frequently longer than a day will usually lead to it crashing. Which is the reason why go programmers ended up pushing docker and Kubernetes on us so that they could just automatically reboot their unstable programs. If go just had some equivalent of Rust's Send/Sync traits or some restriction on sharing mutable data in channels, they could refcount all data that is shared between goroutines like how Erlang/Elixir handle shared state because immutable structures cannot have reference cycles. And when you have that you can have the simplest stop the world defragmenting GC applied per goroutine, and still be real time because other processes can take over while one process is GCing. In my opinion the fact that the go runtime frequently crashes unless you are extremely paranoid about heap allocations is the one thing that makes it go from a potentially amazing language to a mid to low tier one that you use primarily to fill a gap if your coworkers don't know any other language that compiles to a native executable.
@kattankarl
@kattankarl Жыл бұрын
Huh! Interesting! I never heard about this specific GC issue on golang
@TheNewton
@TheNewton Жыл бұрын
"why go programmers ended up pushing docker and Kubernetes on us so that they could just automatically reboot their unstable programs." That is an interesting take, dockerGOKubernetes as a self-fulling end-to-end bug-as-a-feature solution feature-set.
@GK-we4co
@GK-we4co 11 ай бұрын
@@TheNewton Let it crash, as they used to say in Erlang for the last like 35 years :)
@jannemyllyla1223
@jannemyllyla1223 9 ай бұрын
I feel the issue often is not in language but in the idea being implemented. We just sat down and looked concurrency bug, started to analyze it, and realized a better solution was to simplify the whole mechanism first. It does not so much matter what language is chosen for implementation when the concepts are hard enough. And in the case of concurrency, anything that can be removed makes it much easier (or likely) to understand properly.
@SpikeTaunt
@SpikeTaunt Жыл бұрын
Honestly from my experience the only really "hard" language used in large escale is C++, people like to act like java is hard, but it isnt, is just over verbose and annoying. All the other mainstream languages out there are pretty easy
@oj0024
@oj0024 Жыл бұрын
The .writeln() in D, works because of Uniform Function Call Syntax, aka foo(a) is equivalent to a.foo().
@ThePrimeTimeagen
@ThePrimeTimeagen Жыл бұрын
yeah, i don't like this i dislike things i don't read left to right
@asdqwe4427
@asdqwe4427 Жыл бұрын
One of the reasons that I hate Ruby
@viniciusataidedealbuquerqu2837
@viniciusataidedealbuquerqu2837 Жыл бұрын
​@@ThePrimeTimeagen I liked your comment but pipe operators are awesome
@TankorSmash
@TankorSmash Жыл бұрын
@@ThePrimeTimeagen I think it's literally reading left to right. createPerson().addAddress().writeLn() vs writeLn(addAddress(createPerson)))
@Patrickdaawsome
@Patrickdaawsome Жыл бұрын
@@asdqwe4427 ruby is love
@AScribblingTurtle
@AScribblingTurtle Жыл бұрын
I know, what I'll do over my next 4 free days. Can we please give props to the Article author, for getting people interessted in GO? I have been searching for a new language to learn, but Rust sounds like a legal nightmare, waiting to happen and Zig feels a bit to alien for my taste right now. (even though, as someone who codes in c in his spare time, I love the drop in compiler replacement / crosscompiler part.) Also PocketBase (a kind of firebase lite backend server) was written in GO. So it can't all be bad.
@cherubin7th
@cherubin7th Жыл бұрын
The original Go pitch by Google was basically, they wanted to make a sweatshop to program boring web services in massive numbers. So Go was to be so simple you can hire kind of "unskilled labor". But yes I don't like super expressive code.
@brinckau
@brinckau 11 ай бұрын
Absolutely. You're unskilled? Apply for a job at Google.
@evgheniimaslennikov2917
@evgheniimaslennikov2917 Жыл бұрын
What's the library for golablng to avoid "4 hard cases for channels"?
@Architeq1
@Architeq1 11 ай бұрын
i'm a golang dev and have used many other languages before, C PHP Java JS C++ Python and more, but Golang is by far my favorite language. I've been writting real time concurrent multichanned subroutines websockets and Doing that with anything else than Golang would've been hell. I wonder how you can make a point by giving an I/O example that any language can easly handle if you don't go in depth of the strengths and weaknesses of the language/runtime ! Go is a MASTERPIECE ! Kindly, the french tourist
@GoddamnAxl
@GoddamnAxl 10 ай бұрын
As someone who daily drives Golang, the biggest problem of go is the lack of standardized well-known apis. I understand that the Go team wants it simple so they didn't put in any higher level feature that many languages have. list manipulations is a big one. I personally think these features are standardized in many languages for a reason. I've seen so many different and independent attempts in our codebase to accomplish what a list api would do either through the use of an external lib or haphazard adhoc solutions. The thing is, if you added your solution or a lib to the codebase, you must advocate it within the team so that others won't end up implement it again and again. it's also not guaranteed that your implementation would meet others' needs, resulting others adding their adhoc impl on top of your impl that will almost certainly be a non-congruent, hard to understand hot mess.
@anon8510
@anon8510 4 ай бұрын
15:00 any function in D can be called as method on it's first argument (which I'm not a fan of generally) so instead of writeln("foo") you could do "foo".writeln (omitting parens)
@adambickford8720
@adambickford8720 Жыл бұрын
I think it depends on the ROI of clever, which largely depends on how bright the dev is. If you understand "clever" it can save you tons of boilerplate and allow for very terse, clear code. But if your project is long lived and you have rotating crew of 'commodity' devs you really need to consider your LCD. The damage a 'good' dev leaves behind when a company typically hires clowns is immense. The design will be compromised out of ignorance and words like 'spaghetti' are all but certain.
@TheNewton
@TheNewton Жыл бұрын
Great take " What is the ROI of "clever" " Though incredibly difficult to measure and validate in a code editor.
@matheusjahnke8643
@matheusjahnke8643 8 ай бұрын
Was the damage done by the "good" dev... or the "clown" ones?
@kriscarr2442
@kriscarr2442 11 ай бұрын
You can now use the keyword "any" instead of "interface{}" which cleans it up a lot if you do need to use it (maybe temporarily while throwing the initial bits together).
@kriscarr2442
@kriscarr2442 10 ай бұрын
@@codingsafari true, I'd just use it for temporary things you haven't defined yet though I'd just make a named empty interface in that case as a placeholder. I don't think you should use either interface{} or any in production (outside generics) unless you need it. I just brought up "any" as an option as it seemed his biggest issue with it was having to read and write interface{}
@Turalcar
@Turalcar 8 ай бұрын
2:51 Does it count if it didn't compile (I write in Rust btw). My hot take is that there's a common misconception that Go is supposed to replace C and C++. It's not. It's a replacement for Python.
@GmanGavin1
@GmanGavin1 Жыл бұрын
Been doing golang in my free time for the past few months. Learned a ton, I thought it was just a newer php language but absolutely loved the single exe compared to my starter language C#. But because I really really want to get into graphics programming I started learning C++ and OpenGL. I was not expecting to need a build system 😅 I thought compilers just did that 😅 pain.
@nickgennady
@nickgennady Жыл бұрын
Nice. I’m just started doing graphics with OpenGL ES and C as well. I’m trying to keep it simple with 2D rendering only for now.
@codegambit2507
@codegambit2507 Жыл бұрын
@@nickgennady Bro I wanted to comment C too. I'm just getting started on graphics programming, I learned a little bit of c++ but it's not for me. Too much oop baggage. Advanced pointer usage is hard enough, I'm not about to add oop to it.
@voidwalker7774
@voidwalker7774 Жыл бұрын
Dude, that is the reason i switched to Rust. Because i did not want to develop three diffirent build chains for my game xD
@nickgennady
@nickgennady Жыл бұрын
@@codegambit2507 Yha OOP sucks. I was told it was everything in college. I spent years trying to write OOP and not be spaghetti code. In the end I had no luck. I found out about DOTS in Unity and I loved it. Now I do procedural code with data orientated design. Good call. OpenGL is hard enough and adding OOP would be nightmare
@anon-fz2bo
@anon-fz2bo Жыл бұрын
​@@voidwalker7774 yeah same
@kalekold
@kalekold Ай бұрын
The article discussed here is a rip-off of the original article entitled: "Why Go’s design is a disservice to intelligent programmers" in which the original author has added an edit to say he was wrong!!!
@catcatcatcatcatcatcatcatcatca
@catcatcatcatcatcatcatcatcatca Жыл бұрын
Ultimately there is no language where developers are not expected to be smart. The writer of this article just implies not repeating yourself and making abstractions for the ease of development is The Only Way to be smart. And while that can be very smart, there are also other avenues one can be smart in. For example provable safety, or good performance. Go is optimised for that kind of smartness. That’s why the testing is build in, and why dependencies are frozen by default to protect against breaking changes. You can write go like every other language, and you can write most languages with the same mentality as go. But you probably have better time when choosing the language that is designed around your needs. To get a perspective why simplification at the cost of verbosity could be desirable, consider a world where everything was written in lisp.
@kamikaz1k
@kamikaz1k Жыл бұрын
What’s the request dedupe algorithm you were talking about? Typically that’s handled with idempotency tokens, but you’re talking about some clever diffing stuff. Can you share some more deets (nuts) about that?
@carabouzouklis
@carabouzouklis 8 ай бұрын
As a Neovim/vscode/emacs enjoyer , I really enjoy your content regarding all this hot controversial topics.
@GiovanniCKC
@GiovanniCKC Жыл бұрын
I mean, both of them have the type very explicitly embedded in the assignment statement. I personally don't use auto a lot, but if I had some sort of statement like idk, maybe truncating a double in C++ to a long with a quick cast, it makes perfect sense to me. Who needs the type written out twice? ```c++ double x = 17.5; auto y = long(x); ``` it's incredibly clear to me that y is of type long. Obviously a very contrived example, but ya know.....
@neoyagami
@neoyagami Ай бұрын
I remember writing a critical piece of software in C, run into some undefined behavior and was so pissed that rewrote the whole thing in golang in 2 days. Rest client, concurrency. Log/csv parsing, db persistency. And almost the same speed. Now I only write C when needed (voip pjsua things etc)
@mskiptr
@mskiptr Жыл бұрын
Clever code (or even horrible, hacky code) is fine if it's fully contained behind a clean interface. But few languages guarantee internal horribleness cannot leak out
@taragnor
@taragnor Жыл бұрын
Having no real experience with Go, the interface{} thing was about the only part that made some kind of point, since that does look a bit cringy. Not sure if that's part of a usual coding style or an extreme example though. The try/catch example was just silly, because that gets way more complex once you start actually handling the errors in a meaningful way as opposed to just log & panic. Try/catch can get very confusing and wordy when you have to catch the different error types.
@ohwow2074
@ohwow2074 Жыл бұрын
An if statement inside a catch block can be used to handle each exception type differently. Sometimes exceptions just make the design more straightforward.
@ThePandaGuitar
@ThePandaGuitar 11 ай бұрын
I write Go, get shit done w/o headaches, startup doing great and making a lot of money, I go home early and play with the wife and kids. I can't wait for AI to write everything for me so I can just focus on the product. The author can keep his smart languages.
@rocamonde
@rocamonde 7 ай бұрын
"Goggle", lmao you killed me
@jelliott3604
@jelliott3604 2 ай бұрын
We're nit sure if the confusion engine is working at the moment which means we think its finished, but we're not sure
@jimiscott
@jimiscott Жыл бұрын
I may sound like a heretic here, but VB6 (whilst extra-ordinarily archaic and abandoned) falls into the category. It's limited feature set makes it extremely easy to read, and perfect for some use cases (we still have a 120k LoC library in VB6), but there are limits - even if it was still alive I would not want to do anything more with VB6. This may not be a perfect analogy, but the limited language constructs can mean getting a solution up and running quickly, and often more performant, but long term maintenance will begin to suffer.
@khalilzakariazemmoura8995
@khalilzakariazemmoura8995 3 ай бұрын
I was driving when listening to you! I had to stop because you killed me man! The "confusion engine" is so much! 😂😂😂
@Takyodor2
@Takyodor2 8 ай бұрын
Golang has a fatal flaw, or so I've heard, which is why I don't think I'll try it. It doesn't compile if you put the { on a new line after conditions/functions!
@jpratt8676
@jpratt8676 Жыл бұрын
The designers of Go fell for a "think of the children" argument
@sacredgeometry
@sacredgeometry 10 ай бұрын
I havent written a bug but thats because I havent shipped any code. Been doing lots of management, planning, handover, devops etc.
@codyclay88
@codyclay88 8 ай бұрын
The confusion engine 🤣🤣🤣
@healord51
@healord51 Жыл бұрын
Mate, I just got reallocated into a golang project (was on rust for like 3 years).
@ThePrimeTimeagen
@ThePrimeTimeagen Жыл бұрын
ok, that hurts
@thiagocarvalho9720
@thiagocarvalho9720 Жыл бұрын
@@ThePrimeTimeagen agreed
@kamalmohamed6611
@kamalmohamed6611 Жыл бұрын
But ,you have the opportunity to work on any of those cool languages 😭.
@meltygear5955
@meltygear5955 Жыл бұрын
@@kamalmohamed6611 Trueing hard, some of us are stuck in Python or worse, Java, and then there's this guy humblebragging how he worked with Rust AND now Golang?!?
@NathanHedglin
@NathanHedglin Жыл бұрын
I'm sorry
@johnh1353
@johnh1353 8 ай бұрын
With go its not just the syntax but the batteries that are included .... tcp/stream programming is extremely nice and performant ... golang hit a homerun with the network stack (`-tags netgo`) and static compilation
@conorx3
@conorx3 Жыл бұрын
Bro really said functionalhieroglyphiclambdastream.println is more readable than Go
@vyrwu
@vyrwu 8 ай бұрын
What are the 4 hard cases of go channels?
@emjizone
@emjizone 7 ай бұрын
3:57 LIke: "They all noobs but we want them to immediately compete with space agencies." • • • • • Yeah… Am I the only one having a weird mixed feeling about this "noble" goal ? 😂
@TheNewton
@TheNewton Жыл бұрын
6:40 Zig learning curve, well of course someone would be better with simple X after years of experience in complex A,B,C and Y's; especially with familiar syntax. Regardless of "simple" feature-set, How can we ever give another language a fair comparison free of our previous experience? I'm always on the look out for some tool/wizard to help compare feature-sets among for evaluation in figuring out actual learning curves or as the best tool for a project.
@GearsDatapacks
@GearsDatapacks 9 ай бұрын
The only thing I find annoying with go is the manual error checking and logging. Other than that, it's great
@TheSulross
@TheSulross Жыл бұрын
first language for getting a paycheck was C and was so for several years, and indeed Go had some C feels - but to truly use as a systems programming language the garbage collection and awkwardness for interfacing with arbitrary C ABIs is not ideal. So it seems to have sufficed for a certain category of middleware, i.e., various cloud infrastructure stuff. Am generally a fan of Go but don't consider it adequate to, say, write an operating system - as C was used to implement Unix.
@rashzh5502
@rashzh5502 Жыл бұрын
Considering the growing popularity of both Go and Rust in the web development community, which language do you think would be more beneficial for learning? Are any recommended learning resources specific to web development in either language? Thanks!
@airman122469
@airman122469 Жыл бұрын
That depends on if you want a job now, or in 5 years from now. Now: Go Later: probably Rust
@rusi6219
@rusi6219 Ай бұрын
If you're normal - Go. If you're LGBTQ+ - Rust.
@quarteratom
@quarteratom 6 ай бұрын
The don't-repeat-yourself-principle doesn't mean you must never repeat yourself. It means, if you're doing the exact same thing, with almost identical code, you combine it.
@jongeduard
@jongeduard 3 ай бұрын
I really just call it a guideline. Like SOLID principe and all those ideas. I just look at those as concepts to be aware of, but never as laws. Most important is always to think yourself and make your own great decisions. Engineering things is all about making trait offs. And this includes software programming.
@defnlife1683
@defnlife1683 Жыл бұрын
A simpler rust would be nice for us Smooth brains. Maybe Bjarne will do that 10% C++ thing he mentions. Oh wait, that’s C isn’t it?
@SimonBuchanNz
@SimonBuchanNz Жыл бұрын
No, it's Herb Sutter's cppfront/c++ syntax 2. Give it a Google, it looks pretty cool (he's one of the committee members, looking to get this in the spec, too)
@isodoubIet
@isodoubIet Жыл бұрын
"Oh wait, that’s C isn’t it?" Not even close. A huge proportion of C++'s problems come from backwards compatibility with C and its horrible 1970s design.
@defnlife1683
@defnlife1683 Жыл бұрын
@@isodoubIet i'll admit that there's some silliness in C. It becomes more apparent when you play with zig and Odin. C++'s problems also become apparent when you play with those "C killers". C++'s problems are from a lack of focus and buying into all the stupid trends through the ages. Simple Works. Imperative works, and adding bloat and making programs slower is a psyop by cloud companies to make more money. IDK what the solution is. I saw the C++ simplification proposals, they seem nice. they look kinda like Odin and Zig lmao.
@isodoubIet
@isodoubIet Жыл бұрын
​@@defnlife1683 For example, everyone now recognizes that implicit conversions are a major source of errors, and those originally come from C. Or the horrific initialization syntax with its many gotchas including the most vexing parse, etc, also from C. Array and function decay rules and reams of complexity and treating special cases exist only because C picked some wrong defaults that seemed like a good idea in the 1970s. Newer languages like Rust, Zig, or Odin have benefited from not being designed (and not being backwards-compatible with anything designed in) in the 1970s and get to avoid these. C++'s supposed lack of focus is largely overblown. You can find examples but the main problems you encounter are because the language is built on a base that's very complex and needs to handle many weird corner cases. The ISO evolution model and the committee's reluctance to fix mistakes is also a part. "Simple Works. Imperative works, and adding bloat and making programs slower is a psyop by cloud companies to make more money." I can buy that but C++'s main strength is its ability to provide zero or near-zero cost abstractions, an ability that's unmatched by any of its newfangled competitors (even carbon; jury's still out on Cpp2 which is just an embryo at this point).
@cianmoriarty7345
@cianmoriarty7345 11 ай бұрын
And it doesn't "handle errors", it checks for them and prints them out. You could literally do the same with try the open and read catch e print e.
@Xemptuous
@Xemptuous Жыл бұрын
My only interaction so far with Go was through "Writing an Interpreter in Go" where I wrote along, but in C++. I found Go to be horrendously ugly tbh, and not making any changes I felt were great
@DavidRenne
@DavidRenne Жыл бұрын
Whats the one library he mentions to handle the 4 cases of channels?
@sgwong513
@sgwong513 Жыл бұрын
programming in zig I feel a bit like programming in go due to both language syntax like c. but zig has comptime which go lack of(it can do generic, some macro and really powerful). I am still learning zig now, not sure there is anything in zig which similar to channel in go. I like zig that it is so simple to learn. I actually try learning rust first but give up due to too many feature offer from the language, I am probably the weak and not smart programmer. I also learn go before and become productive really fast. I learn zig because I like the zig zen and want to try a language without GC which need to self manage the memory.
@UGPepe
@UGPepe Жыл бұрын
At my last job I had to dig into a Golang codebase written by Python OOP-heads. I can tell you that no matter how many features you abstain from putting into a language so that idiots don't shoot themselves in the foot with them, a dumb programmer will figure out a way to make it 10x more complicated than it should be. Oh, there's no inheritance you say? Hold my beer! I'll make so many interfaces on top of interfaces that do almost nothing to put Escher to shame.
@transimpedance
@transimpedance 7 ай бұрын
If you build something idiot proof they’ll build a better idiot.
@sikor02
@sikor02 8 ай бұрын
Moving from C# to GO feels like a downgrade. I had to deal for about a year with GO code and i still cannot get used to it.
@guillaumepiolat8578
@guillaumepiolat8578 11 ай бұрын
This article misrepresent typical D code, I use D all day and never write code like the article displays. UFCS and the range-heavy style are just one of the style that D support, so in most cases you will want to be more verbose and easy to read.
@jamesjenkins9480
@jamesjenkins9480 Жыл бұрын
that quick "...because we all know we are dealing with arch users" got me lol
@carriagereturned3974
@carriagereturned3974 11 ай бұрын
Go's statically typed yet concise syntax, built-in concurrency and good performance make it a productive language for both experienced and inexperienced developers alike. Whether Go is "bad for smart people" ultimately comes down to individual preferences and priorities - some value Go's simplicity while others desire more expressive languages.
@emjizone
@emjizone 7 ай бұрын
10:00 People who add blank lines everywhere are those who suck at editing editor's prefs so much that they never find the `linespacing` variable. … or failed at the config of the ` ` vs management.
@Zynh0722
@Zynh0722 Жыл бұрын
I love your article videos, but I do wonder if it is possible for your layout to not obscure the rightmost quarter of the page. I struggle with auditory processing, so being able to read along makes these videos much more parsable for me. But I tend to find myself dodging your face and also chat. The former is not much of a problem, as you are usually reading the top half of your screen. but chat is almost always obscuring text I am attempting to read.
@ThePrimeTimeagen
@ThePrimeTimeagen Жыл бұрын
i'll give some thought to this :)
@gopher256
@gopher256 Жыл бұрын
Earned a sub. Great rebuttals to the dense take by the article's writer.
How GO Was Created - Less Is More | Prime Reacts
28:15
ThePrimeTime
Рет қаралды 125 М.
Devops is Terrible
24:36
ThePrimeTime
Рет қаралды 264 М.
Эта Мама Испортила Гендер-Пати 😂
00:40
Глеб Рандалайнен
Рет қаралды 8 МЛН
КИРПИЧ ОБ ГОЛОВУ #shorts
00:24
Паша Осадчий
Рет қаралды 6 МЛН
Trágico final :(
01:00
Juan De Dios Pantoja
Рет қаралды 16 МЛН
НЕОБЫЧНЫЙ ЛЕДЕНЕЦ
00:49
Sveta Sollar
Рет қаралды 6 МЛН
Have We Forgotten How To Program?? | Prime Reacts
22:53
ThePrimeTime
Рет қаралды 403 М.
Why You Should Learn Go
17:35
Joe Bulfer
Рет қаралды 12 М.
Python Sucks And I LOVE It | Prime Reacts
15:43
ThePrimeTime
Рет қаралды 235 М.
Dear Functional Bros | Prime Reacts
26:03
ThePrimeTime
Рет қаралды 172 М.
Why I DONT LIKE Open Source Software w/ Jonathan Blow | Prime Reacts
24:41
MAXIMUM CRINGE Programming Language Tier List | Prime Reacts
22:45
ThePrimeTime
Рет қаралды 461 М.
The Best Golang Book | Prime Reacts
16:00
ThePrimeTime
Рет қаралды 98 М.
Go 1.22 - Fixes For Loops | Prime News
7:41
ThePrimeTime
Рет қаралды 68 М.
Scams In Software Engineering
31:44
ThePrimeTime
Рет қаралды 446 М.
Which Phone Unlock Code Will You Choose? 🤔️
0:14
Game9bit
Рет қаралды 4,8 МЛН
The PA042 SAMSUNG S24 Ultra phone cage turns your phone into a pro camera!
0:24
phone charge game #viral #tranding #new #reels
0:18
YODHA GAMING RAAS
Рет қаралды 11 МЛН
Клавиатура vs геймпад vs руль
0:47
Balance
Рет қаралды 961 М.