Prime Reacts: Building a Startup in Rust; I won't do it again

แชร์
ฝัง

ความคิดเห็น • 437

  • @ze2like
    @ze2like ปีที่แล้ว +441

    I tried and failed to build an entire startup in Rust... I created an array of 1000 Customer instances but no money went to my bank account.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  ปีที่แล้ว +97

      damn

    • @lucaslopes1260
      @lucaslopes1260 ปีที่แล้ว +80

      Maybe you forgot to implement the pay trait on the customer struct.

    • @RenderingUser
      @RenderingUser ปีที่แล้ว +37

      ​@@lucaslopes1260 I don't think it's possible
      The customer may have the broke trait

    • @brutetriple8637
      @brutetriple8637 ปีที่แล้ว +1

      did you forget to call `.collect()` to actually collect it from the iter?

    • @RenderingUser
      @RenderingUser ปีที่แล้ว +1

      @@brutetriple8637 sadly, the IRS called .collect() on iter first 😔

  • @SebastianSipos
    @SebastianSipos ปีที่แล้ว +34

    IMO the dude who wrote the article and his team were slowed down because they were trying to build a startup in rust while also learning the language.

    • @bug3937
      @bug3937 11 หลายเดือนก่อน +5

      Literally this.

    • @3DArea
      @3DArea 5 วันที่ผ่านมา

      Is it not how it is usually done?

    • @flarebear5346
      @flarebear5346 10 ชั่วโมงที่ผ่านมา

      Why would you build a company around something that you are not good at?

  • @rednafi
    @rednafi 9 หลายเดือนก่อน +81

    These language wars are so funny to see when you've worked in multiple successful startups that became successful writing their products in Django, Laravel, Node.

    • @tomaszn9201
      @tomaszn9201 5 หลายเดือนก่อน +12

      Actually it is completely bullshit. Over 50% of the most successful startups started with Python backends: google, youtube, dropbox, spotify, instagram, pinterest, uber, tinder, stripe, reddit. Rest started with PHP, java, erlang. Startups biggest disaster is hiring javascript full stack developer...

    • @rodreiser
      @rodreiser 5 หลายเดือนก่อน

      @@tomaszn9201 source: my head

    • @joshuaokunola6261
      @joshuaokunola6261 3 หลายเดือนก่อน +9

      ​@tomaszn9201 node just came into the picture in 2009. Most of these companies u mentioned are older than fullstack js itself.

    • @rodreiser
      @rodreiser 3 หลายเดือนก่อน

      @@joshuaokunola6261 yes, and they all have nodejs api's as well.

    • @tomaszn9201
      @tomaszn9201 3 หลายเดือนก่อน

      @@joshuaokunola6261 Give me the list of very successful companies started with nodejs.js . Nodejs is is red flag for VC the same like TDD or 100% coverage

  • @richardgeddes630
    @richardgeddes630 ปีที่แล้ว +47

    A mate who programs in C/C++ tried Javascript and was confounded by the plethora of values in a truth table. His final approach was to use === and its variants. However, there so much code out there that depends on == and its variants, that you're force to cope with it.

    • @Flameandfireclan
      @Flameandfireclan 10 หลายเดือนก่อน +6

      Js stands for: “Just Stop”

    • @jonaskoelker
      @jonaskoelker 8 หลายเดือนก่อน +3

      > confounded by the plethora of values in a truth table.
      I'm mainly confounded by the fact that == is not an equivalence relation. Here's stuff I expect from _every_ equality operator:
      (a) x == x for all x
      (b) if x == y then y == x
      (c) if x == y and y == z then x == z
      (This is the definition of an equivalence relation.) I remember that JS violates at least one of these but I can't remember which one(s) or how many.
      Other confounders: there is no simple 'add' operation, there is only "coerce my arguments and then add whatever the results were". See also Gary Bernhard's "Wat" talk.
      I could go on.

    • @sacha9593
      @sacha9593 5 หลายเดือนก่อน +2

      Is there any JS dev who still use == instead of === ?

    • @richardgeddes630
      @richardgeddes630 5 หลายเดือนก่อน +1

      @@sacha9593 There's plenty of legacy code that relies on == . That's the reason why == won't be deprecated any time soon.

    • @sacha9593
      @sacha9593 5 หลายเดือนก่อน

      @@richardgeddes630 I was talking about writing new code with ==, not about deprecating the feature.

  • @trebabcock
    @trebabcock ปีที่แล้ว +73

    It definitely took time to become efficient, but I absolutely love writing a separate backend and client. Go for backend, Vue for frontend. Keeps me sane.

    • @trebabcock
      @trebabcock 8 หลายเดือนก่อน +10

      @@darthvader1191 I mean, I don't choose what I use at work, but everyone can choose what they use for side projects.

    • @daphenomenalz4100
      @daphenomenalz4100 25 นาทีที่ผ่านมา

      I love rust, nd will never stop loving it. But man it takes time to do almost anything, so I started using go. It is also fun like rust, nd atleast I am able to do stuff with time constraints 😂

  • @HotakaPeter
    @HotakaPeter 7 หลายเดือนก่อน +3

    I write in Erlang. I have two uses for Rust, performance critical code, and low level interfacing. For proof of concept and quick prototyping Erlang is great.

  • @wadecodez
    @wadecodez ปีที่แล้ว +261

    Ah yes a planned rewrite on the client’s time that will go smoothly.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  ปีที่แล้ว +78

      classic rewrite

    • @abdelhaksaouli8802
      @abdelhaksaouli8802 11 หลายเดือนก่อน +4

      man why did not prototyped with python. if things work go on full performance mode and re-write it with rust ?

  • @SokimMan
    @SokimMan ปีที่แล้ว +50

    I guess its just because I have not gotten used to the Rust syntax yet but readability being one of the top pros is kinda surprising to me. Rust code does not immediately seem incredibly readable when first learning the language. Probably because the syntax uses a lot of punctuation marks, that you just need to learn.

    • @sk-sm9sh
      @sk-sm9sh ปีที่แล้ว +11

      "Just have to learn" this is the opposite of readability. If you swim long enough in poop river poop river doesn't stink anymore. Same with ugly code.

    • @BosonCollider
      @BosonCollider ปีที่แล้ว +1

      @@sk-sm9sh using :: instead of . in some places does not make something inherently less or more readable, it just means you are free to give . consistent semantics where it is always member access.
      Rust makes everything explicit, without requiring you to write a page of code. As far as readability goes, that is its main value propositions. It makes any potential footgun explicit.

    • @06kellyjac
      @06kellyjac ปีที่แล้ว +14

      I will take code that is easily readable for experienced devs over code easily readable to new to the lang devs any day.
      You only stay new to a lang so long

    • @sk-sm9sh
      @sk-sm9sh ปีที่แล้ว +3

      @@06kellyjac there is no such thing as "code easily readable by experienced dev". It only gets slightly easier due to experience however mental toll persists forever as your brain is decoding it whilst it could be doing something more useful. Asking junior devs opinion is great tool to use as experienced may become unaware of constant complexity that their brain need to solve. Also you must consider situation where experienced devs might join team whilst not being experienced with your language you will be losing a lot of essential time there - and training experienced devs ain't cheap.

    • @06kellyjac
      @06kellyjac ปีที่แล้ว +2

      @@sk-sm9sh everyone I've interacted with who've spent a just handful of hours with rust grow to love the syntax.
      It is objectively true that golang's if err != nil xyz blah blah. is easier for beginners to grasp than `?` because `!=`, `nil`, `return` are concepts someone is bound to have picked up previously, ? is used for many different things in many different languages. But there's a reason why goland goes and hides all that guff doing essentially what `?` does in the first place.

  • @StingSting844
    @StingSting844 ปีที่แล้ว +96

    Agree with the article fully. The saying "done is better than perfect" is always correct.
    Optimization is the enemy when you want to find a product market fit. Once you start making money, then you can figure out the slowest parts and rewrite as necessary. This doesn't apply for products which require hardened security from day one. For ex, auth, financial products

    • @sck3570
      @sck3570 ปีที่แล้ว +1

      👌

    • @irlshrek
      @irlshrek ปีที่แล้ว +4

      i dont remember where I heard it but I really like the "make it work, make it right, make it fast" order. are you saying that you cant really do that in rust?

    • @StingSting844
      @StingSting844 ปีที่แล้ว +9

      @@irlshrek definitely not saying that. But doing that in a language that has a steep learning curve is not a good idea. We can do it but capitalism is brutal and the product can go under very fast. I have worked in a failed startup and it was hard even to do it with easy to write languages. We rewrote large parts of the app according to feedback from the market/investors. Doing things like that in rust would have been unimaginable.

    • @akshay-kumar-007
      @akshay-kumar-007 ปีที่แล้ว +14

      @@irlshrek startups follow the ideology of fail fast and build fast. We as developers are obsessed with building the most beautiful piece of code but that takes time. There's a whole separate world of product management and sales (even though i hate those). Shipping things faster can really put you ahead of competition. Also, people leave companies and hiring/re-hiring someone for a language that's just used by 1% of developers doesn't make sense.
      Rust is a great language. But in my opinion it should only be used for systems where we can leverage whats unique about it. For majority of the projects Java/Go, React and React Native are a perfect stack.

    • @CuriousSpy
      @CuriousSpy ปีที่แล้ว +6

      I'am as a developer don't write code as much as i edit it. Unlike with js, with rust i'am always confident that my app works lol. Delete/Rewrite half of the App? easy! In js/ts? OMG WHY IS THIS NOT WORKING!!!! wasted few days just to find a bug :D

  • @rostislavzhuravsky3342
    @rostislavzhuravsky3342 ปีที่แล้ว +58

    One point that I think is really important as well is how many developers you can choose from when it comes to hiring and their cost. Usually Rust isn’t their first language, which means that a developer is likely to be a senior.

    • @jk-pc1iv
      @jk-pc1iv 15 วันที่ผ่านมา

      But if you hire for less seniority and js to be quick on your feet, do you re-hire once you decide it’s time to start building a solid foundation.. 🤔 everything will take even longer then

  • @mario7501
    @mario7501 ปีที่แล้ว +30

    Fully agree with you "get it done first" mentality. Optimising before you have anything useful not just makes you waste time on low value things, it also burns you out because you don't really have anything to show for a very long time.
    Writing rust feels like writing a decluttered version of modern c++ which doesn't carry decades of baggage. It's truly amazing and if you look at where modern c++ is going for example it feels like they are trying really hard to be more like rust.
    The only thing I miss when writing rust is more flexible operator overloading and function overloading in general. Generics are a bit lacking compared to c++ as well, but I guess that's where macros come in. Something I still have to take a closer look at

    • @robrick9361
      @robrick9361 9 หลายเดือนก่อน

      C++ is always trying to be more like everything..............which is the problem.
      Gotta get every damn feature into the language. But the problem is that every standard does have some stuff that I like.
      So I guess I'm part of the problem.

  • @shaunkeys7887
    @shaunkeys7887 ปีที่แล้ว +19

    I find that writing in Rust dramatically increases my productivity during prototyping when using “unclean” rust (clones, extra loops, Rc, etc). When you’re still figuring things out, the “fearless refactoring” principle is invaluable, because I don’t have to throw out the entire codebase or spend hours or even days trying to figure out why the connection between these two modules no longer works. Rust Analyzer tells me *everything* and walks me through my execution and information flow, leading me directly to the problem. Every bit of time you lose writing slightly better code is immediately gained the moment you have to change a lynchpin module in your prototype

    • @sk-sm9sh
      @sk-sm9sh ปีที่แล้ว

      Have you been living under a rock? Static languages had been doing this for more than 30 years. If until now you chose to go with Perl-like philosophy of pulling strings together and "hoping it works" it's kind of your own fault. And even in most popular languages that didn't used to have static checking they got it solve. For example in case of javascript - google closure compiler enabled (if you learned how to use it) writing statically checked and sound code about 15 years ago - long before even typescript arrived.

    • @zzzyyyxxx
      @zzzyyyxxx ปีที่แล้ว +1

      Exactly, just clone where required, get product market fit, then optimize. The difference with TS is while it may be fast at first, you literally can't optimize it later on (perhaps when your AWS credits run out after a year which is usually how long they give you them for) simply due to TS being garbage collected.

    • @cherubin7th
      @cherubin7th ปีที่แล้ว +8

      I stopped prototyping in python because I became slower in it than Rust. I learned Rust after years of using unhappily Python. I am just wired for Rust I guess.

    • @zzzyyyxxx
      @zzzyyyxxx ปีที่แล้ว +1

      @@cherubin7th Same, and the frustration for Python begins from the toolchain itself. I was trying to set up a new project for some AI stuff and it was like pulling teeth compared to a simple "cargo new"

  • @michaelz8260
    @michaelz8260 ปีที่แล้ว +109

    "Rust provided us with an incredibly solid foundation" Never again...

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  ปีที่แล้ว +23

      haha

    • @Originalimoc
      @Originalimoc ปีที่แล้ว +2

      What happened?

    • @Holobrine
      @Holobrine 4 หลายเดือนก่อน

      @@Originalimoc The Rust Foundation

    • @creativecraving
      @creativecraving 3 หลายเดือนก่อน

      😂 Well, a solid foundation is quite antithetical to a startup, so that's not surprising.

  • @usamesavas9848
    @usamesavas9848 ปีที่แล้ว +4

    Love your thoughts. Very informative too. Thanks for these videos.

  • @not_ever
    @not_ever ปีที่แล้ว +128

    This doesn’t make sense. I can’t wait for the, “I thought creating a start up in some other language and rewriting it in Rust would be a time saver but I was horribly mistaken” article. There so obviously are better reasons not to use Rust, I can’t help but believe this is Rustacean reverse psychology trolling.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  ปีที่แล้ว +46

      yes, the idea of writing a startup and then rewriting it in rust once you find your direction sounds like a real bad idea.
      it makes no sense (i should that out in this)

    • @not_ever
      @not_ever ปีที่แล้ว +6

      @@ThePrimeTimeagen yeah I heard you shout out. I agree with all your takes, except the Go thing, since thankfully I know nothing about Go. It was an interesting video about a terrible article. I just have a hard time believing the article was this awful by mistake.

    • @echoptic775
      @echoptic775 ปีที่แล้ว +6

      And people dont usually do that, but keep expanding using nodejs

    • @Cookiekeks
      @Cookiekeks ปีที่แล้ว +1

      What are the obvious reasons not to use rust?

    • @not_ever
      @not_ever ปีที่แล้ว

      @@Cookiekeks I said obviously better reasons than the ones given. Not obvious reasons not to use Rust at all.

  • @kenchilton
    @kenchilton ปีที่แล้ว +74

    I suspect everyone who tries these startup efforts (which in some ways are like running and tying your shoelaces at the same time) regrets decisions they made and thinks that the grass would have been greener if done another way. However, every way of doing it will be wrong in some way - that is (unfortunately) the nature of the beast and one reason why not everyone can do it.
    My experience is to lean toward processes that produce results that you can live with forever. For code, every line you invest work in can be one that will be in the code base when it ships. Yes, it is an investment in your future, and the cost now will reap rewards later. The more you can do to make the right investments, the better. Yes, the customer may require changes, but what does not change is closer to shippable, even if not perfect.
    If you want the product code in Rust, hire coders who know Rust and write it in Rust.
    And please, stop writing _anything_ in Javascript. 😂

    • @sacha9593
      @sacha9593 5 หลายเดือนก่อน +1

      "My experience is to lean toward processes that produce results that you can live with forever. For code, every line you invest work in can be one that will be in the code base when it ships. Yes, it is an investment in your future, and the cost now will reap rewards later. The more you can do to make the right investments, the better"
      For most startups this looks like a terrible advice.
      It depends of course of the kind of startup* you want to build and the kind of money you will be able to raise or invest at first but for the typical reasonably small app/website/software you will probably have at the beginning: few customers, little availability requirements, no need for performance, not enough money to hire the kind of developers you would like to have, potentially quite a lot of change to do all the time (potentially many full pivots when you will drop most of your company's code)...
      Yes if you are successful you may run into scalability/technical issues later because of this strategy, but by then you will have the money, people and experience to handle them.**
      By priority:
      - Choose a language that many people use in your domain or location
      - Choose a language you are confortable with (if you are the tech lead)
      - Choose a well established language (not a recent one)
      - Choose a still relevant language (a language that it still widely used for new projects)
      - Choose a language that allow fast iterations
      - Choose a language that is junior friendly (if you don't have the money to hire seniors)
      Don't be fancy if you don't really have too.
      *Of course if your startup launch satellites the problem is not exactly the same.
      **The scalability issues tends to be overblown: GitHub is still a Rails monolith, using a language notoriously slow and a framework that allows fast bootstrapping but is known to be difficult to scale, and it works fine. (Not that I would recommend Rails nowadays.)

    • @dadlord689
      @dadlord689 4 หลายเดือนก่อน

      Many old projects have died and have burned all the money they made in attempt to get rewritten. This was the reason some authors have wrote books about design patterns. So having money in your pocket today is not saying you will keep them. And so the project planning is indeed a big thing. The scalability and flexibility are essential. Unless you can just sell the product and forget it (like a mobile game or just a single player one). And so I would say that architecture is far more important than language. If you can't plug/unplug stuff without resetting the whole thing - what are you even complaining about?

  • @ericdonaldpitcher
    @ericdonaldpitcher ปีที่แล้ว +7

    Slow iterations is a relative thing I suppose. How quick are you in your editor and how experienced are you in the language you’re developing in. Varies from developer to developer. The design phase is also a point where you should be able to determine if your product idea is useful. Figma has such great prototyping tools that it almost can feel like the real app were you to demo your idea to friends or potential customers

  • @theplanebrain
    @theplanebrain ปีที่แล้ว

    I enjoyed your prototyping examples using “clone”. It’s a great point.

  • @dealloc
    @dealloc ปีที่แล้ว +14

    With regards to the two modes of Rust. One thing to consider here is idealistic vs. realistic. Ideally we would write things fast and make it nicer later. But in reality this is rarely the case, especially considering you're also building a startup.
    Let's say you wrote all your business logic with this mindset and you get to a point where things take up a lot of memory and you end up with slow hot paths. During profiling you recognize that the problem is that you're cloning things and passing them around. To avoid this, you now need to start pass references which means you're going to deal with lifetimes. Depending on the scale of your project, this can be a massive undertaking and not easily done in isolation. Anything that uses those APIs will also have to deal with lifetimes.
    That said, I love Rust and personally also take the approach to write quick and dirty code to get an idea, then later, once I've found the right approach, rewrite it with a nicer API and error handling. However these projects are _tiny_ compared to a lot of startups.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  ปีที่แล้ว +7

      i do this in small scopes though.
      i am totally on your team with this.
      I get the smaller chunk well thought out, then move into the more "beautiful / idiomatic" code. I would never do a project like this. I always do what i call shitty / not shitty coding :)

    • @Luxalpa
      @Luxalpa ปีที่แล้ว +2

      The advantage of using Rust here is obviously that you probably never actually optimize your code because it's fast enough from the get-go, while in garbage collected languages we need to optimize the hotpaths pretty much always as the GC makes things very slow. Also another thing I love about Rust is that you know while you're writing the code how to optimize it. Like, when you put `clone` everywhere you can immediately write the todos, and also when looking at rewrites later, you can easily find the places where you used `Rc`, `unwrap`, etc, because these things are all explicit in Rust.

    • @dealloc
      @dealloc ปีที่แล้ว

      ​@@Luxalpa That depends on what you're doing. Clone doesn't always mean that memory will be allocated-it may very well be optimized away; it depends on what happens at runtime, over time, as you scale.
      Rust doesn't automatically make all your worries about memory leaks and CPU loads dissapear. Some things just cannot be optimized away by the compiler, and others may require a different approach to prevent these types of issues which can cost $$$ if you're not careful.

  • @nandans2506
    @nandans2506 ปีที่แล้ว +8

    Its about libraries and community for me, typescript/ golang community, packages and libraries are so vast that there's very little custom things you need to build and get most things done fairly easily. This is very important for early stage startups with very limited resources.

    • @Cookiekeks
      @Cookiekeks ปีที่แล้ว +3

      Isn't that true for rust too? There are tons of crates out there

    • @Luxalpa
      @Luxalpa ปีที่แล้ว +5

      I found Rusts ecosystem way more mature than javascripts. The main thing is that I don't have to dive through weird docs or simply no docs at all and I don't have to deal with monkeypatching etc. The Rust crates just have all those methods and you just immediately know if they are fallible, if they can return None, what kind of types they expect as parameters, etc. With any new JS library I first need to learn how to actually use it by trying different things because even with Typescript typings, they are very often inaccurate and very hacky.

    • @TheMrKeksLp
      @TheMrKeksLp 10 หลายเดือนก่อน +1

      Rust's ecosystem might not be as big yet but the libraries are almost universally much higher quality than any other ecosystem I have seen

  • @orterves
    @orterves 7 หลายเดือนก่อน +1

    8:56 it's true, the type system is a real draw of Rust - sum-types are massively underrated and I wish more developers were willing to put in the effort to understand why.
    I think the biggest benefit from Rust is how it has combined multiple concepts into one great language (with a few missteps to be fair, like Async), it has all you need to build solid, reliable, maintainable systems for any purpose.

  • @dawngunz
    @dawngunz ปีที่แล้ว +4

    I would _love_ to see you give a solid explanation on how you perceive proper error handling. I'm still new-ish, but I dont really have an issue with error handling in go.

    • @bionic_batman
      @bionic_batman 4 หลายเดือนก่อน

      The core idea of Go to handle errors as values is great and it is a proper way to do error handling (unlike hidden control flows with try/catch and exceptions). Rust does it exactly the same way
      Some people just hate it because it is verbose
      Personally I find it a bit more readable than Rust "?" operator which often feels a bit like magic if you are new to the language although It essentially does the same as err != nil check in Go but implicit

  • @rammrras9683
    @rammrras9683 ปีที่แล้ว +4

    I read that article one week ago and I didn't understand why he wouldn't recommend or use it again from the beginning.
    It's just one basic downside and a lot of great features expecially for his startup that seems to be around safety logins or something

  • @doxologist
    @doxologist ปีที่แล้ว +3

    What I've started doing is creating my own boilerplate framework, where I define a skeleton I'd use for almost any project, built on top of existing packages e.g: REST (Actix), DB (sqlx), Errors (thiserror + anyhow), Integration Testing (bespoke framework), MQ (lapin). This helps me iterate really quickly since dev-processes can be easily documented, and we don't need to think much about the underlying technology, just write the business logic (endpoints, queries, etc).
    Once the startup fails we just move along with the same skeleton :) Quick.

    • @bug3937
      @bug3937 11 หลายเดือนก่อน +1

      Sounds good, would it be possible to see a repo of the basic skeleton starter?

    • @jk-pc1iv
      @jk-pc1iv 15 วันที่ผ่านมา

      Yeah share it 😊

  • @BennyDeeDev
    @BennyDeeDev ปีที่แล้ว +2

    I would love to use Go, but everytime I do, I just hate how much boilerplate code is needed to write some small task like adding a query to my Url. Then I just quietly go back to my TypeScript.

  • @mario7501
    @mario7501 ปีที่แล้ว +46

    His analysis isn't wrong. But if you build your system in python and want to scale it up, what path are most companies going to take? The answer is they will probably build systems around python to prevent having to rewrite the entire code Base, creating more and more technical debt.

    • @guycomments
      @guycomments ปีที่แล้ว +6

      The technical debt is there whether you rewrite the code or not

    • @JustinBarak
      @JustinBarak 11 หลายเดือนก่อน

      Who cares if you need to rewrite it in 5 years when you’ve scaled up?

    • @MrIlsundur
      @MrIlsundur 10 หลายเดือนก่อน +2

      If your solution to a scaling problem is changing the language of your code base, then you didn't have a scaling problem in the first place.

    • @vikramkrishnan6414
      @vikramkrishnan6414 9 หลายเดือนก่อน +2

      You first cache your reads, queue your writes, you split up the high volume stuff into its own service. When all of that stops working you rewrite in a new language

    • @user-oo1ew4pk9c
      @user-oo1ew4pk9c 7 หลายเดือนก่อน

      You would be suprised how big of system you can make with python.

  • @lhd7105
    @lhd7105 ปีที่แล้ว +1

    Hmmm has anyone written a guide/book that essentially lasso's together all the techniques that one can employ to rapidly prototype with Rust? And then in the advanced chapters show how to refactor the "dirty rust" code to something respectable. Maybe talk about guard rails or bookmarking code that are "dirty rust" so that you don't leave them accidentally behind.

  • @herkulessi
    @herkulessi ปีที่แล้ว

    One important point is, you can (relatively) safely throw something together without any real error handling and stuff like that, because Rust basically forces the crate devs to write good code. The only time I managed to have a library panic was nesting Tokio instances... Basically telling async code to block forever...

  • @Leto2ndAtreides
    @Leto2ndAtreides ปีที่แล้ว +5

    When you're doing a new startup, it's good to prioritize just making things work.
    If you take the AWS credits... Again, you just don't know yet if your startup is going to live.
    Most startups likely don't come anywhere near using up their $100K in credits... Because they fail before that.

  • @BlurryBit
    @BlurryBit ปีที่แล้ว +5

    IMO it should be a case per case thing to decide the tech. Not every startup (heck, not two startups even if they are selling the same thing) are the same. Money, team, management are different. Even the customers can be different for different businesses even if they are offering the same thing (depending on what audience they are targetting).
    Don't Deny or Accept a tech just because someone told you to. :)

  • @syzore2
    @syzore2 ปีที่แล้ว +3

    I think he meant *Above and Behind the scenes* , which would be like above and beyond but behind the scenes in such a way that you don't event notice it..

  • @bsmithril
    @bsmithril ปีที่แล้ว +1

    I come from a place where I have no idea even remotely what "line didn't live long enough" could be referring too. I can see it being a good example of the compiler learning curve.

  • @JeyPeyy
    @JeyPeyy ปีที่แล้ว +1

    I haven't done much Rust, but isn't match pretty much the same as any pattern matching in functional languages like Haskell or F#?

  • @sawood2010
    @sawood2010 ปีที่แล้ว +3

    I used dotnet for my server because I already had years of xp with it and wanted to get my ideas off the ground. Dotnet does come with a bit of overheard, I'm learning Rust and hoping to implement it in the future.

    • @uppu04
      @uppu04 ปีที่แล้ว +1

      Any good resource for learning rust that you recommend?

    • @sunitjoshi3573
      @sunitjoshi3573 5 หลายเดือนก่อน

      I’m in the same boat. I like C#, but Rust just seems fascinating.

  • @NickWindham
    @NickWindham ปีที่แล้ว +5

    I was about to comment, “Why not use Go as the happy medium?” Then you immediately launched into explaining exactly why. Thanks!

  • @michaellatta
    @michaellatta 3 หลายเดือนก่อน

    I agree you can code rust for early iterations using things like ARC rather than the super strict version. The challenge is identifying the risks and eliminating them quickly. Then rewrite/refactor as you progress toward MVP.

  • @arturfil
    @arturfil ปีที่แล้ว +13

    I know this channel is very pro Rust and I have tried Rust myself and I like it (dont' love it) BUT for rapid prototyping and also having a good dev experience and be able to train and hire I do find Go very easy to choose as a language. For me, in terms of syntax, has some similarities to typescript but obviously has a lot more features once you get to know the ins and outs and I would feel that it would be a good language to choose, to build a startup.

    • @pascualsu
      @pascualsu ปีที่แล้ว +2

      I totally agree. I really like rust but I doubt I could ever be as fast at prototyping something as I currently am in go

    • @peter9477
      @peter9477 10 หลายเดือนก่อน +1

      ​@@pascualsuFor me the jury's still out on that question. It feels like the only reason I'm not producing working prototypes in Rust as fast as I can in Python is my relative unfamiliarity with the right libs. Sure, I can write lines of code faster in Python, but then I need to test/fix/test/fix and deal with unexpected runtime failures because I was a bit too fast and sloppy. With Rust it goes a little slower up front but then just works. And when I need to refactor (mandatory when prototyping) with Rust it's trivial and with Python I'm back to test/fix/test/fix. So once I'm more comfortable with the right Rust crates I now expect to go faster with it than with Python even in the prototype stage.

  • @joshuarowe8410
    @joshuarowe8410 ปีที่แล้ว +13

    I'm testing out Elixir and Phoenix for my backend so I can iterate fast. So far I'm really liking it

    • @sandworm9528
      @sandworm9528 ปีที่แล้ว

      That's Erlang right

    • @lod2414
      @lod2414 ปีที่แล้ว

      @@sandworm9528 same runtime I believe

  • @ducksies
    @ducksies 11 หลายเดือนก่อน +1

    match is very common across post-ML functional programming languages

  • @__jan
    @__jan ปีที่แล้ว +203

    Seeing the progression of Prime's opinions on Rust as he learns the language more has been interesting.
    At first sceptical, just dabbling in it a bit, still under the belief that other languages are just more productive and the safety/performance are not good enough to offset the supposedly lower productivity. Then as you start using it a bit more for more involved projects, those belief systems kinda fall apart when you realise you're actually just as productive in Rust, but you also get all the other benefits. Suddenly it seems like Rust has no downsides... why isn't everyone using this thing?!?! And now you're a full-on Rust propaganda machine.
    It turns out that a well-thought out static type system (traits and enums with pattern matching) combined with best-in-class tooling (cargo, rustfmt, clippy, rust-analyzer) is such a massive productivity boost that even with the lower compile times and "type juggling" you still end up churning out blazingly fast code blazingly fast.
    Last step is realising that the language is actually kind of incomplete and there are still tons of rough edges. However, seeing the steady progress without compromising on the core values of the language means it's only going to get better, and the future is bright. :)

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  ปีที่แล้ว +70

      :) i like this answer

    • @roblesrt
      @roblesrt ปีที่แล้ว +3

      Prime's tries things in Rust, so you don't have to.. err so you get better insights in Rust. Thanks a lot Prime for sharing.

    • @SumoCumLoudly
      @SumoCumLoudly ปีที่แล้ว +6

      Rust analyser is not best in class, it's bloated and slow. Cargo is great, altho compile times are a joke.
      As someone who doesn't shoot myself in the feet, and who doesn't have any issues whatsoever with memory management, Rust doesn't really appeal to me. The only time I'd ever use Rust is if threre is a better library written in rust compared to the cpp version. This rarely happens.

    • @neildutoit5177
      @neildutoit5177 ปีที่แล้ว

      @@SumoCumLoudly what's your secret for memory management?

    • @fulconandroadcone9488
      @fulconandroadcone9488 ปีที่แล้ว

      @@SumoCumLoudly say what you will, you almost never work alone and the amount of gunshot wounds I saw was immeasurable in js, you might be good but if language doesn't allow bad things every one will be good.

  • @benwilcox1192
    @benwilcox1192 ปีที่แล้ว +2

    Anyone notice that when Prime highlights text, he always leaves out the first and last letter from the selection? 7:33 9:24 lol

  • @ykhi
    @ykhi ปีที่แล้ว

    It was again super interesting to hear your thoughts on this!!

  • @TheSkepticSkwerl
    @TheSkepticSkwerl ปีที่แล้ว +1

    at my work, when i'm building a product, probably 20% of my time is spent deciding how to write it. then i build it out. doing it right the first time has so much more time savings than anything i've ever noticed.

  • @s3dev
    @s3dev ปีที่แล้ว +6

    There is Wails for Go UI. It's kinda like Tauri, but for Go and is amazing in combination with Svelte.

    • @akshay-kumar-007
      @akshay-kumar-007 ปีที่แล้ว

      No offense, but I don't understand why people have an urge to combine both frontend and backend in a single framework. I have written Django code for 3 years and I absolutely hated it(atleast writing UIs). There was always some complex JS/JQuery which I had to write. At that point just use a simple JS framework like Vue, Svelte or React.
      I code in React/Next.js and NestJS/SpringBoot(for Backend) and I really enjoy the separation it offers.

    • @Ash-qp2yw
      @Ash-qp2yw ปีที่แล้ว +5

      @@akshay-kumar-007 Probably because that means using Javascript, which is a horrible language. I've specifically designed my current project around Go's built-in HTTP templates instead of working with something like svelte just because I don't want to have to work with JS or TS

    • @s3dev
      @s3dev ปีที่แล้ว

      @@akshay-kumar-007 You misunderstand. Wails is for Desktop apps. So with it you write a "backend" (that communicates with the filesystem, handles logic etc) an the frontend is separate from it. Wails automatically generates the bindings between front- and backend in a really easy to use way. It's not really "combined".

    • @raianmr2843
      @raianmr2843 ปีที่แล้ว

      ​@@akshay-kumar-007 Your frontend and backend is still separate in Wails. They just bundle the app down to a single native binary that uses the default webview of the platform. The last part is important here. People have use cases where you don't want to target the web but using web-related technologies is a nice way to go. It seems that you don't have this use case and that allows you to target the web the way its meant to be targeted. As for Django, afaik it precedes the JS boom of the last two decades. Almost no one was writing complex frontends back then and so it makes sense that Django doesn't play nice with the modern JS ecosystem.

    • @akshay-kumar-007
      @akshay-kumar-007 ปีที่แล้ว

      @@s3dev oh my bad.

  • @georgehelyar
    @georgehelyar ปีที่แล้ว +7

    I don't think writing it in one language then rewriting it in another language is a good idea for start ups anyway.
    You start, hire a few language X devs, get something working, then tell them to throw that away and rewrite in language Y, which they are probably not as familiar with.
    In reality these early decisions will stay with you for a long time so start as you mean to go on.

    • @Luxalpa
      @Luxalpa ปีที่แล้ว +2

      Exactly. I've been in 3 startups so far and they all suffered from this same problem: a few years after the initial launch of the product, their code is in very messy state. They don't even want to switch to Rust because all their devs are familiar with JS, their code base is far too large to change anyway, and it's so unmaintainable that even small changes take weeks to complete.
      Like, I know the Rust compiler is quite slow, but looking at how long some of these Typescript projects take to compile in the CI given their rather medium size, it's crazy.

  • @NuncNuncNuncNunc
    @NuncNuncNuncNunc ปีที่แล้ว

    Not sure what was being said about not being able to handle error in javascript with fetch_user. It would be either a Promise, an awaited Promise, or an Observable, and all of those have patterns for handling thrown errors. I'll grant that an '?' is more succinct than try/catch but that's it. If it's really a burden configure your ide to write the try/catch block.

  • @richardgeddes630
    @richardgeddes630 ปีที่แล้ว +8

    The problem with using Rust or any other language sparingly, is just that. You won't become productive by "timid" programming. When you code, day-in and day-out, with a particular language, you become productive with it. Stick with it, the "muscle memory" will kick in.

    • @___gg421
      @___gg421 ปีที่แล้ว +8

      Always find it strange when people try to choose the right language for a project when the right language is the one you know well.

  • @pangolinSoftware
    @pangolinSoftware ปีที่แล้ว +21

    I like Go error handling. It does make the code a bit more verbose, but it's very straightforward, like all other things in Go

    • @jasonwhite5578
      @jasonwhite5578 ปีที่แล้ว +18

      Yes, sir. The error handling model in Go forces the programmer to handle them, it provides transparency and is definitely not a weakness of the language.

    • @CuriousSpy
      @CuriousSpy ปีที่แล้ว +1

      erm... No

    • @mohdsalmanansari5992
      @mohdsalmanansari5992 ปีที่แล้ว +2

      no

    • @_slier
      @_slier ปีที่แล้ว

      the most shitty error handling in the universe..

    • @avithedev
      @avithedev ปีที่แล้ว +1

      Agreed

  • @marusdod3685
    @marusdod3685 ปีที่แล้ว +3

    tldr: they were more in love with the language than the product they were building

  • @marcusrehn6915
    @marcusrehn6915 ปีที่แล้ว +6

    I like the fact that you pointed out that even if you are a good programmer in another language, that doesn't mean that you will write good Javascript. So finding fantastic rust developers who are also good javascript developers, and who are willing to even touch javascript, will probably be hard.

  • @RedHandedBug
    @RedHandedBug ปีที่แล้ว +5

    This video gave me the inspiration to make a startup in Rust.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  ปีที่แล้ว +8

      rewrite rust in rust

    • @wlockuz4467
      @wlockuz4467 ปีที่แล้ว

      @@ThePrimeTimeagen Isn't the Rust compiler self-hosted? so technically its already writing rust with rust.

    • @cherubin7th
      @cherubin7th ปีที่แล้ว +1

      @@wlockuz4467 Rewrite it again and again in Rust. XD

  • @user-mj7kk8tu1e
    @user-mj7kk8tu1e 7 หลายเดือนก่อน +1

    The best part is, almost 90% of the "pro's" and "reasons" to use rust, exist in Java, except that Rust is more performant due to absent layer of interpreter. So, as a Java developer, I am actually pretty happy here and have plenty of jobs to choose from :D
    And another point is... Java is actually very good nowadays and GC have been improved dramatically.

  • @MrVeps1
    @MrVeps1 ปีที่แล้ว +8

    I agree wholeheartedly that postponing is expensive. There's always something new to add, unfucking old mistakes that still aren't a huge problem will always just help you sustain your current revenue flow.
    Suddenly, you'll find yourself in your tenth year of your two-month refactoring project wondering why people won't leave you alone to focus on fixing ancient code. Technical debt is a real thing, and when it hits, it hits hard.

  • @einfacherkerl3279
    @einfacherkerl3279 6 หลายเดือนก่อน

    if you read the book database systems by C J Date, the inventor of SQL, he clearly mentioned that STRUCTURED QUERY LANGUAGE should be pronounced as S.Q.L not sequel or "squeal".

  • @LoftwahTheBeatsmiff
    @LoftwahTheBeatsmiff ปีที่แล้ว +1

    If you've got a team already comfortable with the concept of the backend being decoupled from the front-end do you think it is worth looking for something with a more full stack approach that you get with something like Django or Rails?
    I almost assume I'll be hooking up JavaScript to a REST API or something.

    • @zzzyyyxxx
      @zzzyyyxxx ปีที่แล้ว +1

      God I hate full stack frameworks. I used to work in Rails and while the happy path is good, when you need to have something custom, you literally can't do it without removing Rails, basically.

    • @eddwinnas
      @eddwinnas ปีที่แล้ว +1

      django sucks go flask

    • @LoftwahTheBeatsmiff
      @LoftwahTheBeatsmiff ปีที่แล้ว

      @@zzzyyyxxx I work with Rails but I think I'd prefer Sinatra.

    • @LoftwahTheBeatsmiff
      @LoftwahTheBeatsmiff ปีที่แล้ว

      @@eddwinnas what about FastAPI?

    • @eddwinnas
      @eddwinnas ปีที่แล้ว +1

      @@LoftwahTheBeatsmiff It always had some memory leaks or issues with missing certain features at this startup I worked at. That was 2 years ago though. Flask/starlite/fastpi cant go wrong. Django is great if you need a huge project with lots of required things for coporate enviroment like admin / group privalages. Flask is good if you need tons of library with flexibility. Starlite/fastpi is probably the way I would ultimately go now for backend API's though in python.

  • @replicator__
    @replicator__ ปีที่แล้ว

    For me, Gos biggest weakness is that it misses so many nice syntax features I love in Rust. Macros are on the extreme end of that.
    Go is designed to be super simple and, for my liking, it compromises too many features for that. But I get the reason and understand why it's the case. Still, even with go modules and go workspaces it doesn't convince me.

  • @floriansalihovic3697
    @floriansalihovic3697 ปีที่แล้ว

    “Inherently colours your thoughts” - a valuable idea for a lot of people

  • @peterdecroos1654
    @peterdecroos1654 ปีที่แล้ว +3

    go also has a garbage FFI. I think ocaml is a better middleground with the exception of the ecosystem being smaller

  • @shivamjhaa
    @shivamjhaa 11 หลายเดือนก่อน +1

    "When you are building a product, boring is okay"

  • @JustAnotherLight
    @JustAnotherLight ปีที่แล้ว +1

    what would you use instead of match btw?

  • @abhisekde6841
    @abhisekde6841 5 หลายเดือนก่อน +1

    I am building a product in my spare time in Go. I just wish Go had enums out of the box.

  • @PouriyaJamshidi
    @PouriyaJamshidi ปีที่แล้ว +2

    Nim seems to be a better option than Go.
    It has a better and optional GC, syntax, features and more mature imo.

  • @DNA912
    @DNA912 ปีที่แล้ว +1

    real talk, I have a bachelor in CS and been working at my company for a few month.
    I still have no idea what I'm doing in JS

    • @myname2462
      @myname2462 ปีที่แล้ว

      Well, JS is garbage

  • @IanLaffey
    @IanLaffey ปีที่แล้ว

    You can do SQL compile time checking with Typescript & Supabase

  • @nateshih
    @nateshih ปีที่แล้ว

    is there a video of prime's 100m dash? Heard he runs a 10.5 and I wanna see

  • @paulholsters7932
    @paulholsters7932 ปีที่แล้ว +1

    I am gonna begin a startup for a product. Should I use Go or Rust? Is error handling really this terrible in Go? Right now I am building a prototype in JavaScript

    • @joseandkris
      @joseandkris ปีที่แล้ว

      Go is fine

    • @paulholsters7932
      @paulholsters7932 ปีที่แล้ว +3

      @@joseandkris thx for now I will go with go but I am still gonna investigate rust ..

    • @kriscarr5839
      @kriscarr5839 ปีที่แล้ว +1

      Quick tip, make a handful of code snippets to insert the if err == nil block in a few keystrokes rather than typing it all out every time. It does make it much easier to refactor into more fanciful error handling later already having the block compared to splitting out ? chains in rust later into match expressions causing it to break the ownership rules. Whether you care about that of course comes down to if you care about having a more fanciful error handling later or not.

  • @laughingvampire7555
    @laughingvampire7555 ปีที่แล้ว

    when the time comes to optimize for scale the decision is always to defer as much as possible, because coding time is always more expensive than CPU time.

  • @fiskegalendbpk
    @fiskegalendbpk 4 หลายเดือนก่อน +1

    I built a million dollar app in typescript, now all my dependencies keep deprecating every two weeks, what do i do? All my friends say I should refactor to a “real” language, but I can’t hear them over my soy latte and M1 ARM chip…

  • @cruz9617
    @cruz9617 ปีที่แล้ว +1

    07:31
    This was literally me 🤣😅

  • @thomassparrevohn8577
    @thomassparrevohn8577 ปีที่แล้ว

    This is most common argument you hear when it comes to code for startups, but behind it seems to be an assumption that the main reason to do the start up it to get it it sold and move on hence architecture, longevity and future cost is of little or no concern. It's one of the things you normally look out for when assessing aqusitions or long term financing. Unfortunately there are often a common synergy between "startup" and people who specialise in financing startup's where immediate results are more important. Nonetheless 80% of the future cost relates to these decisions and very often the viability of the product

  • @MarcosVMSoares
    @MarcosVMSoares ปีที่แล้ว +3

    Elixir you don't need k8s, it's faster to write even than JS, Ruby, GO etc because it's no OOP and not strongly type. And you have case/1 instead of match. And don't forget too, sqlx it's amazin but ecto ... and you have sandbox mode when testing.

    • @zzzyyyxxx
      @zzzyyyxxx ปีที่แล้ว +1

      Elixir is kinda the worst of both worlds to be honest, no static types means there will always be some bug or another, plus not as fast as TS, much less Rust.

    • @MarcosVMSoares
      @MarcosVMSoares ปีที่แล้ว

      @@zzzyyyxxx not fast as TS? are u crazy? Static type dont save you from bug, is much better to have good testing for that propose.

    • @zzzyyyxxx
      @zzzyyyxxx ปีที่แล้ว

      @@MarcosVMSoares hahaha, static typing doesn't save me from bugs? Good one, I had a good laugh. Manual testing is in no way a substitute for something I can have the computer do automatically, like why would I manually write out data type checking tests? Waste of time (not other types of tests though of course)
      And yes, Elixir is not as fast in runtime as TS which when transpiled to JS runs on V8 and its very fast

    • @MarcosVMSoares
      @MarcosVMSoares ปีที่แล้ว

      @@zzzyyyxxx ok with you say so ^^

  • @boredstudent9468
    @boredstudent9468 ปีที่แล้ว +4

    Holy shit that pronounciation of SQL...

  • @dn5426
    @dn5426 ปีที่แล้ว +3

    Go with a slightly better type system would be perfect.

  • @u9vata
    @u9vata ปีที่แล้ว +1

    Why I choose to stay with C++ instead is because for me its just so much faster to develop. Rust I find more beneficial in bigger teams where code review would not scale well anymore...
    People also misunderstand why people use C++: I don't give a shit that I can shoot myself in the foot, I give a shit for zero cost abstrations that are FAST TO WRITE. That's all. This is why C++ and RUST live together and not one over the other because the reason why one picks up a tool is actually totally different. To be honest more web people pick up rust than C++ people I would say.

  • @esra_erimez
    @esra_erimez ปีที่แล้ว +5

    I'd go so far to say boring is good. We are migrating our backend from C++ to Go. I find C++ to be a waking nightmare with unexpected surprises and Go to be boringly predictable. I like Go because it is feature rich like Java and C# and at the same time natively compiled. It is unlike C# that is closely tied to the Microsoft ecosystem and unlike Java which needs a JVM.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  ปีที่แล้ว +1

      appreciate this

    • @metaltyphoon
      @metaltyphoon ปีที่แล้ว +6

      Sorry but have you been living under a rock? C# is very much free from MS ecosystem only for more than half a decade. In fact I use C# from macOS do deploy to Linux environments on AWS 😂

    • @RemotHuman
      @RemotHuman ปีที่แล้ว +2

      I think you can compile java not to need the JVM but I'm not sure

    • @jasonwhite5578
      @jasonwhite5578 ปีที่แล้ว +1

      @@metaltyphoon She doesn't mean that it doesn't cross compile, she means if Microsoft decides to stop supporting C#, you're done. Another thing that's nice about Go, I can download the whole language and have it entirely separate from anything Google. Don't even have to install anything on my PC. Just point an environment variable to the language folder, and I'm up and running.

    • @hck1bloodday
      @hck1bloodday ปีที่แล้ว +2

      @@jasonwhite5578 since c# is opensource, you can say the same about it, download it, compile it and use it.
      also google is known to kill its products whenever it feels like, so I would be more worried about go losing support from google than C# losing support from microsoft

  • @highlyevolved4977
    @highlyevolved4977 ปีที่แล้ว +1

    For me, the biggest negative for rust is actually that it’s not statically compiled. I love everything else about it..

    • @Cookiekeks
      @Cookiekeks ปีที่แล้ว

      What does that mean? Sorry I'm new to this.

    • @Luxalpa
      @Luxalpa ปีที่แล้ว +3

      It is statically compiled.

  • @orychowaw
    @orychowaw 11 หลายเดือนก่อน +2

    Sounds a lot like they decided to use Rust for their startup because they heard good things about it, but where not proficient with it. So they had to learn the language at the same time as building their value. IMHOP a) they would have been happier with using a language/tech stack they were already comfortable with and b) now that they are familiar with Rust it will be easier to use for a new startup...

  • @br3nto
    @br3nto ปีที่แล้ว

    12:20 yeah rewriting and starting again in a new language is a pretty big call. At what point do you make that call? At what point is it too late? And it’s not just the code, it’s also the whole deployment pipeline, and any other tools you’ve written, and the people hired with the specific skill sets. And maybe the frameworks used with the two languages aren’t exactly compatible, so you may have to restructure the code too. Not that it can’t be done… it’s just a big call… Personally, I would only make that call if something had catastrophically gone wrong with the first language choice or the first choice was going to financially ruin the company or hold it back in some significant way.

  • @AdrianDiaz-ob8qn
    @AdrianDiaz-ob8qn ปีที่แล้ว

    that fly-like thing at the bottom of the screen was triggering my anxiety levels to the roof, I think I need therapy now

  • @pxkqd
    @pxkqd ปีที่แล้ว

    I read this article a couple days ago as well. I don't know Rust well, I mostly do Typescript. And I disagreed with it.
    If you already know rust, use it.

  • @diadetediotedio6918
    @diadetediotedio6918 ปีที่แล้ว

    10:00 the definition of entrepreneurship

  • @warever9999
    @warever9999 ปีที่แล้ว +1

    If you love enums, then how it is possible that you are not using match expressions? )

  • @MrWorshipMe
    @MrWorshipMe ปีที่แล้ว

    I'd use python for prototyping, then replace safety critical and performance critical parts with rust.

  • @karl4813
    @karl4813 ปีที่แล้ว +2

    Yo Prime! I want to see you break down CS50's Tideman task in C ;)

  • @jaredsmith5826
    @jaredsmith5826 ปีที่แล้ว +3

    Hot take: language development for the last ~15 years has been trying to find the sweet spot in terms of how strong the type system should be. At the time Rust, TS, Swift, Kotlin, etc were being created we knew that Haskell was too much and Java/C#/C++ and the popular dynamic languages were not enough. Go is the outlier: a conscious rejection of the zeitgeist. Time will tell I guess.

    • @akshay-kumar-007
      @akshay-kumar-007 ปีที่แล้ว +2

      Go is perfect sweet spot for writing backend code. Change my mind.

    • @jaredsmith5826
      @jaredsmith5826 ปีที่แล้ว +2

      ​@@akshay-kumar-007 Imagine that you had to defend Go based solely on the support you get from the compiler/type system. Go has many many sterling qualities: fast cycles, simple familiar syntax, best-in-class concurrency primitive multiplexed seamlessly to real OS threads, solid toolchain/ecosystem, strong corporate backing, tons of pedagogical resources, etc. But all of those (except the first one and _maybe_ the second) are orthogonal to my point: you could conceive of a language that did everything Go does but gives you a better DX via a less primitive type system.
      Don't get me wrong, if you're asking me to choose a backend language in a carte blanche greenfield project I might very well pick Go, but if I were to design my ideal language it... wouldn't be quite like Go. Adding generics has helped a lot, but even Java had those in 2004. Still, in terms of what language to pick in 2023 it's a very solid choice, maybe even the best choice, it's just not the best *possible* choice.
      At any rate, my point wasn't even really about Go, it was more about how similar all of the other languages that came out in the same era are, and my stab at an explanation of why.

    • @chh4516
      @chh4516 ปีที่แล้ว

      @@akshay-kumar-007 Try Kotlin. You get all the Java Ecosystem for free, have amazing typesafety, nullsafety, super readable code and a wide variety of options to solve your problems. It is made to be simple, beautiful and powerful.

  • @johanlarsson9805
    @johanlarsson9805 ปีที่แล้ว

    What is the editor/command promt he is using?

  • @raybarrera9002
    @raybarrera9002 ปีที่แล้ว

    1:45 Nails on a chalkboard

  • @venicebeachsurfer
    @venicebeachsurfer ปีที่แล้ว

    What about NestJS? You try that yet?

  • @shwetagk5362
    @shwetagk5362 ปีที่แล้ว

    Twitch is on Ruby why not set direction of startup in it and then double down on performance with rust or go

  • @dixztube
    @dixztube ปีที่แล้ว

    Use that Theo stack (I didn’t lol I wanna learn computer science) but if you got business just use that jawn

  • @batboy49
    @batboy49 ปีที่แล้ว +1

    I like writing Go code, I like writing Rust code, I like writing C Code, I like writing Python Code....I think I like coding ;) That being said what is the most fun? RUST just feels like APPLE PIE ;)

  • @michaeloconnell145
    @michaeloconnell145 ปีที่แล้ว +1

    Something I would have expected to see with this article is a reference to cold start time for AWS Lambda functions with rust, as of my last time checking Python and Typescript/JavaScript had the lowest cold start times. This could be a differentiator based on their expected traffic, thresholds, and scaling model.

    • @ccgarciab
      @ccgarciab ปีที่แล้ว +1

      Aren't Rust cold starts really fast too? It's just a binary after all. No need to JIT anything.

  • @ferretcode
    @ferretcode ปีที่แล้ว

    it seems like a lot of companies are choosing go rather than rust for startups

  • @TheEvertw
    @TheEvertw ปีที่แล้ว +1

    5:00 - This comment shows that he was both starting a new company AND becoming acquainted with the language Rust. NEVER start a company on a language you are not deeply familiar with. You can not afford the additional risk.

  • @Titsnitch
    @Titsnitch ปีที่แล้ว

    Yeh same but then I get offline satchel raided and it’s just so tough to come back to a raided base

  • @oakley6889
    @oakley6889 ปีที่แล้ว

    I wrote a NEAT algorithm in python... I'll never do that again. Have no types is so awful, and I just end up with hundreds of print statements to look for issue as the errors were pretty terrible (it would error at a line, but that actually error would occur somewhere else usual because something outputted undefined)
    No way I could of done it in anything else tho. But I would of loved to do it in rust, if I had the foresight to learn it and wasnt on a deadline

  • @nairjithus
    @nairjithus ปีที่แล้ว +2

    I get the developers love of rust but for a startup, I'm gonna defend this person and say that Rust is not a great choice for most (at least of web-based) startups.
    It depends on the product ofcourse. Something like fintech product, for eg might need safety and performance.
    For the most web cases, why not just use JS. And if performance is a serious consideration, just use Go. And if you reach such a scale that Go has become a bottleneck, then reach for something even faster like Rust.
    Engineering and programming language beauty is great n all, but frankly, the product's users mostly don't care about that.
    If a competitor builds a product with JS/TS with more features and iterates faster than you, then eventually you're gonna be at a disadvantage.
    Will the users then care if your app is 200ms faster? I doubt it.

    • @deiminator2
      @deiminator2 ปีที่แล้ว

      200ms is a shitton lol

    • @nairjithus
      @nairjithus ปีที่แล้ว

      @@deiminator2 Probably.
      I was just making a point. 🙂

    • @Luxalpa
      @Luxalpa ปีที่แล้ว +2

      The problem is that you'll be much faster writing your App in Rust than writing it in JS. People put safety and performance as being separate from the code but that's not true. Every application has the same requirement which is that it works properly, and it just happens that Rust's approach to correctness is the quickest one for the developer. You can write super performant JS code as well and make it bugfree but that will take you much longer because you spend all this time dealing with code organization and hunting bugs and fixing issues and writing tests and debugging, etc whereas the Rust user only has to deal with the actual business logic of the program and can skip all those extras. And they get documentation for free as well.

    • @nairjithus
      @nairjithus ปีที่แล้ว

      @@Luxalpa I don't deny the benefits of rust. But saying that Rust productivity is *always* faster than JS... I don't know about that.
      Long-term what you say is probably true, it'll be ultimately less time consuming to build and maintain an app using Rust.
      But when you start out, you're almost never sure the product you're building will work out. You'll have to constantly change. Rust will probably be a major productivity hit for such an environment. Being completely bug-free, or edge-case free would mostly don't matter in those situations.
      Unless your app needs to be extremely performant, secure, going to serve to millions right out of the gate or any other cases where Rust just-makes-sense - I'm not sure Rust is gonna be faster to develop than JS.

  • @roccociccone597
    @roccociccone597 ปีที่แล้ว

    We use go for our APIs at work, I do like it. And it's a heck of a lot better than Java.

  • @owenwexler7214
    @owenwexler7214 5 หลายเดือนก่อน

    Got a backend rewrite in either Go or Rust planned for 2024 so this is very timely.

    • @owenwexler7214
      @owenwexler7214 5 หลายเดือนก่อน

      Hmmm I think we are solidly in "it's time to scale"/"we have a solid direction and don't want too much tech debt" mode. Gonna do some prototyping with Rust and either Diesel or sqlx depending on the DX and if it fits our needs.

  • @user-ql3ut3ep5x
    @user-ql3ut3ep5x ปีที่แล้ว

    ah... rust scares me, i'm in go... but the statement at 12:00 about go it's hard to not be agree