The Ladybird browser is replacing C++ with... Swift?

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

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

  • @willmael7914
    @willmael7914 Месяц назад +132

    Doesn't seem like a hate on Rust and more of a "this requires OOP and Rust is designed to not have OOP" decision

    • @rawallon
      @rawallon Месяц назад +13

      Yeah, but how are you supposed to incite tweet drama with a statment like that?

    • @rusi6219
      @rusi6219 Месяц назад +7

      ​@@rawallondon't worry the rust devs will start drama regardless

    • @lubba64
      @lubba64 Месяц назад +3

      @@rusi6219 assume much? Different tools for different people.

    • @rusi6219
      @rusi6219 Месяц назад +5

      @@lubba64 training wheels for rust devs (borrow checker)

    • @lubba64
      @lubba64 Месяц назад +3

      @@rusi6219 training wheels????

  • @rjScubaSki
    @rjScubaSki Месяц назад +72

    This man is perfectly styled to live in a futuristic dystopia

    • @konberner170
      @konberner170 Месяц назад +3

      Or already is.

    • @smort123
      @smort123 Месяц назад

      Straight out of Cyberpunk

    • @CamiloRojas-x6g
      @CamiloRojas-x6g 6 часов назад

      He's a recovering addict so please be mindful of appearance comments like that.

  • @Alexander_Sannikov
    @Alexander_Sannikov Месяц назад +44

    i looked at ladybird's c++ code and it seemed pretty reasonable to me. i wonder what made them decide to switch.

    • @NunoFerreiraX
      @NunoFerreiraX Месяц назад +13

      Safety.

    • @turtlefrog369
      @turtlefrog369 Месяц назад +5

      @@NunoFerreiraX c++ is safe, just dont use unmanaged pointers like you do in C.

    • @vytah
      @vytah Месяц назад +22

      ​@@turtlefrog369 There are many more features of C++ you need to stop using if you want to be safe.

    • @fotnite_
      @fotnite_ Месяц назад

      ​​​In modern C++ the safety is pretty similar to Swift. Use references whenever possible instead of naked pointers, and use smart pointers when it's not possible (the runtime cost is the same as Swift anyway), do heap allocations with smart pointers instead of with `new`, use range iterators instead of pointer iterators (unfortunately safety for this is only guaranteed with C++23), and you're good. IMO, being safe in modern C++ only gets really difficult if you either need to pull in an unsafe library, or you are doing tons of inheritance. The former is sometimes unavoidable, but the latter is probably not good practice anyway.
      My guess is that you can't really avoid unsafe in C++ for browsers because you need to do things like interact with graphics libraries. But then again, Firefox's renderer is primarily made in Rust, and integrates properly with the C++ codebase. Maybe ladybird doesn't like mixed codebases, in which case Swift would be a good choice, though personally I find Swift's multiplatform capabilities lacking. The support is pretty good on macOS and Linux (and I don't think Ladybird is using many macOS-specific frameworks), but the windows support has always been spotty, which I'm guessing is why Ladybird recommends using WSL instead of a native install on Windows.

    • @Languagist
      @Languagist Месяц назад

      ​@@vytahlike?

  • @nisonatic
    @nisonatic Месяц назад +18

    I tried Swift. I like the language, it has a lot of Objective-C baggage, but that's not too bad. I think my main stumbling block was the awfulness of XCode. I think if I were going to do it for real, I'd want to run on Linux and set up Neovim or something.

    • @thedeemon
      @thedeemon Месяц назад +11

      I played with in on Linux, it works pretty well. Comes with an LSP server, so many modern code editors enable its support automatically. By default the binaries tend to be very small and fast, but refer to a bunch of .so files tied to a specific version. With Swift 6 recently released, you can make completely static binaries on Linux, but the size for a hello world starts with 42 MB.

    • @andrewdunbar828
      @andrewdunbar828 Месяц назад +3

      It does have Objective-C baggage but this is one of the first times I've seen somebody other than me say so. But even I don't say it's a lot. It's definitely a lot less than how much Java baggage Kotlin has. I haven't made anything big in Swift or tried swift on a non-macOS operating system yet though.

    • @TheoParis
      @TheoParis Месяц назад +1

      @@thedeemon I'm still waiting for a decent no_std alternative with Swift. Currently you have to rewrite a bunch of builtin operators in a custom standard library just to get around the binary size limitation or to build a bare metal application.

    • @iteroji
      @iteroji Месяц назад +3

      I worked on a somewhat complex Linux command line tool written in Swift and I liked the C interop abilities (I had to interface with hardware), and the expressiveness of the language. What I didn’t like is the terrible and incomplete standard library compared to Apple platforms, that takes you 90% where you want to go then makes you sweat blood to figure out some workarounds for the remaining 10%. Distributing your software requires shipping the Swift runtime (exact version you compiled the app with) which depends on libcurl and some other shared libraries for basic functionalities such as networking. If I’m not mistaken the dependencies alone were about 300mb. Static compilation did not work on Linux reliably in the version I used (5.8ish)
      On MacOS all dependencies are pre-installed plus Swift is ABI stable there, so it’s much less of a problem.
      My biggest complaint is, however, the way Apple offloads the Linux development to the community and really only cares about it’s own platforms.

  • @TheHippyhopp
    @TheHippyhopp Месяц назад +10

    Can someone explain to me more technically what he means when he says rust doestn work with XML/HTML because it lacks inheritance?

    • @spiritofstar
      @spiritofstar Месяц назад +1

      I want to know too

    • @nasang7478
      @nasang7478 Месяц назад

      me too

    • @turtlefrog369
      @turtlefrog369 Месяц назад +7

      it means he is a terrible programmer. (btw i hate rust).

    • @moussaadem7933
      @moussaadem7933 Месяц назад +9

      You start with an "Element", you extend that into an HTMLElement, then extend that into the different types of Elements. The Web APIs are very object oriented, you would know if you read the spec

    • @RomanAvdeevX
      @RomanAvdeevX Месяц назад

      ​@@moussaadem7933Use composition then

  • @lmauro
    @lmauro Месяц назад +53

    Funny that rust was created by a company that builds a browser and was willing to create a new engine, servo.

    • @whoman0385
      @whoman0385 Месяц назад +19

      yeah, too bad servo is basically unusable, even their own demo website barely works.

    • @tui3264
      @tui3264 Месяц назад +7

      unfortunately firefox is still mostly c++ and mozilla fired a lot of people of servo

    • @boccobadz
      @boccobadz Месяц назад +21

      Funny because the same company couldn't deliver anything usable in 10 years (servo doesn't work). Speaks volume about real-world rust usage. When you have to do anything non-trivial, rust falls apart. And if you have to go with unsafe (and at some point you'll have to if you're writing real software), just use superior language like C or Cpp. It's just that simple.

    • @SaHaRaSquad
      @SaHaRaSquad Месяц назад +27

      ​@@boccobadz I am sure the Android and Windows system devs would be interested to hear about what you consider non-trivial. Or Linux, unless you consider a GPU driver or graphical desktop environment including its own text shaping & rendering trivial lol.
      Also I don't know why Rust critics always go for the "if it has to use unsafe it's not better than C" thing, it makes no sense. A few small chunks of unsafe code means the rest is still much safer and real numbers prove that. History has shown that just being good in C doesn't work.
      Rust criticism is fine and often warranted, but just repeating things that fall apart by themselves is only a waste of time.

    • @turolretar
      @turolretar Месяц назад +9

      ⁠​⁠@@SaHaRaSquad the fact that you Rust people need to constantly over explain yourself says a lot

  • @miko007
    @miko007 Месяц назад +5

    wait, was it not rust that has been pushed by mozilla, because it specifically was created to write the quantum browser engine?

  • @arkeynserhayn8370
    @arkeynserhayn8370 Месяц назад +34

    Good choice. Swift seem to be a pragmatic programming language, which is a good thing for longevity of Ladybird project.

  • @Bobbias
    @Bobbias 2 месяца назад +35

    I really get why people wouldn't enjoy Rust and feel that it's not a great choice for modeling object oriented APIs. There is a lot of friction there. Not to mention the strictness of the borrow checker. Modeling OOP APIs can be done, but it won't look and feel anything like what you're used to. Figuring out the right way to model those APIs will absolutely be more difficult in Rust.
    I think Rust'a fundamental problem is that it requires sich a drastic change in how you solve certain problems. If that's a deal breaker for someone, then they're probably never going to like Rust, plain and simple.
    But for those who are willing to rethink how they approach solving common problems and are willing to do things "the Rust way", I think the language can be great because of it's safety and other great features.

    • @Nors2Ka
      @Nors2Ka Месяц назад +5

      If you're willing to learn "the Rust way" you should also be willing to learn "the sane persons way" of programming, one which wouldn't need any of Rust features and in fact Rust would ONLY be a hindrance.

    • @nubunto
      @nubunto Месяц назад +10

      @@Nors2Kawhy wouldn’t rust be sane, though?
      That being said, is swift really that good?

    • @boccobadz
      @boccobadz Месяц назад +2

      @@nubunto Iteropt with C is amazing, and the real software is written in C.

    • @Nors2Ka
      @Nors2Ka Месяц назад +6

      @@nubunto Rust way was made in response to the insane way of writing C++: individual lifetimes, RAII, heavy machinery managing memory, complex type behavior. Rust makes writing such code less prone to errors, while adding huge amounts of complexity.
      It's always more alluring to learn a new way than unlearn the bad way (OOP flashbacks), which is why Rust has any interest at all. But to (admittedly few) people who switched from individual to grouped lifetime thinking Rust gives far far fewer useful features and mostly just hindrance. Notably NASA rejected Rust and stuck with C due to Rust not actually giving them additional safety guarantees that they already had.

    • @nordgaren2358
      @nordgaren2358 Месяц назад

      @@Nors2Ka what?

  • @arkeynserhayn8370
    @arkeynserhayn8370 Месяц назад +7

    @RustIsWinning
    we are waiting for your throughout and technical breakdown of the problem at hand.

  • @DanelonNicolas
    @DanelonNicolas 2 месяца назад +10

    it seems really interesting! gonna take a look to the whole thing

    • @Changelog
      @Changelog  Месяц назад

      The whole podcast or the whole web browser or both? 🤓

    • @DanelonNicolas
      @DanelonNicolas Месяц назад +1

      @@Changelog the whole episode, haha I'm not that much into podcasts, well see

  • @GaryChike
    @GaryChike Месяц назад +2

    Rust doesn't support classical OOP inheritance, but offers composition and trait inheritance:
    * Flexibility: Composition allows for more flexible object designs.
    * Avoids the "diamond problem": Multiple inheritance issues are avoided.
    * Encapsulation: Better encapsulation of behavior and state.
    * Code reuse: Traits allow for behavior sharing without tight coupling.
    * Runtime polymorphism: Trait objects enable dynamic dispatch.
    * Clear interfaces: Traits provide clear contracts for behavior.
    This approach leads to more maintainable and less tightly coupled code, addressing many of the issues that arise with deep inheritance hierarchies in traditional OOP.

  • @weirddan455
    @weirddan455 Месяц назад +4

    What's the plan for the GUI if you're moving to Swift? Aren't you currently using Qt which is a C++ framework? I don't know what Swift has to offer that's cross platform. I very rarely see it being used on non-Apple platforms.

    • @tubeincompetence
      @tubeincompetence Месяц назад

      Seems at least someone did some Swift bindings for QT, so not sure that would be a big problem

    • @realSimonPeter
      @realSimonPeter Месяц назад +4

      Swift has native C++ interop. You can call any C++ API or use C++ types in Swift while retaining the memory safety of Swift.

  • @pseudo_goose
    @pseudo_goose Месяц назад +3

    Very pragmatic decision that I totally respect. At the same time, from a research perspective, I'm curious about modeling object-oriented specs like the Web using data-oriented engines like ECS. My gut feeling is that it _feels_ like it should work and deliver comparable performance, but it needs experimentation to know for sure. Of course, it isn't quite the same development experience as having OOP built into the language.
    I was going to try something like that for the recent BrowserJam, but I wasn't able to participate. Maybe I'll pick that up again at some point

  • @devilminty_fresh
    @devilminty_fresh Месяц назад +11

    I don't like rust either. But one of the best ways to fix the problem being described is to turn the browser into a data oriented problem. I'm not saying that's easy either.
    Just pointing out that using a hammer when you need a screwdriver is usually the wrong way to do things.
    Shout outs to the ladybird team doing their due diligence and testing out what makes them *enjoy* coding.

    • @nisonatic
      @nisonatic Месяц назад +8

      Yeah, that seemed like a strange objection. The browser is certainly providing all those OO APIs, but the actual object-orientation only needs to happen inside Javascript. Nothing else is inherently object-oriented; HTML and CSS are rules engines.
      Maybe the issue is simply that various specifications and such all tend to assume OO and it's a big lift to rethink all that to avoid objects.

    • @boccobadz
      @boccobadz Месяц назад +9

      There's a reason why Mozilla was using rust and couldn't deliver servo. It's been about 10 years now. So maybe, just maybe, rust and real world software don't mesh that well, otherwise everyone would be using rust for real software development instead of "mental masturbation" and "rust btw" thingy. It is what it is.

    • @SaHaRaSquad
      @SaHaRaSquad Месяц назад

      @@boccobadz That reason is that servo is purely an experimental engine that had its budget and developers cut drastically out of lack of interest. Amazon, Google, Microsoft and others are already shipping Rust code in Android, Windows 11 & Azure, and AWS services. They've even been doing it long enough that Google already has statistics that prove Rust drastically reduced the amount of memory safety related vulnerabilities.

    • @thedeemon
      @thedeemon Месяц назад +3

      @@boccobadz Quite a lot of modern tools are written in Rust. Terminals. Text editors. Package managers. Research compilers/interpreters. File utilities.

    • @NovemberIGSnow
      @NovemberIGSnow Месяц назад

      @@boccobadz There are several Rust components in Firefox right now. Several components from Servo have been moved into Gecko, which means Gecko is now partially written in Rust. Stylo, from the Servo project, is in Gecko. Neqo isn't from Servo, but it's written in Rust and is in Gecko. There are dozens of components written in Rust solving real world problems.

  • @esra_erimez
    @esra_erimez Месяц назад +18

    3:04 As someone that programmed professionally in C++, I'd say that *most any* language is better than C++

    • @henrykkaufman1488
      @henrykkaufman1488 Месяц назад +1

      They should use C++ with a guideline which reduces features like they do in Game Dev and space tech. Swift removes a lot of possibilities of writing a program, some of which might be needed when you program a freaking browser.

    • @benoitrousseau4137
      @benoitrousseau4137 Месяц назад +6

      C++ is fine.

    • @turtlefrog369
      @turtlefrog369 Месяц назад +4

      woman comment.

    • @Justin-wj4yc
      @Justin-wj4yc Месяц назад +2

      @@turtlefrog369 C++ is objectively bad. If you don't care for technical merits I guess you have the "woman comment" bwuahahah. The adults table is not for you.

  • @-iIIiiiiiIiiiiIIIiiIi-
    @-iIIiiiiiIiiiiIIIiiIi- Месяц назад +16

    All 6 Crystal users cry out in a whimper!

    • @l.piekha100
      @l.piekha100 Месяц назад +1

      what?

    • @thelvadam5269
      @thelvadam5269 Месяц назад

      @@l.piekha100exactly

    • @moussaadem7933
      @moussaadem7933 Месяц назад

      ​@@l.piekha100the programming language "crystal" that aims to replace c++

  • @dranon0o
    @dranon0o Месяц назад +6

    Very interesting one, I will stick with Go C and Zig thanks

    • @johanrg70
      @johanrg70 Месяц назад

      And nobody cares what you do.

  • @ultimate123321
    @ultimate123321 Месяц назад +1

    it mental how their sites media player has no volume control

  • @NurfHerderEclipse
    @NurfHerderEclipse Месяц назад

    Curious what else Rust js missing besides inheritance

  • @4Exp4
    @4Exp4 Месяц назад

    is there no full video version on RUclips?

    • @Changelog
      @Changelog  Месяц назад +3

      We are an audio-first podcast. We post full-length audio here on YT and video clips. Lots of ways to listen though ~> changelog.fm/604

  • @capability-snob
    @capability-snob Месяц назад +3

    I seem to regularly forget how sensible Kling is. While I had some initial distaste for Swift because it feels quite Ruby-like to me, it's actually a great fit for a browser. The ergonomics are a bit like Elixir, except that it targets native compilation on low-powered devices like mobile phones. It also feels a bit like OCaml - fairly functional, but not offensively so. I think I'd assumed that Ladybird would stay in C++ and so it would hold no interest for me, but now I must take another look.

  • @paulklein649
    @paulklein649 Месяц назад +2

    I love Rust, but if I had to choose between Swift and Kotlin, I would prefer Kotlin.

    • @RomanAvdeevX
      @RomanAvdeevX Месяц назад

      Same

    • @anon_y_mousse
      @anon_y_mousse Месяц назад +1

      Interesting choice. Care to explain why?

    • @RomanAvdeevX
      @RomanAvdeevX Месяц назад

      @@anon_y_mousse Kotlin is more like Java and runs on JVM, which is more cross-platform, which makes it easier to set up on non-Apple devices. It also has a great IDE by JetBrains, so DX is good. And the fact that it is not affiliated with Apple, a company which is famous for not caring about other platforms, plays a role in the decision as well

  • @watewmark
    @watewmark 6 дней назад

    "A huge swiftie" xD made my day.

  • @GhamzaJd
    @GhamzaJd Месяц назад +6

    I feel that Rust’s OO aspect is better than most OOP languages. For example, locking a mutex returns a mutex guard which literally is modeled in an object like concept (cracking up a nut and getting its kernel). But I do agree on the inheritance side of things and when storing a trait object (and working object safety rules) or constructing one. While in swift its as simple as storing a variable. But looking at where swift is heading, it’s a Rust with GC (and minus lifetimes) the newer APIs of ownership and thread safety are already enforced in Rust. Glad to see other language’s API getting inspired by Rust

  • @nordgaren2358
    @nordgaren2358 Месяц назад +39

    If you have a bunch of people who don't know Rust writing Rust to see if Rust is a good fit, I'm pretty sure they are going to say no every time.
    Rust isn't a language you just pickup and go with, unfortunately.

    • @AkaiKnight
      @AkaiKnight Месяц назад +4

      …..then nobody would use rust wym 😂

    • @nordgaren2358
      @nordgaren2358 Месяц назад +2

      @@AkaiKnight re read what I said? Idk how to explain it any clearer.

    • @AkaiKnight
      @AkaiKnight Месяц назад +6

      @@nordgaren2358 then you shouldn’t have said it at all 🤷

    • @nordgaren2358
      @nordgaren2358 Месяц назад +3

      @@AkaiKnight no, I think you're just dense.

    • @nikkehtine
      @nikkehtine Месяц назад +2

      You could also have a bunch of people that are willing to learn Rust or already having experience using it

  • @casadogaspar
    @casadogaspar Месяц назад +13

    People who dislike swift
    1 Apple haters
    2 People that didn´t used it yet, but heard the number 1 talking bad about it.

    • @SimGunther
      @SimGunther Месяц назад

      ​@user-z1u4uYou had me until the Ay EyeDoomerz sentiment 😂

  • @JuanGonzalez-br3wp
    @JuanGonzalez-br3wp Месяц назад +8

    Why are they looking for a new language?

    • @capability-snob
      @capability-snob Месяц назад +4

      We have been writing web browsers in C and C++ for long enough to know it's a massive attack surface.

    • @mdtanveerhasan1453
      @mdtanveerhasan1453 Месяц назад +1

      ​@@capability-snobwhatever happened to carbon

    • @turtlefrog369
      @turtlefrog369 Месяц назад +2

      @@capability-snob attack surface how?

    • @thelvadam5269
      @thelvadam5269 Месяц назад

      @@mdtanveerhasan1453Carbon is still in its crib. The official GitHub repository says it’s “not ready for use.”

    • @moussaadem7933
      @moussaadem7933 Месяц назад

      ​@@turtlefrog369the more code you write the bigger is the surface on which bugs may occur, and web browsers are huge

  • @TrevorDBrown
    @TrevorDBrown Месяц назад +13

    I thought the thumbnail said “Why Larry Bird likes Swift over Rust”

    • @Changelog
      @Changelog  Месяц назад +3

      Now THAT would be an interesting video 🤭

    • @DomainObject
      @DomainObject Месяц назад

      😂

  • @AK-vx4dy
    @AK-vx4dy Месяц назад +4

    Hard for me to belive that with so powerfull type system and powerfull macros it is not possible to encapsulate needed objects.
    But also i underdevloped that they don't want to spend time on building extra plumbing.
    And i agree DOM and (G)UI are two cases when inheritance have positive aspect.

    • @computerfan1079
      @computerfan1079 Месяц назад +3

      If certain things are made with the expectation of multiple layers of inheritance, that is impossible to replicate one-to-one in Rust

    • @AK-vx4dy
      @AK-vx4dy Месяц назад +2

      @@computerfan1079 Yes and no, I don't think is impossible per se, but recreating actual DOM api may be slow or nightmare or both

  • @Noble_Savage
    @Noble_Savage Месяц назад

    Sounds like Beeflang would be the perfect fit for him, but its IDE is very much tied to Windows at the moment.

  • @haterdesaint
    @haterdesaint Месяц назад +1

    why that thumbnail 😢

  • @tui3264
    @tui3264 Месяц назад +1

    Swift was pain to setup in linux last time i tried, hope you get better exprience (I even tried it in hyped tech favourite nix too)

    • @thedeemon
      @thedeemon Месяц назад +1

      It is trivial now. Even comes with LSP server, so editors pick it up automatically.

  • @RomanWeisman
    @RomanWeisman Месяц назад +1

    Interesting conversation.
    Like Chris said: language is like a tool for a specific task.
    I like Swift, but it was designed for ios apps, and I think that the challenges in writing a web browser with it are not worth the trouble: Java and other oo languages, answer the inheritance and memory issues mentioned, and are more suitable as a tool for such task - but, each should walk his own journey I guess.

  • @spinthma
    @spinthma Месяц назад +2

    I love rust, but it has much more boilerplate and deeper understanding of the borrow mechanism, that why I believe Swift is much more productive, i preferred in my projects golang before rust, which has also no OOP ;)

  • @l4rkdono
    @l4rkdono 29 дней назад +2

    Nice, Ladybird will now be MacOS exclusive or with a shitty WIndows port like the Arc browser. And fuck Linux support, who needs that amirite?

    • @arkeynserhayn8370
      @arkeynserhayn8370 3 дня назад

      Have you trid swift on linux in the past several months? It is not like several years before that you had to fight dragons to install it on linux. Things have improved.

  • @isaacpaul239
    @isaacpaul239 Месяц назад +3

    Yea BABY. Lets go Swift!

  • @benoitrousseau4137
    @benoitrousseau4137 Месяц назад +4

    It's interesting to see Rust put under a more critical viewpoint. I know game devs already rejected Rust, noting difficulty with doing fast iteration and lack of OOP features.

    • @mmstick
      @mmstick Месяц назад +7

      Game developers haven't rejected Rust. Have you not seen the Bevy game engine? Tiny Glade recently released on Steam, and it is one of the first games written in Rust.
      ECS is actually more common in game development than OOP, and Rust is particularly well-suited for ECS. Game developers haven't been using Rust only because it lacked the libraries and engines. Though there are ways to use Rust with Unity and Unreal Engine.

    • @turtlefrog369
      @turtlefrog369 Месяц назад +3

      @@mmstick thats not a game, its a demo.i find it hilarious experiencing rust games to crash.

    • @tylerlaprade642
      @tylerlaprade642 Месяц назад

      Mun is Rust with hot reloading for fast iteration

  • @evgix
    @evgix Месяц назад +2

    Use Kotlin

  • @729usbow
    @729usbow Месяц назад +3

    Faded to fail

  • @henrykkaufman1488
    @henrykkaufman1488 Месяц назад +7

    They should use C++ with a guideline which reduces features like they're doing in serious game dev and space tech. Swift removes a lot of possibilities of writing a program, some of which might be needed when you program such feature demanding app like a browser.

    • @SaHaRaSquad
      @SaHaRaSquad Месяц назад +2

      What makes you think that people who've been developing a browser in C++ for years don't consider things like that?

    • @henrykkaufman1488
      @henrykkaufman1488 Месяц назад +4

      @@SaHaRaSquad experience

    • @SaHaRaSquad
      @SaHaRaSquad Месяц назад +1

      @@henrykkaufman1488 Right, because an ex Apple dev who already worked on a browser professionally in the past and created his own desktop OS and browser engine in C++ doesn't have enough experience.

    • @turtlefrog369
      @turtlefrog369 Месяц назад +2

      yep C++ is very versatile, it is a meta language and it requires a paradigm for a project to be succesful. most people dont seem to understand this.

  • @kangmasful
    @kangmasful Месяц назад

    Andreas looks so thin. Is he OK?

  • @burhanbudak6041
    @burhanbudak6041 Месяц назад

    Maybe developing one a Mac is creating defaultism.

  • @DaLoler1
    @DaLoler1 Месяц назад +3

    Why not zig ?

    • @rusi6219
      @rusi6219 Месяц назад +1

      It's not 1.0 yet

    • @gianni50725
      @gianni50725 Месяц назад +1

      besides the fact that zig as a language is highly unstable right now and has various compiler bugs to boot (including broken semantics), does zig even have OOP (i.e. inheritance)? if not, you're just back to square one and it's just a nicer C.
      plus memory safety was a major topic of discussion; zig gets rid of dumb errors and some warts from C, but that's all it guarantees.
      zig is just a meme language right now; it might mature into a real language soon enough but it's not something i would base your company on when it's not 1.0 yet. tigerbeetle and bun are exceptions that i dont think most people should emulate just because some influencer told them zig is so cool and awesome

    • @rusi6219
      @rusi6219 Месяц назад

      @@gianni50725 rust is more of a meme than anything

    • @chrboesch
      @chrboesch Месяц назад

      @@gianni50725 I haven't read such nonsense in a long time. Respect.

  • @HUEHUEUHEPony
    @HUEHUEUHEPony Месяц назад +1

    Is swift open source

    • @sqlexp
      @sqlexp Месяц назад +1

      @@HUEHUEUHEPony -I've never heard of publicly available Swift compiler source code. Apple still considers Swift as proprietary.- Neither Swift nor Rust has a formal specification, and neither is standardized, though there are official manuals/documentations for the languages.

    • @dhombios
      @dhombios Месяц назад +5

      It is open source and cross platform (supports Linux and windows, not just apple operating systems), but SwiftUI is proprietary. There are some projects out there trying to make a cross platform swift gui, though

    • @sqlexp
      @sqlexp Месяц назад +1

      @@dhombios My mistake. It's open source.

    • @dhombios
      @dhombios Месяц назад +1

      @@sqlexp it feels like it isn’t due to the lack of swiftui in other platforms. I hope some day gui will stop being considered a key business feature that needs to be protected, as for a language so oriented towards app development not having a cross platform gui api is an important limitation (the gui could look differently in each platform while having a common api)

    • @sqlexp
      @sqlexp Месяц назад +1

      @@dhombios The main problem with GUI development is in Linux developers. Most Linux programmers mainly use and program for CLI or terminal-based applications when they are not developing libraries. I doubt that even Linus Torvalds could create a decent GUI application on his own if Linux kernel's existence depended on it. It takes specialized developers such as those for GNOME, KDE, other desktop environments, and large distros' owners to build GUI applications, whereas GUI development is very common for Windows and Mac. Could it be that the native Linux GUI APIs are difficult to use? Backward compatibility also seems to be an issue. It just makes companies less willing to invest in porting other OS'es GUI API to Linux. Even the official Linux port of .NET got its entire GUI and graphical libraries (WinForms, WPF, GDI+) omitted.

  • @nordgaren2358
    @nordgaren2358 Месяц назад +3

    "It's not ideal for building a browser"
    Wasn't it literally made for that?

    • @TheRealCornPop
      @TheRealCornPop Месяц назад +2

      It was made as a side project by a Mozilla employee to scratch his own itch. Mozilla didn't commission the creation of a language to build a new browser engine

    • @nordgaren2358
      @nordgaren2358 Месяц назад

      @@TheRealCornPop I never said they commissioned it.

    • @anon_y_mousse
      @anon_y_mousse Месяц назад

      @@nordgaren2358 That's a sea lion. Stop it.

    • @nordgaren2358
      @nordgaren2358 Месяц назад

      @@anon_y_mousse it's not a sea lion. It's literally part of the projects history.

    • @nordgaren2358
      @nordgaren2358 Месяц назад

      @@anon_y_mousse like I literally never said anything about them commissioning it. You can just throw out fallacies just because you can't read.

  • @jwueller
    @jwueller Месяц назад +3

    Swift compile times will kill productivity on a project as big as a browser.

    • @ChrisSchepman
      @ChrisSchepman Месяц назад +5

      c++ compile times are quite bad so it won't be any worse.

    • @migas360
      @migas360 Месяц назад +10

      Yeah, because we all know rust compile times are fast ...

    • @ChrisSchepman
      @ChrisSchepman Месяц назад

      @@migas360 yeah, not good!

    • @jwueller
      @jwueller Месяц назад +1

      @@migas360 I wasn't advocating for rust either.

    • @jwueller
      @jwueller Месяц назад +2

      @@ChrisSchepman You can actually make C++ compile times pretty good if you restrict the features you use. Take some hints from game developers like Mike Acton.

  • @jaysistar2711
    @jaysistar2711 Месяц назад +8

    Languages are not tools; they are mediums. Compilers are tools. Rust does have the Deref trait that allows modeling of inheiritance. I tried and saw the flaws of every "C and C++ replacement" language. Rust is the only 1 that stands a chance to actually replace C. It could replace C++, as well, which would make code much easier to maintain than existing C++ code.

  • @Gruak7
    @Gruak7 Месяц назад

    You should give rust another try and be more patient this time. Embrace composition over inheritance!

  • @derek123wil0
    @derek123wil0 19 дней назад

    Common lisp or carp

  • @edhahaz
    @edhahaz 28 дней назад

    Needs to be a different language to rewrite in Rust.

  • @DaRealCodeBlack
    @DaRealCodeBlack Месяц назад +2

    The way he explained the peoples' experiences who tried the challenges (which Kling presented to them) in Rust, sound as though they were not accomplished Rust developers. Rust is NOT a starter language and requires actually learning it in order to benefit from all of its guarantees. It is a common theme that many, if not most, developers who complain about Rust not being capable of thing A, B, or C, have a fundamental misunderstanding of what Rust is in any in depth manner. I will not use the comments section to rant or to provide a thesis but in the end, all I am saying, don't think that you can just pick Rust up and do complicated things with it when you don't have a concise understanding of the language. It is definitely going to be a deep lesson in frustration and futility, if you approach it in that way. Master your tool, before doing your work.

  • @romangeneral23
    @romangeneral23 Месяц назад +3

    I'll wait for the video where they switch back to C++ and we will just call it a skill issue...

  • @nempk1817
    @nempk1817 Месяц назад +2

    Good luck with swift on a open source browser.

    • @JustATempest
      @JustATempest Месяц назад

      Is there a problem using swift in an open source project?

    • @bomberfish77
      @bomberfish77 Месяц назад

      ⁠@@JustATempestdon't think so, idk what op is smoking

    • @watewmark
      @watewmark 6 дней назад

      @@bomberfish77 Pretty sure they mean it's gonna be full of easily targetable breaches.

    • @arkeynserhayn8370
      @arkeynserhayn8370 3 дня назад

      ​@@watewmark
      Care to provide context?

  • @gljames24
    @gljames24 Месяц назад +2

    Wha!? Rust is not ideal for a browser? Wasn't Rust literally developed for Servo, a browser engine?

    • @chrboesch
      @chrboesch Месяц назад +2

      Yes, but did it ever work? That could also be an aspect.

  • @SimGunther
    @SimGunther Месяц назад +4

    What advantages beyond "I likes it and Lattner LOL" would Swift have over C++?
    May as well go all the way to Rustland if safety in a fast runtime PL is what you're looking for. Swift is simply not the way...

    • @randomizednamme
      @randomizednamme Месяц назад +4

      It has a stellar type system, is focused on compile time safety and predictable performance, has probably a great concurrency system built into the language, it’s very expressive, has C++ interop without all the cruft that C++ has accrued. And you can always revert back to manual memory management as needed.

    • @khai96x
      @khai96x Месяц назад +2

      @@randomizednamme Consistently slow is also predictable performance.

    • @randomizednamme
      @randomizednamme Месяц назад +3

      @@khai96x this isn’t Python we’re taking about here, it’s fast enough for most of the program (or probably the entire thing), and you can opt into manual memory management for those hot paths

  • @sqlexp
    @sqlexp Месяц назад +53

    The Rust fanboys' cope is real. Where Rust fails, the fanboys say languages are just tools. Where Rust is on par with other languages, they put Rust on a pedestal. You can use Rust as much as you can use C because Rust and C have the same paradigm when the borrow checker is not considered. If you are willing to put in the time and effort to write a web browser completely in C, you can do that in Rust, too. That's entirely possible, but that would be just working hard and not smart.

    • @lame_lexem
      @lame_lexem Месяц назад +14

      well I can be named a rust fanboy I really love the language, but I see if your programmers are frustrated with how things are turning while writing in rust that's totally the blame on the rust
      it's a correct course of action to not use it if it isn't fitting the API or the style of programming you're after
      I usually don't think the borrow checker is much of an issue most of the time, here it seems that modeling these APIs is hard as there is no support for OOP style inheritance and whatnot
      I still think implementing a browser in rust has its advantages mainly servo was used for figuring out how to do programming in rust as the first big project written in it

    • @oserodal2702
      @oserodal2702 Месяц назад +3

      @@lame_lexem I think the actual footgun in Rust is not the borrow checker, not even the lifetimes, but the Trait system. A lot of Rust Traits have some degree of assertion that they are exactly what the Trait expects the type to be, and when these contracts are broken, you can have a nonsensical program (see, misfortunate crate). However, I would also posit that it is easier to write incorrect and nonsensical programs in Java, as there are a lot of indirection with types, like the behavior as to what a supertype expects of a subtype. Especially with multiple inheritance and composite interfaces, it can be easier to violate Liskov Substitution Principle.

    • @oserodal2702
      @oserodal2702 Месяц назад

      You know the biggest reason why no one wrote a browser in C?
      It's because it would have been a nightmare to write for. Browsers are behemoths of a computer program, even more so than the operating system. It is even arguable that it would be easier to move away from the Linux kernel than to move away from the dominance of Chromium and Firefox (and their engines). With how much the browser needs to catch up to new API's put forward by TC39 Working Group, the convenience of the type system and semantics of C++ and Rust outweigh the simplicity of C. Imagine trying to bundle together, build, and maintain a humongous codebase approaching the size of the Linux Kernel (where much of the codebase is mostly for drivers, and most users run a subset of the total kernel modules provided by the Linus Torvalds, in contrast to how Firefox and Chromium are single binary/ies).

    • @tobeqz7065
      @tobeqz7065 Месяц назад +10

      ​@@lame_lexemHow dare you have a nuanced opinion on the internet, don't you know you need to fiercely defend one or the other?

    • @lame_lexem
      @lame_lexem Месяц назад +4

      @@oserodal2702 well it's not the trait system's issue what you violated some of it's guarantees
      and it would be silly to make all the traits unsafe to implement
      for example Eq explicitly states that compiler does not check for the correctness and violating trait's property is a logical error and that *unsafe* code shouldn't rely on it (this is actually stilly)
      I guess it would be cool if the compiler could check for this but this is way outside of the scope of rust compiler devs

  • @user-fed-yum
    @user-fed-yum Месяц назад +3

    The cult of rust will be beside themselves. But what about memory protection? But objects are bad. But what do you mean, "dynamic linking"? 🥱

  • @arubaga
    @arubaga Месяц назад +2

    Rust can improve with better GC support and interfacing with other languages. Perhaps dynamic linking as well.

  • @neshkeev
    @neshkeev Месяц назад +2

    Swift is great until you realize that Apple cares so little about backward compatibility since they usually support last 3 to 5 generations of their products, so they don't have to fix language features for long and almost every major release of swift is like a whole new language.
    The community should fork Swift and make it a proper programming language it deserves to be

  • @codeitlikemiley
    @codeitlikemiley Месяц назад +1

    There is no inheritance in rust but there is trait. and traits in rust have a lot of topics. Firefoxis built with rust. Its just skill issue i guess. Its like you wanna use rust but dont know the idiomatic way to do it, not everyone would be able to pick it up. But there are lot of developers that are good with rust but never landed a job opportunity. Either you build your own app or startup with rust or nothing since the are lot of crap job listing requiring rust but never even focus on the mastery of programming language itself, eg web3 , i really dont believe self proclaimed blockchain dev are very good with rust , they know a little to get over with but not to the extent they master the programming language itself.

  • @androth1502
    @androth1502 Месяц назад +22

    stick with c++ or there are going to be tears down the road.

    • @arkeynserhayn8370
      @arkeynserhayn8370 Месяц назад +2

      I'm afraid that would be true.
      Isn't swift garbage collecred? For something size of a browser that should cause performance issues down the road. I wish i could be wrong.

    • @androth1502
      @androth1502 Месяц назад +1

      @@arkeynserhayn8370 it's automatic ref counted. that's not the only problem though. the build environment is chaotic, it's slower in general than c/cpp, more overhead plus a project like this is going to make use of a lot of libraries, all of which are likely written in c/cpp.

    • @therealsimdan
      @therealsimdan Месяц назад

      @@arkeynserhayn8370 Swift is not garbage collected, it uses automatic reference counting. Memory is released in-line, as it is no longer referenced in a deterministic manner. The compiler is able to figure this out, with minimal programmer involvement, aside from a small number of very well understood edge cases.

    • @electric26
      @electric26 Месяц назад +10

      Stick with C++ and there WILL be tears down the road. It's one of the language's many features

    • @nsing323
      @nsing323 Месяц назад

      @@arkeynserhayn8370Swift isn’t garbage collected. What they provide is a automatic reference counting(ARC) which de allocates most(if not all) of the references when their reference count goes to zero. It was also perhaps intended to be a Systems Programming Language but apparently couldn’t prove itself useful in that regards I believe. Overall it’s one of the high performant languages, not at the level of C/C++ but very close. Few of the people who worked on Rust did work on Swift as well (including Graydon Hoare himself) and probably people from Swift worked on Rust as well, if I am not mistaken. Both are LLVM based languages and each language is believed to have influenced lots of features in other language.

  • @CocolinoFan
    @CocolinoFan Месяц назад +4

    Not great :/

  • @gljames24
    @gljames24 Месяц назад +4

    ECS >>> OOP

    • @justadude8716
      @justadude8716 Месяц назад +6

      Cool compression, one problem though. Have you written a browser or shipped a game?

  • @chudchadanstud
    @chudchadanstud Месяц назад +1

    because they're mac users.

  • @swedishpsychopath8795
    @swedishpsychopath8795 Месяц назад +8

    Anything but rust! I agree! I'd even program COBOL over rust.

  • @AllahDoesNotExist
    @AllahDoesNotExist Месяц назад +2

    C# is best

  • @knoopx
    @knoopx Месяц назад +2

    it blows my mind anyone is willing to use a language designed by and for apple. looks like a terrible decision to me, regardless of how good/bad the language is.

  • @saeedgnu
    @saeedgnu Месяц назад +5

    Zig!

    • @tubeincompetence
      @tubeincompetence Месяц назад +2

      I just hope there will bea 1.0 of Zig one day

    • @thedeemon
      @thedeemon Месяц назад +3

      Zig seems like an excellent language to create memory leaks, use-after-free and related memory management problems.

    • @chrboesch
      @chrboesch Месяц назад

      @@thedeemon Sure, and that's a good thing. But if you use the General Purpose Allocator, for example, it won't work. But you can decide for yourself.

  • @metaltyphoon
    @metaltyphoon Месяц назад +1

    At this point C# is as good and more performant than Swift, ca.n be AOT and can work without a GC when needed.

    • @turtlefrog369
      @turtlefrog369 Месяц назад +2

      so can C++.

    • @Justin-wj4yc
      @Justin-wj4yc Месяц назад +1

      GC languages use about 3-5x memory of rust/swift. 2. C# aot is half baked. go crushes it. 3. gc pauses in a browser? bwuahaha

  • @Anhar001
    @Anhar001 Месяц назад +2

    Swift? loool

  • @xamael1989
    @xamael1989 Месяц назад +8

    To be honest rust is horrible super super horrible

    • @gljames24
      @gljames24 Месяц назад +1

      no, just no

    • @Justin-wj4yc
      @Justin-wj4yc Месяц назад

      Found the zealot

    • @xamael1989
      @xamael1989 Месяц назад +1

      @@Justin-wj4yc hahahaha

    • @anon_y_mousse
      @anon_y_mousse Месяц назад

      @@xamael1989 Straight out of their playbook isn't it. They accuse others of what they themselves are.

  • @Nors2Ka
    @Nors2Ka Месяц назад +7

    Not picking Rust? Perfectly understandable. Picking Swift instead??? Deranged.

    • @AK-vx4dy
      @AK-vx4dy Месяц назад +2

      Apple put enormous effort to fast and clean interoperability with C/C++/Objective C so choice maybe not so deranged.

  • @swedishpsychopath8795
    @swedishpsychopath8795 Месяц назад +8

    At 4:48, the insecure passive-aggressive Rust guy with black cap. It is "religious" people like him that destroys software development teams. They get converted to the "Rust is the ONLY religion" and EVERYTHING must be Rust. FFS use Java that was inspired by C++, that in turn was inspired by the norwegian programming language SIMULA that invented OOP. Java has the best of all worlds combined and manages memory for "black cap" guys since they can't handle standard alloc / malloc themselves but needs Rust to hold their hands while programming.

    • @Gruak7
      @Gruak7 Месяц назад +1

      It is religious people like you that destroy software dev teams. They get coverted to the Java is the only religion and everything must be Java even though it is a garbage collected language.

    • @gh0stcloud499
      @gh0stcloud499 Месяц назад +13

      lol what? He just said he likes the language. How is that passive aggressive? He even said that he thinks rust is good at some things but not good at other things 😂

    • @swedishpsychopath8795
      @swedishpsychopath8795 Месяц назад +5

      @@gh0stcloud499 I've seen that kind of person too often to ignore it. What he really says is: "I insist on using Rust on everything unless there is a reason NOT to use Rust", and then he'll make sure to make it with Rust anyway even if it is a good idea or not. He is a deeply fanatic Rust person. He has NEVER made ANYTHING other than Rust programs after he was enrolled into the Rust religion. He isn't fooling anyone. He will use his passive aggressiveness to force others to comply.

    • @AkaiKnight
      @AkaiKnight Месяц назад

      @@swedishpsychopath8795dude you sound crazy as hell, chill out. You don’t know that guy.

    • @khai96x
      @khai96x Месяц назад +3

      Why so emotional?

  • @gustavojoaquin_arch
    @gustavojoaquin_arch Месяц назад +1

    Cringe

  • @JarheadCrayonEater
    @JarheadCrayonEater Месяц назад

    Holy shit, make eye contact.
    Aside, no point was made here.

  • @swedishpsychopath8795
    @swedishpsychopath8795 Месяц назад +2

    At 3:12 "it feels like an Apple product" .... when it in fact IS a programming language made by Apple. Did the bald guy skip his homework before making this video?

    • @kangmasful
      @kangmasful Месяц назад +1

      You don't know Andreas Kling, do you ?

    • @swedishpsychopath8795
      @swedishpsychopath8795 Месяц назад +2

      @@kangmasful No, I'm only judging based on what he said in this video. I'm not obligated to look up all his life story when listening to what he says in a video. If he has a larger point to make then he should connect the dots for us in THIS video.

    • @rozorahk
      @rozorahk Месяц назад +9

      He said that because he knows it’s an Apple product and we/the interviewer also know. He’s affirming our assumptions about an Apple programming language to convey how the language feels (in slight jest). Hope this helps. Reviewing the video with this idea in mind might be a good way to improve your social intuition and reading comprehension. Cheers

    • @swedishpsychopath8795
      @swedishpsychopath8795 Месяц назад +2

      @@rozorahk Don't blame ME for HIS lack of communication skills!

    • @SaHaRaSquad
      @SaHaRaSquad Месяц назад +7

      @@swedishpsychopath8795 Don't blame him for your overly pedantic interpretation.

  • @gustavojoaquin_arch
    @gustavojoaquin_arch Месяц назад

    Btw I use Rust