Comparing 10 programming languages. I built the same app in all of them.

  Рет қаралды 64,117

Tom Delalande

Tom Delalande

Ай бұрын

Many modern programming languages have some great features like null safety, exhaustive switch statements, error handling, strong type systems, immutability, great tooling and good readability and write-ability.
I couldn't decide which language I preferred so I made a TCP server that does some basic file processing in all of them. Using no dependencies where applicable.
I did this using Rust, Go (or Golang), Crystal, Kotlin, Julia, Zig, Nim, Gleam, Swift and Dart.
Just for fun, I gave each language a 1 to 5 score in the categories of tooling, safety, readability and ergonomics.
Just btw this is an incredibly biased video so please don't take anything personally.

Пікірлер: 385
@ridwanulhaque5299
@ridwanulhaque5299 Ай бұрын
"It is a skill issue but an issue nonetheless."
@sebastianpaulis7184
@sebastianpaulis7184 Күн бұрын
I died when I heard him say it
@JosephCatrambone
@JosephCatrambone 26 күн бұрын
Timestamps for folks: 1:00 Golang 3:25 Crystal 5:47 Kotlin 7:33 Swift 9:28 Zig 11:38 Gleam 14:07 Nim 15:30 Dart 16:50 Julia 18:01 Rust
@lpil
@lpil Ай бұрын
Gleam mentioned!!!
@marcellofonseca6065
@marcellofonseca6065 Ай бұрын
Great language! Thank you so much man
@ccriztoff
@ccriztoff Ай бұрын
Beyond cringe 😂 just learn Rust or Go
@jamlie977
@jamlie977 Ай бұрын
@@ccriztoff RUST MENTIONED! LETS GO
@ccriztoff
@ccriztoff Ай бұрын
@@jamlie977 Rusty and Crabpilled
@neociber24
@neociber24 Ай бұрын
I know this guy
@bjbboy71697
@bjbboy71697 Ай бұрын
As zig is pre-1.0, it moves very quickly and the LSP targets the nightly version so it probably didn't work for 0.11. Once it hits 1.0, the idea is to not change the language much and things will settle down a bit. Sorry you had a bad experience with Zig. It really is a great language. If you ever try again, use the nightly!
@tom-delalande
@tom-delalande Ай бұрын
Thanks for the mention. If the tooling does work on nightly that's my mistake. I will definitely try it again, there's so much to like about it.
@arden6725
@arden6725 Ай бұрын
that’s not true, the lsp has tagged builds for each release, including 0.11. As it is the lsp doesn’t work anywhere that comptime is involved, which is pretty much everything
@EightSixx
@EightSixx Ай бұрын
can't wait to see this when zig is at 1.0+ like the other languages on the list.
@nERVEcenter117
@nERVEcenter117 Ай бұрын
I use Nim at work for exactly a kind of use-case it excels in: Fast native-compiled statically-linked data processing that needs to be portable to embedded platforms (my giant program compiles as-is on ARM using musl-libc), with ergonomic Pythonic syntax that ensures you don’t need to worry about memory issues. It can be best described as either: Very fast native-compiled Python, or extremely, unrecognizably ergonomic C++. Take your pick.
@eduardabramovich1216
@eduardabramovich1216 27 күн бұрын
Did you learn it just by reading the docs?
@sp.n7401
@sp.n7401 Ай бұрын
Nim starts getting good when you look into metaprogramming. See some of the DSL libraries like Jester or HappyX. Also its ability to compile into C, C++, or JS makes it good for pretty much any domain. Also note Nim's memory management model nowadays isnt really a traditional GC, but the memory is automatically managed at compiletime.
@tom-delalande
@tom-delalande Ай бұрын
It seems like need to put some more dedicated time into Nim. Thanks for the advice
@blaisepascal3905
@blaisepascal3905 Ай бұрын
Julia and Nim, such wonderful but underrated languages. Both in my top 3!
@patrickmoehrke4982
@patrickmoehrke4982 Ай бұрын
What is your other top 3?
@blaisepascal3905
@blaisepascal3905 Ай бұрын
@@patrickmoehrke4982 ok, don't freak out. It's R, I am a researcher. And R do the job really well.
@patrickmoehrke4982
@patrickmoehrke4982 Ай бұрын
@@blaisepascal3905 Haha I also use R! It doesn't get enough credit outside statistics and academia.
@spacelem
@spacelem Ай бұрын
@@blaisepascal3905 same, I've been working in R for the last few years and it's wonderful for stats and plotting, but I was able to get some really complex genetic epidemiological modelling done with Julia pre-2020 which R would have choked on. Two languages that seem to scare people off, but are so nice to use once you get the hang of them.
@InfiniteQuest86
@InfiniteQuest86 Ай бұрын
Yeah he basically ignored all the real use cases for Julia which makes it seem like a glorified bash. But try doing complicated math in bash and you'll quickly see where Julia excels.
@b5matt
@b5matt Ай бұрын
Nim also supports checked exceptions btw. And the default GC is refcounting like swift.
@Speykious
@Speykious Ай бұрын
My job literally involves Java 8 and JavaScript... I got called out so hard Sike! We use more and more Rust now because of me >:D
@residual-entropy
@residual-entropy Ай бұрын
lol I would be so happy to have a job writing Rust
@owndampu1731
@owndampu1731 Ай бұрын
could be worse, my job is mostly Matlab/Simulink code generation. But I am also introducing more tooling in rust so at least thats nice
@residual-entropy
@residual-entropy Ай бұрын
@@owndampu1731 I despise matlab, although someone in the research lab who I work with has to write Fortran lol.
@dotchris1111
@dotchris1111 Ай бұрын
C89 and some pre-C89 and Java 8
@arandomzy
@arandomzy 16 күн бұрын
Damn sucks that you downgraded!!
@virusblitz
@virusblitz Ай бұрын
Very agreeable takes, thanks for your efforts!
@rakaboy1619
@rakaboy1619 Ай бұрын
Zig fan here. The reason why you struggled so much with Zig might be this language's innate low-levelness. Sometimes writing Zig feels like writing LLVM IR, and for an untrained hand this is almost a chore. Tho it gets easier over time. Also comptime comptime comptime. It is incredible, and i get immeasurable high when it works the way i want. You can pretty much have every single feature of any language, have it as a zero-runtime, and have it not being a macro. This is nothing but witchery, atleast it feels like it.
@AGAU1022
@AGAU1022 Ай бұрын
He didn't struggle as much with Rust though.
@rakaboy1619
@rakaboy1619 Ай бұрын
@@AGAU1022 i dont think Rust is nearly as low level as Zig.
@beeplove7
@beeplove7 Ай бұрын
​@@AGAU1022 Zig is pre 1.0, it is clearly not stable for now. Things move fast. People are bound to face issues but still many are adopting it. While Rust has been around for a while now. The creator of zig was frustrated to write his program in C++/Rust/C so he started creating zig. So can't really complain about a premature language
@androth1502
@androth1502 Ай бұрын
i find it odd that he had a hard time with zig, but no problem with rust.
@Darkev77
@Darkev77 Ай бұрын
@@androth1502 so true lol, Rust group bias I guess
@billygnosis
@billygnosis 22 күн бұрын
Great video! I would like to see a follow-up video analyzing Elixir, F#, Haskell, PureScript, Clojure, and OCaml.
@Atmos41
@Atmos41 Ай бұрын
I don't really understand why Dart got such a low score. It feels like it gets a lot of things right, and I had a blast using it to maintain a production Flutter app. It feels like your grades don't align with your feedback :D
@AGAU1022
@AGAU1022 Ай бұрын
Dart got a high score and came in fourth.
@JavierGuerra_g
@JavierGuerra_g Ай бұрын
he actually didn't use the nice parts of Dart. the `..` operator is pure genius for initialisation, making dependency injection work without any clunky library or "bag of globals". the automatic parameters make robust initialisators look like magic. like with Zig, it requires more than just a glance to appreciate. I bet he had previous experience with some of the most highly rated ones, which helped him find the best parts of those.
@gaxkiller
@gaxkiller Ай бұрын
I use dart since 5 years and I love it, I think he treated dart fairly. There is still stuff we want and don't have yet in dart. Static metaprograming (it is coming very soon), error as value not exception (no plan to change this at all, so you have to import fp library like fpdart and use either type). For some reason they don't want to let us configure line length on a per project basis, and default line length is 80... I find the pattern matching syntax to be a bit confusing (particularly when using switch expression) but it might be me I don't know. Except that, the toolings is just awesome. I use flutter (so dart) at work because I in charge of the mobile team, but I have to work with python for backend, I feel so miserable when I have to use python, the tooling is horrible, the language is horrible, nothing works, it is probably the worst language I ever used.
@gaxkiller
@gaxkiller Ай бұрын
@@JavierGuerra_g It is the second time someone mentioned the '..' operator as an exceptional feature of dart and I don't get it, if you embrace immutability you cannot use this operator 99 percent of the time when initialising a class, or I am missing something. Could you also elaborate how it helps for Dependency injection please? Always eager to learn new stuff about this language I love, even if I would feel dumb having missed incredible feature usage for so long
@JavierGuerra_g
@JavierGuerra_g Ай бұрын
@@gaxkiller there's so much to be said about how DI is great when you don't use a library and so disastrous when you do. and for most languages, the syntax gets in the way, making complex initialisations either complex and hard to read, or a whole API in itself. to make that last option somewhat more palatable, somebody invented "fluent APIs" which are nice, but tedious to implement, and create other limitations. in flutter, the '..' operator gives all the benefits of fluent without having to create all those initialiser methods, and thus you get those multi-line, deeply nested, but nicely-indented and very readable initialisation stanzas, where you can do all the DI you wish.
@Danielo515
@Danielo515 Ай бұрын
Thank you man, this was very valuable
@SnowTheParrot
@SnowTheParrot Ай бұрын
Great video and thanks for trying all of these languages
@lucasmsoares96
@lucasmsoares96 Ай бұрын
You do an excellent job. All that was left to do was take into account the quantity and maturity of the library ecosystem.
@Vogon42
@Vogon42 18 күн бұрын
I would have added performance as a criteria.
@Leao_da_Montanha
@Leao_da_Montanha Ай бұрын
hey tom I was thinking of this video and I just had the idea that if you extend those same examples trying to getting deeper into optimization for them, you would dive deeper into the languages, review what they provide for performance and so on. Lets be real that is the type of thing that everyone subscribed here would watch more than an hour easily. It would be epic, all of luck!
@Sel178
@Sel178 Ай бұрын
Nice comparison! Good job. Try also OCaml next time:) I'm sure you will enjoy it as it's like a rust with GC.
@maximmodestov1280
@maximmodestov1280 Ай бұрын
I'm confused. You are saying that safety is important for you, things like exhaustive switch statements, immutability, and null-safety. And then you give Go and Kotlin the same score 3. Even though Kotlin has many of the safety features mentioned while Go doesn't.
@jamlie977
@jamlie977 Ай бұрын
same, he said he dislikes Go's error handling but said gleam had it really good, it's almost as verbose as Go's way
@TJackson736
@TJackson736 Ай бұрын
The man explains why - he dislikes try catch and prefers errors as values. He is lazy and will ignore exceptions while writing code without the compiler complaining. Go enforces error handling, and Kotlin uses unchecked exceptions.
@jamlie977
@jamlie977 Ай бұрын
@@TJackson736 the toInt method for strings in kotlin may throw an exception yet he praised it even though it doesn't tell you that it's may throw an exception since it uses java.lang.Integer.parseInt under the hood, it's really weird how he hates unchecked exceptions but not always
@AndrewBrownK
@AndrewBrownK Ай бұрын
it would be much more difficult to compare if allowing dependencies, he might like the result type from ArrowKt
@ccriztoff
@ccriztoff Ай бұрын
Go is simply better though
@CristianMolina
@CristianMolina Ай бұрын
Thanks for taking the time to do all this coding and evaluation. It's very nice to see the implementation in diff. languages. IMHO, Rust code is the most unreadable, by far.
@YT.Nikolay
@YT.Nikolay 6 күн бұрын
ChatGPT can convert the given code to any language that existed before 2019 ;)
@danstoian7721
@danstoian7721 12 күн бұрын
9:08 Sad truth😔I feel Swift is such a beautiful language with so much potential. And while it is open-source and Apple is doing something, it's not that widely adopted because: 1) Still needs a good cross-platform IDE 2) Apple Documentation is terrible 3) It lacks APIs for so many general-purpose things
@Flourish38
@Flourish38 Ай бұрын
Julia is my favorite language! I think you basically correctly described it, it's excellent for REPL programming and a few other things, but it's not the right choice for most projects. I especially like how you put it at rock-bottom on the safety scale! That is exactly correct, there are very few languages that will let you overwrite almost everything in the language, even to the point where there isn't really anything you can do but restart your REPL. It doesn't come up often, but when you want it, it's nice to have such a ridiculous brute-force solution. In my opinion, it is the perfect prototyping language. It lets you focus on exactly the things you care about specifying while ignoring ALL the rest, whether that be expressive types, data structures, performance (to an astonishing degree, actually), even concurrency... everything except for correctness. If you can write it in less than 1000 lines of code, and it doesn't have to be perfect, then you're going to have a good time with Julia. Also, the array broadcast notation makes me feel like I have superpowers. Working with collections in Julia is so freeing compared to everything else I've used. But yeah. Rewriting yet another Julia program in Rust right now (this time, for WASM support) :P
@darkfllame
@darkfllame 24 күн бұрын
11:17 on the top, there is the compile command, below is in what module the error occured, below again is the error, basically, in zig, you can only access active field of unions, there are also tagged union which you can use switch on them. here you try to access "Pointer" while the union field "Struct" was active. what you can do is check if the field is active: if (taggedUnion == .Field) { . . . } or use a switch statement: switch (taggedUnion) { . . . }
@qwfp
@qwfp Ай бұрын
I appreciate you being clear and upfront about how you'll be ranking the languages. Also, you might enjoy Roc! Although TCP server might be too low-level (in Roc those things are usually handled by platfroms), so I would recommend making something else with it
@Darkev77
@Darkev77 Ай бұрын
Great video and overview, but Zig is really unfairly rated.
@munchymanjaro9070
@munchymanjaro9070 Ай бұрын
Pretty sure idiomatic Kotlin error handling is much closer to Rust then Java. You would use Result type to return error as value and throw for panic. I dont really know tho, I am in the process of learning Kotlin. Overall Kotlin seems like an extremely pragmatic yet expressive language, with a module system to avoid common oop pitfalls. With the mutliplatform enetring stability, it just might be a killer app of Kotlin ecosystem.
@MarcelRiegler
@MarcelRiegler Ай бұрын
The MAJOR issue with Kotlin is exactly that there is no idiomatic error handling. The official Result Type was only added after years, and they threw out checked exceptions without giving us a good, standard library alternative. Meaning, everyone did their own thing. You also lack convenience of a "try-catch"-like structure for Result types, meaning you end up having to manually check every Result.
@neronim0
@neronim0 15 күн бұрын
Didn't understand a word you said. Video is great tho. Am in awe of your programming capabilities ^^
@michaellatta
@michaellatta Ай бұрын
I like swift, the keyword arguments in particular. But, the rust ownership model and errors as results/values are the best.
@cheesybrik9073
@cheesybrik9073 28 күн бұрын
I think you should look into nim more. While I do agree it has some strange stolen features that don’t feel like they mesh well together. It’s actively developed and isn’t afraid to add new patterns. Honestly I would love to see you’re criticisms more in the nim community and I would love if you got involved.
@jonjimihendrix
@jonjimihendrix 14 күн бұрын
First 10 seconds had me dying laughing. Also subscribing. Love the deadpan humor. I’m Rust/Go as situation dictates. I love rewriting Python in Rust and running comparative benchmarks. It’s stupid how slow Python is. Also minor maintenance of legacy Java and C++.
@devflo
@devflo Ай бұрын
Thank you for adding gleam🎉🎉
@lazyh0rse
@lazyh0rse Ай бұрын
One thing I did not like, is how readability is being rated? For me, readability is the ability to read a code from someone else and know what it does. Why for example, rust with it's vast syntax is more readable than go? I don't get the justification. If I write code in golang, I will know what it do instantly, if I show it to anyone, they will know exactly what it does without effort. I wouldn't be so sure of that in the case of rust. Some libraries in rust is unreadable compared to others. Everyone have their own writing styles. It should be less readable than go.
@AGAU1022
@AGAU1022 Ай бұрын
I was a bit confused about the readability and ergonomics ratings for Nim as well. I get that Nim is unsafe but it seems pretty readable and ergonomic and had the fewest lines of code.
@jamlie977
@jamlie977 Ай бұрын
readability is a matter of familiarity, I don't think it can be rated since it would be unfair, for example, i write Go more than Rust and i never wrote Gleam, therefore gleam is not as readable to me compared to rust and go and rust is not as readable as go, it's unfair to rank it
@lazyh0rse
@lazyh0rse Ай бұрын
@jamlie977 no body said x is unreadable, but it should be a meteric of how much experience it requires. A code written by a senior go engineer will be readable for a junior dev. But rust won't.
@jamlie977
@jamlie977 Ай бұрын
@@lazyh0rse i get you, that's why i said it's unfair for him to rank them based on readability as it's a matter of familiarity, if he doesn't have much experience with a language he would assume it's not as readable which might be false
@AGAU1022
@AGAU1022 Ай бұрын
​​​​​​@@jamlie977 It's unfair to rank it by your own subjective ability to read the language. But there is objectively readability in the sense that some languages are easier to learn when adjusting for that bias, like for beginners who have no experience in any language, and juniors with no experience in either language. A language is objectively more readable (on average when including beginners) when it more closely resembles natural language expressions of the same logic, more real words and natural grammar, less esoteric abbreviations, esoteric symbol use, and bloated non-grammatical boilerplate to declare things that should just be a default. Basically: how easily can someone without experience read it out loud in a way that accurately conveys the code.
@danielkurz7806
@danielkurz7806 Ай бұрын
great video! It'd be interesting to compare the LOC it took in each language
@tom-delalande
@tom-delalande Ай бұрын
Thanks! Great idea. Here are the lines of code (including any blank lines): Nim - 150 Kotlin - 163 Julia - 170 Swift - 180 (with dependencies) Crystal - 187 Dart - 190 Go - 264 Gleam - 278 (with dependencies) Zig - 338 Rust - 354 Anecdotally, Go and Dart definitely felt the quickest to write and Zig took me the longest. Interesting that I enjoyed some of the verbose languages. I wonder if that's just Stockholm syndrome and less lines is actually just easier
@danielkurz7806
@danielkurz7806 Ай бұрын
​@@tom-delalande Thanks! Yeah very interesting, especially how few LOC nim took. I guess some of it could be attributed to "skill issues" :D But also more LOC could mean more resilient code because of error handling So yeah very cool
@gaxkiller
@gaxkiller Ай бұрын
LOC is the most useless metric. You can write s**t very quick in python, with zero error reported by your IDE and zero error handling. But then you would need 123124124 LOC of unit test to be sure that true = true
@stretch8390
@stretch8390 27 күн бұрын
Nice vid, informative: would love to see this across different tasks. Rust being a joy to read is a bit on the nose however.
@mikkelens
@mikkelens 19 күн бұрын
Not sure what you mean about that last part. Is rust really bad to read? Compared to what?
@stretch8390
@stretch8390 19 күн бұрын
@@mikkelens obviously elements of personal preference, but Rust is well known for correctness not for being a joy to read. Ruby is a joy to read, APL is a nightmare, and Rust lies somewhere in between. My 2c.
@opposite342
@opposite342 2 күн бұрын
​​​@@mikkelens Rust is basically impossible to read if you are newer to the language, especially when it introduces new concepts like borrowing and lifetimes. Meanwhile, most programmers can just see Go and understand what it does even if they barely use the language. Other than that, it's preference. I come from a Python background, so I found nim to be easy for me to read while zig being the hardest in these examples. Other people may prefer verbose language with more information, or c-style curly braces. It's all what you grown familiar with. However, if you remove that, my point still stands that Go is probably the easiest in general for anyone to read here.
@Luigi931
@Luigi931 14 күн бұрын
Thanks for this video! 👍💯
@veritatas678
@veritatas678 Ай бұрын
Excellent video. That was fast and concieces
@eduardabramovich1216
@eduardabramovich1216 Ай бұрын
Nim is way, way, waaaaaaaayyyyy faster than Python, so of course there is an advantage. Regarding Nim's identity, I've heard people saying that and I don't understand the point. What's python's identity? Everything, it's used for everything. Web, desktop, data analysis, data engineering, scientific dev, scripting, sec tools... But nobody complains about that.
@4idenn
@4idenn Ай бұрын
Tbf these days I think Nim's identity is "the hacking language"
@pnk4996
@pnk4996 Ай бұрын
Pythons identity is that it’s the most mid language ever
@SirRichard94
@SirRichard94 Ай бұрын
And that's why I don't like either
@gaxkiller
@gaxkiller Ай бұрын
Well, taking python as a reference speaks a lot, if you eat s**t everyday, dirt might taste good to you
@johndoe7017
@johndoe7017 Ай бұрын
Yeah but that’s great, because you can learn one language and do anything you want. It may not be fast but being able to do anything is quite convenient
@vladimirkraus1438
@vladimirkraus1438 Ай бұрын
Very interesting video. Just an idea for next similar ones: you should also compare these with "classical" languages that everyone has to use at everyday work such as Java, JavaScript, Python or C#... This would give the insight about the language evolution from the classics to the modern ones. Btw. I am a Kotlin fan. As I do not mind using JetBrains tooling (which is perfect!) I would give it much more points in tooling category which would make it almost a winner. :) I was surprised by Gleam, I have never heard of it... but I will definitely find out more.
@ccriztoff
@ccriztoff Ай бұрын
Java, JavaScript and Python some of the worst shit 😂
@gaxkiller
@gaxkiller Ай бұрын
@@ccriztoff Yes, I understand why he didn't even loose time trying them >
@Akronymus_
@Akronymus_ 5 күн бұрын
With that feature list at the start, I was thinking f# would be a perfect match
@thavith
@thavith 15 күн бұрын
I really want to use Rust or Swift (not heard of Gleam so will check that out). Having said that, I love JS for the work I do (Node / front), but tend to only use the ES6+ stuff (don't have to maintain older 'smelly' code so much). I should build a Swift version of Node (I am sure it exists out there somewhere)
@code_report
@code_report 18 күн бұрын
I came across this video in the r/gleamlang subreddit. Fantastic work : ) I think Gleam might be my new favorite non-array language.
@JayAdamsTecnology
@JayAdamsTecnology Ай бұрын
Swift’s sourcekit lsp works with dependencies after you build the whole project, because it does not have a background indexing unfortunately I use it daily with neovim, it’s still not perfect (for example renaming does not work and you have to rebuild the project sometimes for it to be able to use dependencies) but it’s good and definitely better than using an Xcode If you have any issues with setting it up with vim, I’ll be happy to help
@tom-delalande
@tom-delalande Ай бұрын
Thanks for the help, I did rebuild the whole project. I think something went wrong with my tool-chain where the one used in the CLI was different to the one used by the LSP. I reinstalled Xcode from scratch and the whole toolchain. But I still couldn't get it working. I think this issue was a weird combination of Sonoma + something running on Rosetta + Xcode conflicting with the toolchain. I definitely will keep trying to fix it because I want to keep using Swift
@NamanGoel34
@NamanGoel34 23 күн бұрын
@@tom-delalandeAlso a correction: Swift doesn’t have exceptions. It has errors as values. But it has syntax sugar to make it look like exceptions. It has a similar syntax sugar around it’s Maybe type by giving you a first-class nullable type.
@NamanGoel34
@NamanGoel34 23 күн бұрын
@@tom-delalandeAnd a correction for what felt like an implicit assumption: Swift does not have a garbage collector. It uses automatic reference counting by default, and you can opt into some ownership features or unsafe manual pointers for performance.
@NamanGoel34
@NamanGoel34 23 күн бұрын
TLDR; I would argue Swift has the same level of safety as Rust. This was not true for multi-threaded swift until recently. Since v5.10, there is a flag for strict concurrency checking.
@elau1004
@elau1004 19 күн бұрын
Love your review. Could do video on V Lang? Thx
@karolkurek9201
@karolkurek9201 6 күн бұрын
I really love V Lang
@niomeda
@niomeda Ай бұрын
21:17 Bro insulted me without even knowing me 😀
@mayatrash
@mayatrash Ай бұрын
Im forever a Julia boi. I just love it. It is absolutely perfect. But maybe that’s because I’m a physicist. But it’s just a breeze.
@blaisepascal3905
@blaisepascal3905 Ай бұрын
Indeed, the fact that you are a scientist may be a bias... but, Julia is just amazing like you said!
@SystemAlchemist
@SystemAlchemist Ай бұрын
As a physicist as well as a software engineer, I entirely agree. Julia just has the best syntax.
@stretch8390
@stretch8390 19 күн бұрын
@@SystemAlchemist begin and end are two words that don't do it for me personally.
@captainnoyaux
@captainnoyaux Ай бұрын
Cool video, you could try Rescript or more FP oriented languages to see if it's more to your liking
@tom-delalande
@tom-delalande Ай бұрын
I've been thinking about Rescript a lot, I'm tossing between trying to learn either that or Elm.
@captainnoyaux
@captainnoyaux Ай бұрын
@@tom-delalande both are awesome, I believe there is more people using Rescript nowadays thought (it might not be a valid criteria for you)
@Weathercold
@Weathercold Ай бұрын
⁠​⁠​⁠@@tom-delalandeyou should try Clojure, though you might not like it since it’s dynamic
@diadetediotedio6918
@diadetediotedio6918 27 күн бұрын
19:50 Just a quick note, because I think you borrowed that from Blow (pun intended), but I also think while it can take "10% more time to write" (even when this statement is so blank) it also can make your code "10% or more easier to write bug-free" which will save you time. So I think it is a net gain generally, but this depends on the scope and the project.
@cameronleebell97
@cameronleebell97 7 күн бұрын
Damn that closing statement hits close to home
@NoahNobody
@NoahNobody Ай бұрын
Great choice of languages. I personally would have added C# and Elixir. I would love to see a followup video with the languages people have mentioned in the comments. I've been a php dev for a while, so I've been looking for a new language to pick up because I'm a bit bored. I was originally attracted to rust and gleam, but they were proving to be a bit of a challenge, so I went with Go because it seems to be learnable and popular. One day though I will pick up Rust or Gleam.
@gaxkiller
@gaxkiller Ай бұрын
I was very interested in Elixir too, then I saw it is not statically typed. From personal experience, the developer experience regarding dynamic language is subpar vs statically typed language so I did not bother investing time in it. There are adding type step by step apparently but it did not solve the problem for other dynamic languages that did that.
@Varpie
@Varpie 10 күн бұрын
I wish Gleam had an option to compile into a static binary, instead of always requiring the runtime. I find myself moving more and more towards container-based deployment solutions, and while there are base images with a runtime, it bothers me to rely on heavier bases and have the runtime shipped with every container I have. I think that's something C# understands well, in order to have .NET 8 reliable for cloud native solutions they added the Native AOT feature, and I wish other languages relying on a runtime did the same.
@dampfwatze
@dampfwatze 17 күн бұрын
I like Dart the most! It has such clean and logical language features, it just feels nice to write! It doesn't have stupid pitfalls and shortcommings. Also, since it has a big Company behind it, it evolvs very rapidly and gets good improvenents regularly! Since version 3 it got big improvements on the functional side, with pattern matching and exhaustive switch statements. And it has null safety since version 2.
@olafschluter706
@olafschluter706 15 күн бұрын
The problem with dart is tooling. You can write a dart executable, but you cannot write a library with C ABI linkage (in fact you cannot write a library and ship it in binary form at all). Another drawback is that it is by nature a programming language for single-threaded applications. It has async/await, but running multiple threads using the dart standard features is awful. It's biggest plus in my eyes: when you come from Java, Dart is a weekend job to learn. It's a less verbose version of Java with Null-Safety and free-standing functions and variables. It does a pretty good job to support the Flutter Frontend Framework, where multi-threading isn't needed that much, but asynchronous operations are all over the place.
@dampfwatze
@dampfwatze 15 күн бұрын
@@olafschluter706 Yes, that you cannot bind C libraries easily is a big problem that just did not get enough attention, also because it works in Flutter and Flutter was the primary focus for a long time. But the team behind Dart is actively working on a solution, it is called native assets and it is behind a experimental flag at the moment. Of course, that it does not support multi threading easily is a drawback. Though, the use of isolates encourages the use of message passing to pass data, which is often thought to be a safer method to handle data, than for example a shared state. But I do use Dart very often and I rarely find myself actually spawning additional isolates, because for the use cases Dart is designed for, it is often just not needed. Partly because async/await works so well. Of course for use cases like Webservers it would be beneficial to implement multithreading and I think a well designed Framework could very well work around Darts limitations. And comparing to other languages, it is not worse than for example Node.js (it works essentially the same), which is one of the primary Webserver runtimes today... Only God knows why... And for example Python cannot do any real multithreading at the moment, because of the GIL... Overall I think Dart has great potential to replace many current solutions like Javascript (in front and backend), Python (as a scripting language, for Webservers, or even for algebraic and ML use cases), Java, C# and probably more! It is just, that the Frameworks are missing...
@olafschluter706
@olafschluter706 15 күн бұрын
swift vscode: for the time being it is necessary to build the swift package at least once to make sourcekit-lsp recognizing and processing package imports correctly. Other than that, vscode is the better IDE than Xcode for using Swift unless you are really into developing apps for Apple's ecosystem, where you depend on all the Xcode features supporting UI and other Kits from Apple.
@alomac8976
@alomac8976 Ай бұрын
You might(or might not) like D or Odin
@tom-delalande
@tom-delalande Ай бұрын
Thank you for the recommendation
@alomac8976
@alomac8976 Ай бұрын
@@tom-delalande yeah. Np
@gavr_sas
@gavr_sas 24 күн бұрын
can you add link to the repo, its very usable to learn some of this langs via another that you already know
@BlueIsLeet
@BlueIsLeet Ай бұрын
For Go you should have used scanner instead of reading the file and splitting by line
@PySnek
@PySnek 28 күн бұрын
Nim needs more love! It makes me so sad that it's still not used for more important projects.
@bishbashboshjt
@bishbashboshjt Ай бұрын
I think you would like the collections library in Scala
@ariaden
@ariaden 14 күн бұрын
And then there is a third group, array (and/or stack) languages, like Uiua. The most elegant solutions, assuming your inputs are integer sequences copy-pasted into the interpreter.
@thedeemon
@thedeemon Ай бұрын
With your preferred features, I guess F#, Haskell and OCaml could shine here.
@mikkelens
@mikkelens 19 күн бұрын
I’d like all those way more if they weren’t GC’d. I want to try haskell just bc its haskell, but if I wanted to write something in a GC’d language I think I’d try Gleam instead
@mikkelens
@mikkelens 19 күн бұрын
I’m implying here that 1) none of these could ever be compile time gc’d like rust and 2) I think runtime, stop-the-world GC is kind of unnecessary and bad, and 3) I see little reason to adopt a GC’d language in spite of this
@thedeemon
@thedeemon 19 күн бұрын
@@mikkelens If you google "Oxidizing OCaml" you'll find some interesting work going on in OCaml moving it closer to Rust's memory ownership, borrowing etc. But I don't know any details on the status and progress. Regardless, all mentioned languages have modern generational & incremental GCs with very short pauses (OCaml was quite famous for its good GC on a single core). Unless you make video games or something like them, the fear of GC might be rather irrational. Gleam might enjoy Erlang's thread-local GC that doesn't stop the whole world, but it's still just interpreted bytecode, so overall performance of actual code might be much worse than in mentioned languages.
@charlesbcraig
@charlesbcraig 15 күн бұрын
I’m most excited about Gleam. Feels like the love child of Rust and F#
@willi1978
@willi1978 16 күн бұрын
which program used least time to run? guessing rust and zig are pretty fast
@cubemaster1298
@cubemaster1298 18 күн бұрын
I used a lot of Zig lately so I might be bias but giving one on tooling is questionable. Setting up a project with zig build is so much cleaner than using CMake, Make, pkgconf or any other external tool bs when I have to use C or C++. Also the LSP gives a tutorial even for Sublime Text on how to set it up even though it's not the most used editor. The error messages most of time are much more readable than what you get when a C++ template code fails.
@gusryan
@gusryan 16 сағат бұрын
Do you have the source for the Rust project available online?
@eduardabramovich1216
@eduardabramovich1216 Ай бұрын
You are missing one language that aims to be a C-Cpp alternative: Odin, it looks a lot like Go, but with custom allocators for memory management.
@flamingwoodz
@flamingwoodz Ай бұрын
Gleam needs more packages and then I will use it all the time. But it's new so that should happen as more start to use it.
@iaconst4.0
@iaconst4.0 2 күн бұрын
A question, Which is the fastest ??
@BboyKeny
@BboyKeny Ай бұрын
I like mundane programming for work, fun programming for side projects
@magemor7827
@magemor7827 Ай бұрын
Well, a 20+ minutes vidéo I actually watched from beginning to end, no fast forward, no need to rewind. That's become so f'in rare these days! Clear sections of the video where you setup your goal, testing protocol, evaluation criterias. Then doing it with examplification, biased opinions and objective comments both for each. Then a summary and an acknowlegement of your biases and a humble recommandation of which to choose in your opinion depending on your preferences. Rust only got an 18/20, but you get a 20/20 note as far as I'm concerned! *DING* Subscribed
@opposite342
@opposite342 2 күн бұрын
"Nim is the least opinionated language" - I agree. Been using it for a bit. On the surface it's a statically typed python with even more stuffs like metaprogramming capabilities etc etc. I like the freedom but I also appreciate what other languages have to offer in this list.
@ironuckles
@ironuckles 13 күн бұрын
Weird that performance characteristics or build artifact size didn't factor into your grade for each language. Regardless, pretty cool, thanks!
@ErikBongers
@ErikBongers 12 күн бұрын
Looking at these languages, I've been thinking about the "defer" keyword. Good or bad? Initially I thought, wow, good! Acquisition and release of resources next to each other. But then I realized that this code is non-linear or non-chronological (if you look at the example code in the go tour, it's embarrassingly obvious). In addition to that, it doesn't enforce releasing resources. You could still forget it and leak memory. Ok...what if we reverse it? By default we release the resource when leaving the code block (scope), and if we want to keep it we have to be explicit about it with some keyword, say..."keep". But the compiler will not know what function to call when releasing a resource. So, that seems a dead end... 2nd try: what if functions that return allocated resources have a return type qualifier "resource". When calling such a function, you are required to call a "release" function to release the resource. But still the compiler needs to know what functions qualifies as a release function... And what if we want to keep the resource open after leaving the code block? Ah, yes, the "keep" keyword... But once you use the "keep" keyword, you're on your own...so, once again, nothing is enforced...your language isn't safer... Screw it, I'm sticking with Rust. It's a toxic relationship, but I need the Borrow Checker in my life.
@Varpie
@Varpie 10 күн бұрын
defer is typically used with allocators, you'd define the allocator and defer at the same level, so it stays readable. It's non-linear, but a lot of code is, when calling code between functions it's not rare to go back up in the document. It's mostly a habit to take: at the start of your code, you have the allocation specific things, then you have the logic, rather than allocation, logic and in the middle of it some deallocation.
@a314
@a314 13 күн бұрын
Please add chapters to navigate
@maksymiliank5135
@maksymiliank5135 Ай бұрын
11:23 zig has union types which are actually tagged unions under the hood. If you try to access a member of an union which is not active it will result in an error. You have to use a switch statement (an if statement would probably work too) to check which union member is active and only then you can use its payload. Example: const Event = union { key_down: i32, mouse_moved: struct { x: i32, y: i32 }, }; var event = Event{ .key_down = 65 }; // 'a' button pressed, .key_down is 'active', accessing any other union field is an error switch (event) { .key_down => |key_code| { // do something with the keycode }, .mouse_moved => |pos| { // do something with the mouse position }, }
@gaxkiller
@gaxkiller Ай бұрын
That is called exhaustive pattern matching if you are interested about the name :) very good feature more and more language start to add or already have. Of course python is not one of those one lol
@maksymiliank5135
@maksymiliank5135 Ай бұрын
@@gaxkiller yes exhaustive pattern matching is related to tagged unions but the error was specifically because of the access of inactive union member. Zig allows you to access a union field if it is active without pattern matching
@fredesch3158
@fredesch3158 Ай бұрын
@@gaxkiller That's not exhaustive pattern matching, that's accessing the wrong field of the union.
@gaxkiller
@gaxkiller Ай бұрын
@@fredesch3158 This problem does not exists in good language, not aware of that
@fredesch3158
@fredesch3158 Ай бұрын
@@gaxkiller What? It definitely does, if you try to access the wrong field from a union this is a standard error? You smoking?
@Septumsempra8818
@Septumsempra8818 Ай бұрын
How would you make a cross-platform app? I need an android and iOS app, but only have time to learn 1 new language. Any suggestions? So far it's react native or flutter
@thedeemon
@thedeemon Ай бұрын
Flutter seems like a good choice here.
@tom-delalande
@tom-delalande Ай бұрын
Kotlin also let’s you do this with Kotlin Compose. It’s in Beta for iOS but it looks very promising
@gaxkiller
@gaxkiller Ай бұрын
Using Flutter for 5 years now, very pleasant experience (it uses dart in case you don't know). Just don't go with react native.
@cryogensxu
@cryogensxu 23 күн бұрын
Kotlin if you're not scared of experimental WASM for web. Flutter if you want some footshooting
@a0um
@a0um 17 күн бұрын
I think 04:14 as well as other reasons justify Go’s approach to error handling.
@thomasgeorge5261
@thomasgeorge5261 Ай бұрын
Crystal not requiring brackets when calling a function is actually not a good thing - it means that passing a function as an argument into another function is harder, because by default the function will be called and the value passed in, so you need a workaround (as with Ruby). Crystal is not like Haskell where a function with no arguments is actually just a value
@dragonyeet2273
@dragonyeet2273 Ай бұрын
The intention is that you should use blocks to pass functions. Thereby is is sorta by design that you shouldnt pass a function as an argument, instead it should be passed as a block argument.
@thomasgeorge5261
@thomasgeorge5261 Ай бұрын
@@dragonyeet2273 how about if you want to pass multiple functions?
@dragonyeet2273
@dragonyeet2273 Ай бұрын
@@thomasgeorge5261 , never had that scenario. Luckily is a block when it is parssed by a method a proc and you could pass multiple procs to a method using normal arguments. If I have a method called boo, it is a simple as foo = ->boo. And now foo is a proc of the method boo or a function pointer in other words.
@spacelem
@spacelem Ай бұрын
I love Julia, it's my favourite language now (apart from maybe R or Scheme). I find it elegant and aesthetically pleasing. That said, I primarily do mathematical modelling and statistics, rather than making apps, so I don't really know what it's like from that perspective. The 1-based indexing is something you'll find in a lot of programming languages popular among mathematicians (see also Fortran, R, Matlab, GNU Octave, Maple, Mathematica, and Maxima), I guess we just prefer it that way.
@renato360a
@renato360a 13 күн бұрын
As a mathematician, I don't. And I always prefer to index my sequences from 0. Whenever I read a text that features a sequence with index starting at 1 I have a harder time grasping proofs. Good thing about programming in mathematics is that languages tend to be functional, so you don't often try to directly access some index or do index arithmetic. Also, Python has 0-based indexing so that's cool for me.
@spacelem
@spacelem 13 күн бұрын
@@renato360a every time I see Python's "range" function, and know you have to say "1 to n+1" to get "1 to n" (instead of 1:n like any 1-based language) it makes me irrationally angry. Especially when numpy's "arange" function has the exact same behaviour for non-integer sequences, which makes it so much more difficult to specify the end point. I don't like Python.
@renato360a
@renato360a 13 күн бұрын
@@spacelem yes, I would expect that! 😅But that's a very rare case as I see it. 99% of the time I'm not specifying the starting point, so I'm just reading "range(n)" as "give me _n_ terms of a sequence", which if we start from zero, naturally should end at _n-1_ . For non integer sequences I tend to use "linspace" more anyway, which does include the endpoint.
@spacelem
@spacelem 13 күн бұрын
@@renato360a I'm a mathematical modeller, dealing with epidemiological and genetic models. I frequently need to simulate from t=[0..T] (end points included), but also when doing intervals it might be X(t) for t=[t1.. t2], and the next interval I need X(t2) as the initial conditions (this is absolutely the case with my current project, which involves a virus spreading between chickens, which one group being added to the previous group for a period, then moved back, and being the source of infection for the next group). When doing sensitivity analysis on parameters I often need linspace or logspace (or their language equivalents). It's much easier to drop the final point if I don't need it than to try to guess a value past the end that doesn't get me too many points. When it comes to accessing data (so integer values for an index), I just like the 1st point to be x[1], and the Nth point to be x[N], not x[0] and x[N-1]. It's less to have to think about. I know there are times when 0-indexing has helped with certain algorithms in C++ dealing with n-dim arrays, but R or Julia usually already provide the tools to not need to think about it.
@renato360a
@renato360a 13 күн бұрын
@@spacelem Hm. I guess it's more like to which camp does one belong to, Naturals start from 0 or from 1. Mathematicians don't make up our minds about it so you see models starting sequences from either. And you and I are from different camps... Personally I love subtracting 0 (does nothing) and hate subtracting 1 (shifts everything), so I'd much rather start at zero and end at N-1. A long time ago I had to get it through my head at great pains that when you subtract two integers, the result has to be increased by 1 to yield the total number of elements including the endpoints. That made it very natural for me to see a sequence to N-1 as having N elements.
@codingbycyril
@codingbycyril 22 күн бұрын
11:18 I will explain the error in a simple way. Basically you were trying to access Pointer field when the @typeInfo(@TypeOf(memory)) was a Struct. Simply you were trying to access something that was not there. Hope it helps
@attilao
@attilao 25 күн бұрын
Why show a starling when talking about swift, this is so confusing 😅
@Erfan-tu2tw
@Erfan-tu2tw Ай бұрын
hey chief, what about php?
@adicide9070
@adicide9070 12 күн бұрын
is there any reason you didn't refactor your code to avoid this insane nesting?
@ult1873
@ult1873 Ай бұрын
11:19 That's tagged union stuff (I didn't look at your code, oops). It's basically telling you, that you gave it icecream and now want to get back the lamp that you totally gave it. just C: union Vehicles { Car car; Wheelbarrow wb; Bicycle bike; }; enum VehicleType { VT_CAR, VT_WHEELBARROW, VT_BICYCLE }; struct Vehicle { enum VehicleType active_type; union Vehicles data; };
@j0584924
@j0584924 19 күн бұрын
What about ROC?
@Leao_da_Montanha
@Leao_da_Montanha Ай бұрын
datastar video coming up or you're waiting the v1 release?
@tom-delalande
@tom-delalande Ай бұрын
I've never heard of this, but it looks interesting
@nanashi2622
@nanashi2622 27 күн бұрын
Rust is just so much joy to use, that's why I use it in all my personal projects.
@MarcoAntoniotti
@MarcoAntoniotti Ай бұрын
Nice. But flexibility and GC are good things… Plus Julia looks better than a crab 😊
@salim444
@salim444 Ай бұрын
11:19 it means you have a variable of type Union that is assigned a Struct (either because it is the default and you didn't initialize it or because that what you used) and you tried to access it as Pointer type. This could happend because you want to change the variable from Struct to Pointer or their is a bug in the language which could be the case as it is still not ready yet. I also like Zig but some of the decisions the ZSF made are questionable. the Main one I can think of right now it not compiling because of unused variable, yes I get the premise but a language should be aimed for professionals and not bother the programmer because of silly mistakes especially it debug mode. It is like an instrument that plays the note the exactly as required and definitely not return a stack trace and light red (example taken from Rich Hickey)
@coolcat23
@coolcat23 Ай бұрын
Smalltalk (an improvement over its successors).
@ArtemShoobovych
@ArtemShoobovych Ай бұрын
interesting how you mention errors being cryptic with pretty much every language, but yet you somehow managed to get away with never getting into borrow checker errors? is it because you clone everything?
@SirRichard94
@SirRichard94 15 күн бұрын
tbf rust errors are very descriptive and even suggest fixes.
@mharley3791
@mharley3791 14 күн бұрын
Honestly, I really like rust but working when I have to write a bunch of just regular regular code is absolutely by far. The best option for me. It’s easy, it’s readable, The standard library is great and super quick to just get things done.
@abcwarbot
@abcwarbot 12 күн бұрын
Nim deserves more love
@Leao_da_Montanha
@Leao_da_Montanha Ай бұрын
you need to dig more to understand nim, its more of a wizard thing
@tom-delalande
@tom-delalande Ай бұрын
You're probably right, I'll have to dedicate more time to it to learn it probably. Based of the comments I think Nim was a big skill issue for me
@ANONAAAAAAAAA
@ANONAAAAAAAAA 16 сағат бұрын
Honestly, choosing programming language is rather insignificant compared with choosing your specialty. Specialties includes: mobile app, frontend, backend(startups), backend(enterprise), embedding system, infrastructure, etc... Each specialty requires tons specialized knowledges and programming languages are just one of them. For example, backend dev requires knowledges about databases like table design, indexing, SQL, locks and transactions, execution plans, query tuning etc..., and these are a lot harder to master than any programming languages since you have to play with real world production systems to actually understand them. Once you understand how to build specific type of apps like backend app, mobile app etc..., changing the languages is not so difficult for the most of cases. Choosing languages is like choosing kitchen knifes as a chef and choosing specialty is like deciding the dishes to cook from Italian, French, Chinese or Indian. So I would suggest fresh juniors who's entering this industry to pick up whatever languages which are likely to give you industry experiences you want, rather than hopping "modern languages" one after another.
@afjelidfjssaf
@afjelidfjssaf 10 күн бұрын
Nim might seem like it has no idea who it wants to be, but it WANTS to be unopinionated. Like for example same function or variable can be called in camel case or snake case or literally allowing the syntax to be changed with metaprogeamming. It also tries to be true general purpose: JS compiler for webdev, optional GC and small binaries for embedded. Even shell scripting with NimScript You can have interop with nearly any language. Bidirectional interop with C/C++/C-objective/JS. You can use Python libraries in Nim etc...
@savagepro9060
@savagepro9060 Ай бұрын
Could've have made it more interesting by including 'archaic' languages such as: COBOL, Perl, and Fortran, for comparison.
@nabeelparkar4364
@nabeelparkar4364 Ай бұрын
Dart has exhaustive switch statements, null safety, functions as first class citizens, etc. Only thing it doesn’t have is errors as values like in Rust and Go. I think Dart deserves to be in the category 2 along with Kotlin and Swift
@XoLucyna
@XoLucyna 23 күн бұрын
Golang is really nice, but yea the error handling in everything is kind of a burden sometimes or else overall its a nice language.
@JohanHidding
@JohanHidding 15 күн бұрын
Nice comparison. It's a bit of a shame that the code looked almost identical in structure in most languages. When you know a language a bit better, it will influence your design strategy and change the overall form of the program. Looking at Julia for instance, no mention of multiple dispatch. Suggesting Julia for scripting halfway between Bash and other languages is absurd, considering JIT latency. Also, ties to underlying ecosystems like JVM or Zig's interface to C are glossed over as "not natively supported", whereas for many cases this ecosystem is a deciding factor for choosing a language.
Golang is BAD for SMART PEOPLE
27:25
ThePrimeTime
Рет қаралды 239 М.
i changed my mind about zig
9:34
Low Level Learning
Рет қаралды 141 М.
GADGETS VS HACKS || Random Useful Tools For your child #hacks #gadgets
00:35
Мы играли всей семьей
00:27
Даша Боровик
Рет қаралды 4,2 МЛН
одни дома // EVA mash @TweetvilleCartoon
01:00
EVA mash
Рет қаралды 6 МЛН
Can You Draw The PERFECT Circle?
00:57
Stokes Twins
Рет қаралды 59 МЛН
Val - The Rust Killer | Prime Reacts
16:54
ThePrimeTime
Рет қаралды 91 М.
The Ultimate Tier Programming Tier List | Prime Reacts
26:57
ThePrimeTime
Рет қаралды 284 М.
The case against htmx
6:21
Mark Jivko
Рет қаралды 9 М.
Why JavaScript Devs are Switching to Rust in 2024
10:35
warpdotdev
Рет қаралды 239 М.
JWTs are insecure session tokens
9:29
Tom Delalande
Рет қаралды 22 М.
Gleam 1.0 Is Out! (I think I'm in love...)
33:26
Theo - t3․gg
Рет қаралды 177 М.
Authentication is a developer nightmare
15:58
Tom Delalande
Рет қаралды 50 М.
Why Rust is NOT a Passing Fad...
8:54
Travis Media
Рет қаралды 22 М.
I built 10 web apps... with 10 different languages
14:23
Fireship
Рет қаралды 1,5 МЛН
Главная проблема iPad Pro M4 OLED!
13:04
THE ROCO
Рет қаралды 49 М.
Рекламная уловка Apple 😏
0:59
Яблык
Рет қаралды 809 М.
Распаковка айфона в воде😱 #shorts
0:25
Mevaza
Рет қаралды 1,3 МЛН
Android top🔥
0:12
ARGEN
Рет қаралды 1,4 МЛН