Why Go Or Rust On New Projects

Поделиться
HTML-код
  • Опубликовано: 6 сен 2023
  • 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
    Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
    turso.tech/deeznuts
  • НаукаНаука

Комментарии • 570

  • @jackn
    @jackn 8 месяцев назад +335

    i fully agree with this take. i've spent 5 years writing go backends and 3 years writing rust backends. i was a huge proponent of rust for everything up til last year. even tho i am up to speed on how it works, it's so slow to write and a way heavier mental model than go.
    another thing you didn't mention is it takes literal seconds to "compile" and run a golang script on any target. rust projects can take multiple minutes to compile and more often than golang, cross compiling will be an issue

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  8 месяцев назад +107

      go is great for its spot and same with rust and i think you get that. its hard to get until you have done enough of each

    • @master0fnone
      @master0fnone 8 месяцев назад +2

      Why did it take you at least 2 years to figure this out.

    • @danielchettiar5670
      @danielchettiar5670 8 месяцев назад

      ​@@LemonKush-be9sgHoly damn get a life lmao, all over this video butthurt about Rust dislike.
      "Rust is my enTirE iDenTity!" 🤓

    • @jimboxx7
      @jimboxx7 8 месяцев назад +9

      @@master0fnone it takes a lot of time to write features in go or rust.. /s

    • @Tomyb15
      @Tomyb15 8 месяцев назад +12

      Write it in x86 assembly. It's going to take literal nanoseconds to "compile"

  • @wanking9040
    @wanking9040 8 месяцев назад +602

    Wow he really soured on Rust. 6 months ago, this wouldn't even be a contest for him.

    • @jrrrohm
      @jrrrohm 8 месяцев назад +34

      youtuber probs

    • @youtubeenjoyer1743
      @youtubeenjoyer1743 8 месяцев назад

      nobody wants yet another C++-like abomination with even more useless features. Just use C

    • @thesaintseiya
      @thesaintseiya 8 месяцев назад +188

      yea it's a bit weird. I'm not a frequent viewer but there were so many instances where he would genuinely sound obsessed with the language, and I get honeymoon periods are a thing, but it seems like his opinion and the "rewrite everything in Rust" energy started to change after the foundation thing.
      I do think he's being honest, but as someone really interested in learning Rust, quite largely thanks to Prime, idek if I should invest the time now

    • @n3y
      @n3y 8 месяцев назад +58

      @@thesaintseiya which foundation thing? there's like 50 foundation things lmao

    • @AdroSlice
      @AdroSlice 8 месяцев назад +131

      ​@@n3yWell it's one foundation, and their thing is sucking.

  • @bigfishoutofwater3135
    @bigfishoutofwater3135 8 месяцев назад +101

    I feel like prime wants a high level language that was built in Rust.

    • @NatoBoram
      @NatoBoram 8 месяцев назад +11

      Don't we all?

    • @katrinabryce
      @katrinabryce 8 месяцев назад +14

      The Polars library for Python? It can be seriously fast. On one project I had with 44m rows of data, it got the time to analyse it down from about 6 hours to about 2 minutes.

    • @BreytnerNascimento
      @BreytnerNascimento 8 месяцев назад +4

      Yeah, Rust is good to build more code as a product, not to build products.

    • @boccobadz
      @boccobadz 8 месяцев назад

      @@katrinabryce I don't know anything about Polars (maybe I'll give it a try after reading more about it) but back in the day we used PySpark to work with geospatial data (telco business, pandemic times) and were reading/transforming/modelling/outputting dataset (about 3 billion unique rows big) a day in less than 60 minutes before any optimizations. With some clever hadoop opt it was less than 40 minutes. The resulting dataset was 5k big. Developing and testing the whole pipeline (pulling data from all other place with hadoop->logging->pyspark->numpy->some graphs and clustering->logging->back to hadoop / flat files for reporting to government via ftp->visualization & reporting to higher-ups) took me about 2 weeks, I've written it in June 2020 and it's still running in production (on a cluster, and I wish concurrency in python was as easy as it's in go) without any hiccups to this day (even though I left that company over 2 years ago, good code for tracking people and their behavioural patterns (eg which fastfood do you like) still has its business value). Even though it's mostly python and not "the safest" rust.
      Most of the time people assume the language is slow and therefore bad when, more often than not it's not the case - they can't write good performance code / identify bottlenecks - either because of lack of knowledge of algos, or because of lack of understanding of what's going on under the hood (eg looping over whole pandas dataframe or apply lambda instead of pure vectorization/numba jit).
      Expand your horizons, try as many approaches as possible for semi-serious stuff (world doesn't need another todo app), pick the tool you're the most comfortable with and learn it well. Only then you will be truly blazingly fast 😂

    • @darshankumawat1764
      @darshankumawat1764 8 месяцев назад +4

      ​@@LemonKush-be9sgi think he meant something along the lines of
      "Rust is great for building tools with which we build stuff normal people use"
      (People who code in any language lower than javascript aren't normal 👍)

  • @JohnDoe-ef4fm
    @JohnDoe-ef4fm 8 месяцев назад +63

    You are spot on.
    Rust is great for one offs, something with clear requirements that do not change often, preferrably coded by 1 to 2 developers.
    Go is in the class of C# and Java, for business logic and rapid development.

    • @KManAbout
      @KManAbout 8 месяцев назад +13

      High performance, clear requirements. The amount of engineers don't matter

    • @ruanpingshan
      @ruanpingshan 8 месяцев назад +5

      I have a question as someone who used to do backend in C# 10 years ago: what exactly is the benefit of using Go over C# and Java? Does it really make that big a difference if you compile to native instead of using .NET's JIT? And is the backend ecosystem in Go mature enough to handle everything that you'd need for backend like HTTP, URL rewrite, load balancing, database connectivity etc. ?

    • @ejazahmed4609
      @ejazahmed4609 8 месяцев назад +10

      ​@@ruanpingshanC# will be better. In most cases the performance will be same similar or even better if you are ok with Microsoft.
      Microsoft's first party ecosystem will always be better than stringing packages together.

    • @RichM1967
      @RichM1967 8 месяцев назад +1

      Well Said. Even for those one offs, code tends to grow legs. Even if it has clear requirements that 'shouldn't change' (Yeah I've heard that before!) I've had one line bash scripts we thought would just be a one time, run and done instance turn into several thousand lines of Go code with options, subcommands. Not that I hate rust, but I tend to take the path of least resistance and right now for me it's writing it in Go.

    • @KManAbout
      @KManAbout 8 месяцев назад

      @@RichM1967 this is me right now haaha

  • @DeanRTaylor
    @DeanRTaylor 8 месяцев назад +28

    You convinced me to get into go and learn a compiled language with your comparison videos a year or few years back i felt like i was on the wrong boat after the hype built around rust.
    I decided to stick with Go anyway because there are way more jobs in my field and i just felt it fit with me more philosophically in that, it seems to be for people who want to do things the simplest way whereas rust felt like it wants to do everything the 'smartest' way.
    I'm glad to see you've been moving back and doing more in go as i definitely agree with your points here, I've been enjoying the go htmx videos and hope to see more.

    • @ErikOnABike
      @ErikOnABike 3 месяца назад

      Lol I’m in the same situation rn. I started with go then that was the gateway drug to rust. Now i am stuck between the two for building mainly web servers.
      Leaning towards going all into go.

  • @andythedishwasher1117
    @andythedishwasher1117 8 месяцев назад +48

    Tbh, there's just something about typing out "if err != nil" that makes me sip my coffee and be like "yeah. I'm a Go developer."

    • @ForeverZer0
      @ForeverZer0 8 месяцев назад +6

      I enjoy writing Go, but my biggest "wish-list" item, even more than enums or ternary operators, is that they would sprinkle in some syntatic sugar for error handling. A basic "try" keyword that would executing a command, and automatically return an error if the last argument was a non-nil error type and the function returned an error as its last return value. That alone would cover a ton of scenarios.

  • @andythedishwasher1117
    @andythedishwasher1117 8 месяцев назад +81

    Currently working on a framework connecting Go and Flutter. The Dart team (also Google-managed) nailed null safety by 2020. Makes me wonder why Go hasn't followed suit. It would make things even slicker.

    • @landerdumoulin8725
      @landerdumoulin8725 8 месяцев назад +14

      Been working on a Flutter project this year and maybe the best thing about it coming from Native Java for Android is the null-safety.
      I do wish they had sum and/or union types 😢

    • @sternenlp8258
      @sternenlp8258 8 месяцев назад +9

      I my company we are using go as backend and flutter as Frontend and it’s amazing 🎉

    • @tonimacarroni5208
      @tonimacarroni5208 8 месяцев назад

      @@landerdumoulin8725you can use options in java 9-11 I don’t remember well.
      So yeah now is null safety, but java developers don’t read update notes and companies are stuck in java 6-8 when currently we have java 17 maybe java 20

    • @WorstDeveloper
      @WorstDeveloper 8 месяцев назад

      Is your framework project open source? I would love to check it out.

    • @mattymerr701
      @mattymerr701 8 месяцев назад

      ​@@landerdumoulin8725 sum types are such an antipattern and break static type analysis

  • @HyperGadgets
    @HyperGadgets 8 месяцев назад +17

    I was looking into Go and Rust for an API overhaul we're doing at work. Go (with Fiber) seemed like a way better option than Rust (with tokio/actix etc).
    I've had a pleasant experience so far with Go and learning its quirks. I'm a little disappointed because i wanted to have an excuse to use Rust, but ultimately I think its the best decision... and its way better than our current PHP solution.

    • @connorlatham9578
      @connorlatham9578 8 месяцев назад +8

      If its at work, Im sure future maintainers will thank you that its written in Go.

  • @omerakgoz34
    @omerakgoz34 4 месяца назад +2

    Surprisingly this was by far the best Go vs Rust video I have ever watched and this is just a clip from a steam wow.

  • @ConnorMoody
    @ConnorMoody 8 месяцев назад +8

    Built my first project in rust - can confirm really good string support and ability to process data.
    The syntax however, and the immutability by default are a bit of a pain. Just building a simple cli tool to export data from an API, transform it, and then put it into an excel spreadsheet was way more work than it should have been

  • @7xr1e20ln8
    @7xr1e20ln8 8 месяцев назад +98

    Wow, prime threw rust under the bus. Modern times folks. Whats next neovim is worse than emacs?

    • @DryBones111
      @DryBones111 8 месяцев назад +24

      I'd hold his opinion higher than someone who's touched rust for 5 minutes and says its the greatest. Isn't it possible that he just got to know Rust well enough to see its weaknesses?

    • @apexashwin
      @apexashwin 8 месяцев назад

      @@LemonKush-be9sg piss off clown, you're a junkie not a programmer.

    • @tehseensajjad1003
      @tehseensajjad1003 8 месяцев назад +16

      ​@@LemonKush-be9sgYeah but do you work at Netflix and have a mustache? No, so ill value his opinion higher than your experience

    • @ForeverZer0
      @ForeverZer0 8 месяцев назад +16

      @@LemonKush-be9sg Damn, boy, you really salty about this throughout all these comment threads lol.

    • @danielchettiar5670
      @danielchettiar5670 8 месяцев назад +1

      ​@@LemonKush-be9sgDid you just make a new account to shill for Rust?

  • @danielmajer1648
    @danielmajer1648 8 месяцев назад +20

    I am staying on Go's side. I enjoy writing it at work, simple and easy and has the performance. I don't break my head while writing it.

  • @raiguard
    @raiguard 8 месяцев назад +66

    I spent eight months learning rust and trying to write my project with it. My project includes json parsing, filesystem interactions, decoding compressed binary data, and making web requests. It was a battle every step of the way.
    I finally gave up and tried go, and within two weeks I had the project up to feature parity with the Rust version. The difference in productivity for me is nuts.
    I like a lot about Rust, but Go is way easier to use. And I agree that Go desparately needs tagged unions.

    • @georgehelyar
      @georgehelyar 8 месяцев назад +41

      This isn't quite a fair comparison because the second time you write something it will always be much faster to write
      Also rust probably does have more of a learning curve but the real question is what are they like after you've used each of them for quite a while

    • @dealloc
      @dealloc 8 месяцев назад +10

      I did all of these things over like 5 months as I learned Rust and I found it to be such a relief. To be fair, I did also write a ton of parsers, encoders and decoders in other languages, so I had an idea. But I did struggle at first too, but I followed my own principles for learning a new language:
      - Clone if I need to. I am not learning lifetimes at this point. It is a battle of itself that I would somewhat overcome later.
      - Don't think about the Rustcean way to do things at first. Think about how I'd do it with current experience as well as knowledge I gathered from reading docs (e.g. examples). This is the way I learned about iterators, and made things a lot easier after learning just a tiny subset of the API.
      - Read the docs and learn the built-in APIs before learning libraries. I ended up writing much more code with std libraries than if I had used libraries, because those provide lower level APIs, but.I also learned their limits in respect to time spent.
      4) Switch the implementation with a library. I initially went with logos before I discovered nom for text parsing, and bytes before I discovered deku for bit-level binary decoding/encoding.
      5) Read some open source code of things in similar vein. Search for things that are similar to what I am trying to solve and see how others are doing it. I learned a ton of libraries and other APIs from this, too. Like for storing some static state I found lazy_static immensely useful, before moving over to once_cell.
      Also I recommend watching Crust of Rust by Jon Gjengset and his other videos. He's extremely knowledgable in Rust, working for AWS building the Rust infra there, and is a really good explainer of things.

    • @raiguard
      @raiguard 8 месяцев назад +8

      @@georgehelyar That's a fair point, the lessons learned the first time around undoubtedly skewed the results. However, I would estimate that 90% of the time taken in the rust version was rust-related, as the business logic of the app is fairly straightforward.

    • @danielchettiar5670
      @danielchettiar5670 8 месяцев назад +2

      And I think you didn't need any external packages on Go right?

    • @LucasOe
      @LucasOe 8 месяцев назад +3

      My first Rust program was a tool that required a lot of Json parsing and file system interaction and it honestly went great. Of course I still had to refactor a lot because I didn't have a good idea on how to structure my code, but that would have been the case in any new language for me. Serializing and Deserializing using Serde was really easy, only thing I was missing is internally/adjacently tagged enums.

  • @BridgeBum
    @BridgeBum 8 месяцев назад +3

    You mentioned using Rust for CLI, but what about GUI applications? Not clients, but an old fashioned running on your local box no network needed GUI app? I'd be interested in thoughts there.

  • @oidualx
    @oidualx 8 месяцев назад +52

    Wow, I generally agree with most of the thing you say, but in this case I don't fully get your points.
    Any single time I was forced in Rust to think harder than any other language about a concept, it was almost always the compiler saving me from a runtime error. And very much explicitly so, it points you exactly at the problem and how to think about it.
    Immutability by default (but at the same time the possibility to explicitly opt in to mutability), Option, Result, pattern matching, iterators, error handling, are concept that once ingrained in the everyday work are deeply missed when you return to a language that doesn't support them.
    About the web server part, I don't get it. I would understand if you had to design it from scratch, but there are phenomenal libraries in cargo that make creating a web server a child's play. At that point is it really that much more complicated than doing so in other languages?

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  8 месяцев назад +17

      ok, i can "see" your side, but at my current experience i just don't think its quite right

    • @Kane0123
      @Kane0123 8 месяцев назад +7

      Couldn’t help but immediately think of the “informed captain” thing at Netflix when I read the OP and Primes response.
      The decider would get to decide, owning the outcome but both would be on board since there was recognition that the other person isn’t an idiot even if they disagree.

    • @ericng8807
      @ericng8807 8 месяцев назад +2

      (Go vs Rust by Michael Mullin) ruclips.net/video/E-47VLwMY_U/видео.html
      This video might shed some light on Prime's statement "Most semi-experienced Rust devs will write less performant code than a Golang dev". Alot of your points are about Rusts safety features via the type system. But that safety, means that Rust will not make any assumptions on how certain pieces of data will be used. An example given in the video i linked was about strings. The naive way to iterate through a string in Rust is much less performant than the way golang handles strings by default. So unless you know how certain pieces of data are represented at a rlly low level, languages with a smart runtime may be faster than the Rust counterpart. Ofc if you're very into how computers work, down to details that most people don't explore, Rust will be faster

    • @nordgaren2358
      @nordgaren2358 8 месяцев назад +1

      I had to write C++ the other day, and I just started making everything const by default. 😆

    • @lucasldossantos
      @lucasldossantos 8 месяцев назад +7

      💯 Go is a big step backwards in terms of promoting good practices like immutability, writing non-defensive code with good error handling and null safety. It's indeed easy to write code in Go, but it's also easy to write BAD code in Go, because the simplicity of the language comes with a cost. I've seen code in Go that performs really well, but was buggy and unmaintainable because it had so much hidden complexity caused by data mutation and no proper error handling.

  • @billy818
    @billy818 8 месяцев назад +33

    Imo GO is better than rust because if I get a new team member, I need to upskill they can figure out GO where as if its rust, it will be my responsibility forever

  • @michaelhart8928
    @michaelhart8928 8 месяцев назад +22

    I think what you’re getting at is that Rust is amazing when the problem scope is well defined and understood. An LSP is a great example as are tools and definitely some systems programming stuff.
    Where Go shines is where the scope is not defined. When you’re starting up a new company, requirements change substantially. Same with web servers. It’s the language that has almost all of the performance, but the guarantee that you can work out the next batch of requirements without substantially changing your code base.
    Both languages can do either situation but given my experience I feel the same way.

  • @mohsinhijazee2008
    @mohsinhijazee2008 8 месяцев назад +1

    I rarely comment on RUclips videos but this is really really pragmatic take. I mean, I'm too old for that language choice so go is too good, too minimal to avoid over engineering.
    Rust when inputs and outputs can be chained together.
    Thanks for the clarity.

  • @abrahamanakagung4279
    @abrahamanakagung4279 8 месяцев назад +1

    Hi, what is the good go package for web server today? chin or just use go mux?

  • @LucasOe
    @LucasOe 8 месяцев назад +29

    Another 6 months you'll say Go is mid

  • @GaneshR-2023
    @GaneshR-2023 7 месяцев назад +1

    I'm not a professional programmer and lots of what he says goes over my head. I've never used rust.
    But I have dabbled with Excel VBA macros, awk etc for text file manipulation involving dictionaries / maps.
    When a requirement came up where executable made more sense, better logging and DB access was involved, I tried out go. With zero time spent on language basics or concepts, I could write utility programs that are in regular daily use for couple of years now with no issues. It works. They deal with loading text files dumped in a certain folder to database with some manipulation and error checking etc. Or format conversion with mapping based on maps.
    I wanted to install rust but realised in windows, it requires much bigger download. I still want to learn it as it seems to be replacing C in Linux. Now that's not easy so it sure has something going for it!

  • @bryceblankinship
    @bryceblankinship 8 месяцев назад +2

    "You need to hire that guy that slightly levitates when he walks" LMAO

  • @zenedge7599
    @zenedge7599 6 месяцев назад +2

    With Rust, ive come to the point where if i need to summon the dreaded 'a on a type, I just make it a raw pointer instead. Easy to work with, let RAII handle it. (if needed, most the time you use a pointer in place of reference you wouldnt need RAII anyway, just a light wrapper around unsafe {})

  • @azratosh
    @azratosh 8 месяцев назад +4

    FWIW, in Rust you can pack any chonkier struct into an Rc / Arc if you're *forced* to use a lot of clones. Incrementing the reference counter and *then* moving the Rc / Arc is often faster than cloning a large struct.

    • @disguysn
      @disguysn 8 месяцев назад +5

      I do have to say that my time with Rust has gotten a lot easier thanks to Arc. It makes dealing with async stuff much better.

    • @azratosh
      @azratosh 8 месяцев назад +1

      @@disguysn Arc is probably one of my favourite types because of that. People always bicker about its runtime overhead but it really is absolutely miniscule. The only thing that I kind of want is be able to pre-allocate heap memory for an Arc so I don't have to do lots of smaller little allocations all the time, but I might just write that myself.

    • @peculiar-coding-endeavours
      @peculiar-coding-endeavours 8 месяцев назад +1

      Exactly. Whenever I read or hear this "you just use a bunch of .clone()", I do feel people need to dig a bit deeper into Rust before making comparisons based on those arguments...

    • @rallokkcaz
      @rallokkcaz 8 месяцев назад

      Wait til you get to multithreading and async, this loses it's coolness.

    • @azratosh
      @azratosh 8 месяцев назад +4

      @@rallokkcaz Use async almost every day at work. Still waiting.

  • @saucefiendsupreme
    @saucefiendsupreme 8 месяцев назад +43

    Go would be the goated language if it had the enum system that Rust has

    • @NoxyYT
      @NoxyYT 8 месяцев назад +11

      Enums and error propagation via some special syntax. That would be great.

    • @nodidog
      @nodidog 8 месяцев назад +2

      Yeah iota is pretty nasty. I love Go generally though

    • @Knogxel
      @Knogxel 8 месяцев назад +1

      So True. And don't forget fixing nil maps (no one needs them)

  • @chrisochs7112
    @chrisochs7112 8 месяцев назад +7

    Performance is mostly about knowing using the right patterns and using those at the architecture level. The impact of doing that well or poorly dwarfs language differences (within a set of not horrible languages). Using rust to implement a poorly designed architecture is basically doing micro optimizations relative to say using Go but with a good design.

    • @OpletalRobin
      @OpletalRobin 6 месяцев назад

      @@LemonKush-be9sg not OP, but because 99.9999% of the use-cases DGAF

    • @hagaiak
      @hagaiak 4 месяца назад

      @@OpletalRobin And then we end up with so much bloated software on our PCs and phones. A big part of it is just shitty garbage-collected languages that generate 100 CPU opcodes for what can be done in 1.
      A big part of it is indeed the language. And why even choose an inferior language when Rust is better even without considering performance? If it compiles, it probably works. What other language can claim such a thing?
      What is more valuable than having correct code that a team of software engineers can confidently modify without fear of breaking things? It will directly lead to faster development times as well.

    • @OpletalRobin
      @OpletalRobin 4 месяца назад

      @@hagaiak what's more valuable?
      I don't know, like delivering value to customers? :)

    • @hagaiak
      @hagaiak 4 месяца назад

      @@OpletalRobin Rust equals faster development time and less bugs, which means more value to customers.

    • @OpletalRobin
      @OpletalRobin 4 месяца назад

      @@hagaiak wow, so rust is fastest to develop in and never breaks? Why do companies even choose to write code in anything else?

  • @errre8091
    @errre8091 8 месяцев назад +1

    where can i find all this qwirks go have? i want to learn more about them

  • @complexity5545
    @complexity5545 8 месяцев назад +18

    I learned that I need two programming languages. One for prototyping in like 10 minutes. The other language is for converting prototypes into mature programs that can be distributed to customers, employees, and contractors. Go is easily a top 5 prototyping language.
    Anyway, I suggest that all career programmers keep a list of features that you need from each language. One day you'll get skilled enough, where you can make your own compiler. That "features list" will come in handy. You'll also use that list to diagnose and plan which languages to use for certain problem.
    Good Video. Go is easily top 5 programming compilers and languages.

    • @twothreeoneoneseventwoonefour5
      @twothreeoneoneseventwoonefour5 6 месяцев назад

      "One day you will make your own compiler" is such a bs statement, like saying "One day you will build a particle accelerator" to a physicist engineer. I am pretty sure that probably that is not going to happen. At least not to the level of recommending it to everyone and keep a list of features lol. People can decide which language to use without any type of list if you didn't know, it won't really help.

    • @complexity5545
      @complexity5545 6 месяцев назад

      @@twothreeoneoneseventwoonefour5Making your own compiler used to be a 1 semester class in Computer Science Degree. It takes about a week to create the basics for a compiler. You're really just converting one language to another language. Its easy today in modern era. You never have to write machine code. JS was made in a weekend and now every idiot on the web is trying to use it for serious stuff. Now every front-end dev thinks they are a computer programmer; its a weird time to be alive.
      I'm guessing the Institutions stopped forcing programmers to do the compiler class. Its not hard at all especially if you know either Regular Expressions and/or Backus Normal Formal. I hope that helps someone that never knew of this stuff.
      I use language compilers every day. I use LLVM to export to another language. LLVM is probably the best right now.

    • @twothreeoneoneseventwoonefour5
      @twothreeoneoneseventwoonefour5 6 месяцев назад

      ​@@complexity5545 Nono, I am not talking about the possibility of creating it, but the practicality of it. Yeah, people can make a children-like drawing of a tree, or write a 3 page story. But that is not actual art and is not an actual novel. What purpose is there? Most people, even if they can, won't create their own compiler, because it will not be anything useful for any task. Maybe only 1 in 10k developers would go as far as to create a usable language alternative to hundreds of others. That's what I am talking about. It just isn't worth the time and most people know it. That's why people usually just stop at libraries for what they want.

    • @complexity5545
      @complexity5545 6 месяцев назад

      @@twothreeoneoneseventwoonefour5Yeah. At least you know what bracket you fall into.
      I know I'm in that 7-10% of programmers that uses their own compiler, DSL, database querying language, embedded system. There are actually job titles for that type of programmers called Compiler Engineers. All big time companies look for it. Your salary usually ranges between $150_000 and $270_000. They require us to make test and DSL. Usually its for testing and debugging the kinks out of compilers and proprietary languages that are used in some app. You make your own programming languages or DSL to accomplish it. Its literally a job search category. To get to that, you have to make your own programming language. I 've written several. They're basically LLVM specific syntax to reduce writing code. Nvidia, Lucas Film, Disney, SAS, IBM, Microsoft, AMD, AdaFruit, Yamaha, Boeing, Lockheed, Oracle, game industries, and the list goes on and on. Every main principal programming engineer in corporations has done it. Even Prime. Just to let certain people know. You'll use it in most high corporate principal engineering jobs. They really love contractors that can matriculate and gain trust to work on patented and intellectual property stuff. Its a career path for somebody that has a knack for it.

  • @kapros_p
    @kapros_p 8 месяцев назад +1

    Isn't Vlang suppose to be Go with the Option/Result types? I.e. no nil?

  • @AdroSlice
    @AdroSlice 8 месяцев назад +1

    There's an article on css-tricks "in defense of the ternary statement" that as much as I like ternary expressions I find clinically insane

  • @StefanoV827
    @StefanoV827 8 месяцев назад +1

    Can we have a comparison between Dart and Go as a backend? Since i like dart the most but i dont get why nobody use it also for backend since isolate management and sound null safety are so amazing.

  • @tehseensajjad1003
    @tehseensajjad1003 8 месяцев назад +4

    lmao at guy that said go syntax is bad, like what?
    the way i got into golang was when i saw one of my clients backend code and i fully understood what was happening.
    I've had never written a production backend or seen golang code before that.

  • @tekneinINC
    @tekneinINC 8 месяцев назад

    5:15 - This! All day, this!
    That one simple change would eliminate 90% of stupid mistakes that can crash your program. Even if you’re catching it well before you ever make a commit, it’d still just be a massive win to eliminate that issue(and the needed boiler plate by extension) entirely.

  • @zackaryleitzel9118
    @zackaryleitzel9118 8 месяцев назад +8

    I really thought this was a high effort AI generated meme at first. Times have changed. We're gophers now boys.

  • @Hessenar
    @Hessenar 8 месяцев назад

    hmm, i never using go(because my "working" lang is c#), but really rust like a web server is so hard for create? what about rocket? is it really much more complicated and slower(if you use site docs) than the go web framework?

    • @peculiar-coding-endeavours
      @peculiar-coding-endeavours 8 месяцев назад +2

      It's not. Rocket makes it pretty easy. Axum too. It's just trendy to say it's o so hard in Rust.

  • @alexroman8878
    @alexroman8878 8 месяцев назад +1

    Just when I was thinking of quietly switching to Go, such videos come out and add thousands of competitors to me🍵🗿

  • @geekstakulus
    @geekstakulus 8 месяцев назад

    I think you've just summarized my view of both languages. Great video!

  • @heyyyoo3454
    @heyyyoo3454 8 месяцев назад +1

    Bro i just wanted say you are my hero

  • @DanielAnechitoaie
    @DanielAnechitoaie 8 месяцев назад +13

    I know it seems like a weird reason, but I don't like Go because of its syntax. The whole lowercase vars are private, uppercase ones are public, the way the projects are structured... just feels so weird. I think Go with Rust syntax and option type and Cargo like tools would be the perfect language for me.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  8 месяцев назад +11

      go effectively has cargo like tools
      go get ...
      go run ..
      go test ..
      like most of that is straight forward, but i do want option / result types super much!

    • @maniacZesci
      @maniacZesci 8 месяцев назад

      @@ThePrimeTimeagen not for generating documentation at least last time i used it?

    • @ThienNguyen-bg1kx
      @ThienNguyen-bg1kx 7 месяцев назад

      @@maniacZesci have u tried go doc and pkgsite ?

  • @nman9172
    @nman9172 8 месяцев назад +6

    Golang also needs proper Enums.

  • @erickmoya1401
    @erickmoya1401 8 месяцев назад +16

    Go error management with errors.Is() and errors.Join() feels much better than it used to. Better than old go and Ts/Js

  • @c0zn1c
    @c0zn1c 6 месяцев назад

    Which would be better for creating audio processing apps? Like a DAW with multi threaded parallel support and WAV generating functions? Mobile apps and VSTs. DSPs basically. I also want it to do AD/DA conversions. Which has a better library and support for this? I'm a total noob so I'm leaning towards Go, because of the ease of entry, but Rust seems like it would have less latency with the less memory usage and safety. How does Golang compare in that regard? I need minimal audio processing latency with control over 32-bit float. Maybe even 64-bit for desktop.
    Tl;dr: which is better for high quality, low latency audio processing apps, and has VST3 library support?

  • @ChatGTA345
    @ChatGTA345 8 месяцев назад +2

    Go is also a good language to learn other parts of programming, like in those books on writing an interpreter or compiler in Go. Imagine doing the same in C++ or Rust! The language would hide the forest for the trees.

    • @peterradziewicz4685
      @peterradziewicz4685 8 месяцев назад +1

      I'm going thru the 'writing an interpreter in go' book now writing the stuff in both go and rust at the same time to learn both. Seems like a really bad idea to do both at once though hahah

    • @mattymerr701
      @mattymerr701 8 месяцев назад +1

      It's surprising how quickly that book |Go|es haha. Im 2 evenings in and halfway through the book

  • @shivamjhaa
    @shivamjhaa 8 месяцев назад

    He said ‘Rust us okay’ wow
    That is some great open nature there

  • @llIlllIIlIIlllIlllIl
    @llIlllIIlIIlllIlllIl 8 месяцев назад

    Is it okay to emulate sum types in Go with the visitor pattern or something like `({ a: A=>T, b: B=>T, c: C=>T})=>T` or is it an antipattern?

    • @llIlllIIlIIlllIlllIl
      @llIlllIIlIIlllIlllIl 8 месяцев назад

      Or maybe I should have asked: what's the standard way to code the concept of a sum type in Go?

  • @Felix-un7yp
    @Felix-un7yp 5 месяцев назад

    My biggest concern about Rust is a slow compilation time, although I am not sure if this is really an issue in practice. Anyways, for most servers I would agree to prefer Go. It just seems easier to get a working Go-server instead of having to setup things like Tokio and whatever else is needed to get a server in Rust.

  • @kirglow4639
    @kirglow4639 8 месяцев назад +4

    Prime, please make distinction between Rust Project and Rust Foundation. They're two different organizations. All drama we saw came from Rust Project, NOT the Rust Foundation. In fact, it seems that Rust Foundation has been a positive force in all of this

  • @magnum_dingus
    @magnum_dingus 8 месяцев назад +1

    I'd love to see Go add `or_else` and `or_return` like Odin has. `or_else` is roughly equivalent (in end result) to `.unwrap_or_else` and `or_return` is basically the `?` operator in Rust.

  • @tullochgorum6323
    @tullochgorum6323 8 месяцев назад

    Modern C# has excellent compiler level type collection. It can be done.

  • @marcusrehn6915
    @marcusrehn6915 8 месяцев назад +1

    Aren't a lot of rest API's just mapping data to slightly different data? Seems like it should be a perfect fit for Rust?
    What are some of the things that make it hard? Are auth and contexts causing you to do a lot of annoying lifetimes and moves?
    I have never built something large, so I'm curious.

    • @josevargas686
      @josevargas686 8 месяцев назад

      Yep. Elixir web frameworks treat every request as a pure function, basically. He talks a lot of talk, but doesn't show us the code. Afraid to be roasted perhaps?

    • @marcusrehn6915
      @marcusrehn6915 8 месяцев назад

      @@josevargas686 I don't know perhaps he has a usecase where he needs a lot of mutable state 🤷‍♂
      I have never had such a use case. That's the neat thing about building Rest or Graphql servers, no state, no head ache.

  • @aazzrwadrf
    @aazzrwadrf 8 месяцев назад

    would love to learn more about lifetimes in ocaml. always thought tying the lifetime to the type was weird.

  • @VivekYadav-ds8oz
    @VivekYadav-ds8oz 8 месяцев назад +76

    Rust is currently in a weird spot. The ecosystem is and community is shaking around a lot, generating uncertainty. Rust is simultaneously missing some required features, and also introducing feature creep in other places. There's too much boilerplate you gotta write sometimes, and no good ways to avoid it. It would actually be good if a lot of unstable features get stabilised, but don't know if that will ever happen.

    • @oscarljimenez5717
      @oscarljimenez5717 8 месяцев назад +3

      Is more a substitute of C++, is not build for building apps or servers

    • @hypnoz7871
      @hypnoz7871 8 месяцев назад +33

      Rust is aiming at replacing C++, so feature creep is basically unavoidable.

    • @nullpointer1755
      @nullpointer1755 8 месяцев назад +3

      Now wait for the next language implementing a mind blowing feature to replace Rust.

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz 8 месяцев назад +1

      @@hypnoz7871 Agreed to some extent. But if we'd wanted another C++ as a replacement for C++, we'd have just stick with C++. Rust isn't trying to make feature parity with C++, it's trying to cover the same domains as C++.
      Seriously though, I feel like a lot of things will improve if ppl just have a change in mentality towards Rust and a change in the technical management.

    • @thekwoka4707
      @thekwoka4707 8 месяцев назад +1

      Macros solve the boilerplate plenty.

  • @ForeverZer0
    @ForeverZer0 8 месяцев назад +9

    There is something to be said for a language designed so well that it funnels users to making the correct decisions simply by its syntax, and not requiring them to be a guru or understand the inner complexities of the compiler in order to game the system and get the best performance. Obviously Rust has much better potential in the "raw performance" category, but it all came at the cost of a clunky syntax and some very aggravating paradigms.
    I have been doing some Zig lately, and while it is not without its quarks, its approach feels to have struck a better balance between safety and usability. It has the guide rails, and forces the developer to be explicit when disregarding them, but not so obsessed about it that the language on a whole begins to suffer from it.

  • @iliatalebzade8751
    @iliatalebzade8751 8 месяцев назад +5

    Thank you Dr DisRespect

  • @jerrygreenest
    @jerrygreenest 2 месяца назад

    I love how they say «prewatched» when you aren't even watching a video, - just you, explaining some thoughts.

  • @nathanfallet
    @nathanfallet 2 месяца назад

    Personally for my new projects I use Kotlin. Lovely syntax, Multiplatform compatibility, null safety, ... I have everything I love from my past experience

  • @keyboard_g
    @keyboard_g 8 месяцев назад +1

    C# adding nullable reference type checking was a big win.

    • @juliendebache8330
      @juliendebache8330 8 месяцев назад

      Most of the time, when hearing people complaining about languages, I keep thinking "not a problem in C#, just use C# !" :D They've done incredible work on this language.

  • @arcanernz
    @arcanernz 8 месяцев назад +5

    Feels like the difficulty level of being very proficient at Rust is so high I think something else like zig may overtake especially if the Rust Foundation keeps being hostile to it's own community.

    • @arcanernz
      @arcanernz 8 месяцев назад

      @@LemonKush-be9sg C is pretty safe just as long as you don’t do anything wrong.

    • @elvor8512
      @elvor8512 8 месяцев назад

      @@LemonKush-be9sg not sure if you’ve ever used zig but it quite a bit safer by default. Zig solves C’s conflation of arrays/pointers, nullable pointers, etc. It is pretty easy to circumvent (if you need a null-terminated string for FFI or something) but by default, removes a lot of the little unsafeties with C.

    • @----__---
      @----__--- 8 месяцев назад +1

      ​@@arcanernzwow this is the first time I see someone saying this line unironically:
      "just dont do anything wrong and it will be ok". like.. like thats not the problem all the languages after c has been trying to solve?

    • @----__---
      @----__--- 8 месяцев назад +1

      ​@elvor8512 c++ does that too, still being a superset of c. that does not mean its memory safe.
      safe rust is %100 memory safe with 0 undefined behaviour, period. and all the possible violation of the language invariants are encapsulated in unsafe blocks which can be audited. those can leak into safe code too which is a known shortcoming of rust, but at least you know where to look.. this is of course unlike zig, c or c++

    • @arcanernz
      @arcanernz 8 месяцев назад

      @@----__--- it’s a joke man I know C/C++ got some foot bazookas

  • @ThundersLeague
    @ThundersLeague 8 месяцев назад +1

    @ThePrimeTime I would be super curious what you think about Swift.

  • @aus10d
    @aus10d 8 месяцев назад +5

    I thought this video was really good. I struggle with Go vs. Rust. I like Rust very much, but I agree it's a bit intimidating. I like the simplicity of Go, but miss some of the features of Rust. So I'm torn between the two. I thought this video was a good, truthful, realistic opinion about the choice between these 2 great languages.

  • @NapkinKing
    @NapkinKing 8 месяцев назад +15

    Honestly been having a good time with Rust after training myself for about 6 months. That initial struggle was real, though.
    Whatever language you pick, I never want to use Java again. Been using it professionally for about 5 years now and I need out of this space...
    I have worked on sooooo many overly complicated Spring Boot projects.
    Every feature MUST be behind a Controller, a Service interface and implementation, a Dao interface and implementation.... The apps all took 10 seconds to start due to component scanning....
    I don't have Go experience, but Rust + axum has already treated me better in every possible way. I'm skilled enough at this point that most borrow checker problems have become a non-issue.
    Even if the compilation is slower, the startup time is so much better that I'm still iterating faster... Good god...
    I'm sure I'd love Go if I gave it a shot, but I'm sure we can all agree that basically everything is nicer to use than Java at this point...

    • @apexashwin
      @apexashwin 8 месяцев назад

      you are just not skilled enough to use java bruh

    • @NapkinKing
      @NapkinKing 8 месяцев назад +3

      @@apexashwin yeah, I should just work at Walmart...

    • @apexashwin
      @apexashwin 8 месяцев назад

      @@NapkinKing not skilled enough

    • @danielchettiar5670
      @danielchettiar5670 8 месяцев назад +4

      ​@@apexashwin5 years in Java.. Doubt somebody deserves any more torture than that

    • @ForeverZer0
      @ForeverZer0 8 месяцев назад +3

      Hating Java is something that all developers can agree on.

  • @aameen951
    @aameen951 8 месяцев назад +1

    I'm using typescript in the backend and I find sharing code between the client and server valuable. I wish I can do the same in Go.

    • @ameer6168
      @ameer6168 8 месяцев назад

      Go can save you so much money on deployment

  • @ryanleemartin7758
    @ryanleemartin7758 8 месяцев назад

    just toss on a little 'a .. what happens... ooohhh boy. I feel this in my bones, in my soul.

  • @gonzalooviedo5435
    @gonzalooviedo5435 8 месяцев назад +2

    Elixir Phoenix live Is pure gold

  • @rallokkcaz
    @rallokkcaz 8 месяцев назад +1

    Glad Prime is on the same page as me, I started losing faith in writing Rust as a solo dev for async/complex projects. Honestly if I need concurrency I'm gonna go with Go or Erlang/Elixir maybe even OCaml (I was learning that before Prime and I've used Jane Street's Async for half a year now). If I have a systems level project or CLI too I'll still reach for Rust since Zig is still a bit of a mess.

    • @josevargas686
      @josevargas686 8 месяцев назад +1

      Pick Elixir every time, it beats absolutely everyone in terms of ecosystem, and it almost feels too easy to use once you learn it, and it is actually modern and does a lot of ground work for you, unlike Go or OCaml. By "a lot" I mean... a lot.

  • @hanzofuma
    @hanzofuma 8 месяцев назад +4

    I've been thinking about making a simple database for learning purposes. While I'm currently using go I thought ill try to learn Rust and why not develop the db in Rust as a learning project but after this video I guess Ill just do it with Go. Trying to learn a lot of concepts about databases plus the rust language may take me a year or so to do it.

    • @thekwoka4707
      @thekwoka4707 8 месяцев назад +6

      I would imagine a db is a place where rusts memory management would be very favorable over Gos

  • @jeromesimms
    @jeromesimms 8 месяцев назад +5

    Let's Go!!!

  • @lesto12321
    @lesto12321 8 месяцев назад +1

    you missed embedded baremetal, rust is becoming exquisite there

  • @MrMustachehead
    @MrMustachehead 8 месяцев назад +1

    Why is c# not in the conversation? In Australia from my experience most of the jobs are with c#

  • @jenreiss3107
    @jenreiss3107 8 месяцев назад +1

    imho the solution to the coloring problem is not to remove all color, but to give a type system to the color, and allow the developer to mix and match colors as they see fit

    • @mattymerr701
      @mattymerr701 8 месяцев назад

      The colour is typed already, it is still an issue

  • @bonsairobo
    @bonsairobo 8 месяцев назад +4

    I think Prime is exaggerating the point about lifetime propagation. Most of the time Rust can infer lifetimes without annotations. When you add an explicit one, there's only a specific set of cases where it's going to propagate everywhere, and that's usually avoidable if you design your APIs more carefully. Granted, it's possible that you work yourself into a corner without realizing it.

    • @scosminv
      @scosminv 8 месяцев назад

      If you want to see some nasty code with boss level Rust feature combos: generics with multiple generic parameters + multiple lifetimes + smart pointers...
      Have a look at Nom library source code!

    • @elvor8512
      @elvor8512 8 месяцев назад +2

      I kind of agree… but isn’t the issue of working yourself into a corner without realizing it exactly the issue that the rust ethos tries to solve? It fixes things like double frees and null pointers but seems like it introduces its own footguns along the way

    • @bonsairobo
      @bonsairobo 8 месяцев назад

      @@elvor8512 Yea it's a valid criticism. I'm just saying that you learn to avoid these issues with experience. It's not like it's an issue that plagues everyone, just people who haven't learned how to manage it yet. My advice to new Rust programmers is to try your hardest to avoid explicit lifetime annotations on functions. There are only a very specific set of circumstances where you need to do it and there is no good alternative. You'll learn what these are with experience.

  • @sonnenhafen5499
    @sonnenhafen5499 3 месяца назад

    I can just agree with go being a great tool.
    I write code for a small iot platform in go right now, which i do for the first time.
    Never used Go before, didn't even watch or read a tutorial or syntax intro, just their docs, and it just works right away!
    That's go for me in a nutshell: simple and does what you intend.
    The only things i dont like until now are the forced if else formatting and switching up the order of name and type and return types, which feels odd.

  • @Sel178
    @Sel178 8 месяцев назад

    Hey, @ThePrimeTimeagen would you ever consider using OCAML instead of Go for writing a web server?

  • @TRK--xk7bb
    @TRK--xk7bb 8 месяцев назад +47

    I love Rust... but they really dropped the ball on learnability/usability.

  • @Shri
    @Shri 8 месяцев назад +6

    3:55 So effing true. Coding Rust is like enjoying the breeze and sun in the beach, until you add lifetimes and boom you have a tsunami coming at you. Your entire codebase needs to change to accommodate that one lifetime 'a that you added in some obscure function, somewhere deep in the hierarchy, to squeeze out that extra few milliseconds. At that point I get frustrated and wish there was some way to not use lifetimes.

    • @wolfeygamedev1688
      @wolfeygamedev1688 8 месяцев назад +1

      I agree, lifetimes are cringe in rust imo. I understand how and why they exist, i just dont like them. 1 they look ugly and 2 I feel like it makes the job unnecessarily more difficult just for the sake of "performance".

    • @bolt7
      @bolt7 8 месяцев назад +3

      @@wolfeygamedev1688 If you don't care about optimizing performance why not used owned types?

    • @wolfeygamedev1688
      @wolfeygamedev1688 8 месяцев назад +2

      @@bolt7 I do just clone and move on, but using other libs forces me to use them, not the end of the world its just a real turn off for just trying to, for example add a custom serialized type for serde.

    • @scosminv
      @scosminv 8 месяцев назад +2

      Exactly, that's the Achile's heel of Rust: Lifetimes and exposing this complexity to the developer, not the Borrow Checker...

    • @bolt7
      @bolt7 8 месяцев назад +1

      @@scosminv Isn't lifetime management is necessary for the borrow checker to know how long references last? Or is there another way it could be implemented.

  • @mytechnotalent
    @mytechnotalent 8 месяцев назад +1

    Agree completely. I am also a huge fan of Go but I love how you really get into the pros and cons.

  • @williamseipp9691
    @williamseipp9691 8 месяцев назад +4

    Both are interesting, but Go seems to be more practical.

  • @anoname10
    @anoname10 8 месяцев назад +7

    I would like to have example of lifetimes breaking your program structure. I am new to rust (although read the book) and don't see when it could cause such issues. Would be really helpful video

    • @elvor8512
      @elvor8512 8 месяцев назад

      I would also love a video! I’ve been learning rust for a year or two (so I’m also pretty new lol) and I think he’s getting at the ‘infectiousness’ of lifetimes. Writing without lifetimes goes great for a while, but when you run into a situation where you need a manually typed lifetime, you often have to add generic lifetimes through many layers of parent structs, functions, etc.
      (or maybe I’m just bad at lifetimes! idk)

  • @mounis
    @mounis 8 месяцев назад +5

    Let’s Gooooooooo!

  • @user-kg2qn8se4h
    @user-kg2qn8se4h 8 месяцев назад

    I started learning Go to get rid of inheritence.

  • @k98killer
    @k98killer 8 месяцев назад +4

    I ended up making my own Optional type in Go to handle optional parameters, but the function signatures got too uncontrollably large, so I then bundled parameters into structs of Optionals. It was a bit tedious and strange, but it worked first try and took just a few minutes to figure out. Go could be improved, but it is pretty damn good already.

    • @c0zn1c
      @c0zn1c 6 месяцев назад

      I'm learning Go, and I feel like this is something important I need to investigate further down the line when I have better comprehension. (Total newbie besides a little mql4/mql5, minimal html/css..) someone please reply to me so I can reference this later! 🙏

    • @kfr3823
      @kfr3823 25 дней назад

      ​@@c0zn1cok

  • @jsonkody
    @jsonkody 8 месяцев назад +4

    After listening to this talk, I began to think that Zig might eventually surpass Rust as a system-level, low-level, real-time language if Rust so complicated to get right.
    And yeah RF sucks 😅

  • @omarruelas1897
    @omarruelas1897 8 месяцев назад +8

    Time to rewrite Go in Rust

  • @st4nn233
    @st4nn233 8 месяцев назад +6

    As a former go, now rust dev I get the point for learning curve. My biggest complaint with go is the ecosystem, I really don't like the way go modules are handled and they were always a huge pain to debug, cargo / crates in comparison felt like magic even if compile times are bad.

    • @josevargas686
      @josevargas686 8 месяцев назад

      I tried to "deeply" merge two structs in Go once, big PITA... I can't believe the language.

  • @cyrusol
    @cyrusol 8 месяцев назад +8

    If you have the right kind of glue code in Rust - pretty similar to Haskells monads glueing together pure functions - then you can get rid of most of the lifetimes in things that shouldn't have to know about them.

    • @DryBones111
      @DryBones111 8 месяцев назад +7

      Monads are always the answer.
      Unless the answer is Applicatives.
      Unless the answer is Monoids.
      Unless the answer is Semigroups.

    • @peter9477
      @peter9477 8 месяцев назад +3

      Trivial example of this to help us dummies understand it?

  • @catwhisperer911
    @catwhisperer911 7 месяцев назад

    Really looking forward to your HTMX plugin. I think HTMX is awesome and to have 1st class support in Neovim I expect will make for an amazing development environment.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  7 месяцев назад +1

      its technically done and can be cargo installed :)
      its just not on mason yet

    • @catwhisperer911
      @catwhisperer911 7 месяцев назад

      @@ThePrimeTimeagenThat's awesome and thank you :)

  • @fulconandroadcone9488
    @fulconandroadcone9488 8 месяцев назад +1

    I actually find TS approach to NULL quite nice, you define a type to be nullabel and if you try to use it in a context where you expect it not be null it will error out.

    • @ck-dl4to
      @ck-dl4to 8 месяцев назад

      variants

    • @hagaiak
      @hagaiak 4 месяца назад

      And now you can't do a simple `if (foo) { }` in TypeScript because your `number | null` type is truthy when it's either null or 0.
      True discriminant optionals are better, which is why TypeScript libraries exists to provide a real optional type.

    • @fulconandroadcone9488
      @fulconandroadcone9488 4 месяца назад

      @@hagaiak you should never treat number as a boolean unless you are doing C and don't have defined boolean type. You can use "123" as a number but 123 is a number "123" is a string. Drawback of TS is that it still allows implicit JS type casting which leads to a lot of confusion. If you want to check if something is null use x == null not if(x), empty string is seen as false by JS but in the end it is string not a boolean, use boolean for conditionals not numbers and string.

    • @hagaiak
      @hagaiak 4 месяца назад

      @@fulconandroadcone9488 I know, I was explaining a shortcoming of TypeScript.

  • @yougotnulled2983
    @yougotnulled2983 8 месяцев назад +16

    Go all the way

  • @joelinman6455
    @joelinman6455 8 месяцев назад

    I vote for a hybrid of Go & Rust… you could call it Ghost Lang 😎

  • @Lado93
    @Lado93 8 месяцев назад +1

    When prime tell me learn Go i ask how high...hurayy

  • @AR-jx1sy
    @AR-jx1sy 3 месяца назад

    I find Go very simple to get productive. The language is small and very intuitive. However, on a large scale system, there are some quirks to learn and deal with which is true for most languages. The first time I saw pooling slices, I was shocked.. haha.. but I now I understand why..

  • @Lado93
    @Lado93 8 месяцев назад

    spend year learning rust. i know to write some rust code, guess to start learning go .

  • @jonathanalonso6492
    @jonathanalonso6492 8 месяцев назад +1

    YES YES YES!
    FINALLY!

  • @KrzysztofDerecki
    @KrzysztofDerecki 8 месяцев назад

    I would like to hear your opinion about Nim

  • @user-xy5sm5nn3v
    @user-xy5sm5nn3v 8 месяцев назад

    You are way better than college professors in everything

  • @AK-vx4dy
    @AK-vx4dy 8 месяцев назад +7

    Rust is different mental model and we should accent it more.
    Sad to say but many people try to bend Rust and implement old ways in new enviroment.
    And kind of safety it provides in underrated, i realized this watching videos about Swift and C++ safety and/or succesor languages, presenting many kind of fu..k ups witch are impossible to write or impossible to compile in Rust also explaing how rust mental model enables healthy local reasoning and compiler optimizations
    Some can be achived in other languages but mostly partialy or more costly.

  • @Ali_k20
    @Ali_k20 8 месяцев назад +8

    But PHP has ===

  • @SharunKumar
    @SharunKumar 8 месяцев назад +33

    I want to hear his take on C# now with all the language changes

    • @shrin210
      @shrin210 8 месяцев назад +6

      Yup, i would go for C# after the Javascript saturates and Reactjs collapses.

    • @7xr1e20ln8
      @7xr1e20ln8 8 месяцев назад +20

      Unless c# has first class developer support on Linux. It's a hard pass for me. Would rather fight for Rust at work

    • @JoeHartzell
      @JoeHartzell 8 месяцев назад +25

      ​@7xr1e20ln8 is the dotnet CLI not enough "first class linux support" for you? My workflow for C# stays the same regardless of the platform. Not sure the last time you have used C# but .Net 6 forward feels very good cross platform-wise

    • @peanutcelery
      @peanutcelery 8 месяцев назад +7

      He already said he doesn’t like it lol
      He’s not a fan of strictly OOP languages

    • @metaltyphoon
      @metaltyphoon 8 месяцев назад +4

      He rather go to the grave than to assume C# is great. I watch his steam alot, so many different languages features that he claims makes a language good are in C# but M$ badddddddd. Like grow up 😂

  • @aldrickdev
    @aldrickdev 3 месяца назад

    So this is why prime dyed his hair, he’s been hurt by rust

  • @funkstication
    @funkstication 8 месяцев назад +2

    Agreed.