Favorite language hands down. It’s absolutely amazing. Perfect syntax, tiny footprint, bare metal programming, best type system, and seamless multi threading and concurrency. “Better Rust,” is a very good way to put it.
My favourite language too, and very much agree on the type system. I’ve had a list of things Rust does worse than Swift, especially with the type system, but I’m glad to see Rust start to tick a few of those off my list. The two languages really are competing but also working together which is great.
@@isodoubIet swift has concurrency now. One of the best concurrency systems of any language. You can now use standard async await for async functions instead of having to deal with callbacks.
@@zollerboy1429 When you call a function that takes a callback as the last argument, the body of the callback goes outside the function call. Like if you were to pass a lambda to a function in C++ it would be as if you did it like this: std::ranges::sort(v, {}, [](std::string s)) { return s.size(); // sort according to length } Just all around baffling. Swift is a weird language like that. You see the list of features, nod along like "yes, yes, that is a good idea, yes, it seems nice"... and then you spot the exact moment where the designers popped an aneurysm.
Many Swift features were heavily inspired by Rust. Even Graydon Hoare, the creator of Rust himself, joined the Swift team and contributed to it short after the language was launched. I think that's an interesting fact to be aware of too
the first *stable* release of rust came out in 2015. also languages are constantly being developed so they probably inspired each other, regardless of who technically came out "first".
I looked at Swift a few years back when i worked with a ios developer and was kinda blown away how good the code base was you can shit on apple on a lot of points but not the language
I like that he's willing to learn and try it out. I really like Swift, his use case seems much different to what I use it for but hopefully he finds it interesting when he tries it out.
That can change though if the popularity increases, and they manage to disassociate Swift from Apple. Much like C# isn't only for Windows specific operations, even though it's certainly the best option for Windows development
I think its cause it's a pain in the ass to use on Windows. I've watched a couple of times from Fireship where he says that he switches to a Mac machine when using Swift, whereas in other languages, he is mostly Windows to record.
@@GOTHICforLIFE1well it’s not the best option for windows development if you’re already a C++ dev. I can write both but always use C++ for new projects.
I love Swift. It’s come a long way of being more of a general purpose language. Language server works well. There’s packages for cross platform GUIs. Vapor, Hummingbird, Smoke, and the Swift runtime for AWS Lambda have made Swift development for servers very interesting.
Swift's a lot like Rust in a tonne of ways, except the coolest thing that I don't think most people know about is how they do generics right. Swift doesn't monomorphise its generics into specific implementations in library code, so it doesn't take a MyType and turn it into a MyTypeInt and MyTypeString and a new type for every possible use case known at compile time. Which is what Rust and Go and such will do. Nor does it just type erase everything so that MyType is just MyType under the hood. Akin to Java. A MyType stays as a MyType, in the compiled code, so you can just have the lib headers (no source) and you'll be able to link against a library that uses generic types and it'll work.
There's a reason why types are monomorphized at compile time. It means you can get generics without paying the cost of virtual functions. This is a different tradeoff (usability for new types at the expense of performance), not "doing generics right".
especially since it's been deprecated since July 2021. I mean there are a few incompatibilities with the newer standard sure but at the end of the day not sure why you'd bother keeping an entire system around just because a few developers like to go out of their way to screw you over, seems weird IMO.
If bidirectional interoperability really works with C++ without the need for a use of a manual bindgen, kinda like zig's cImport then it's freaking awesome
Comptime and macros are for different pruproses. Macros are for easy use of new features or mundane parts. Comptime is for calculating what is possible AOT or code generation but in more modular way
Swift is way better than rust and even it still feels very new. 0:35 FINALLY! I have been waiting for C++ integration since release. I guess I need to get back to work on my DAW.
Swift is really nice, but I just use it to write CLI tools for my general workflow stuff. It's a very nice language. If adoption picks up and the eco system grows, it seems like it'd be a great choice for many situations. Out of all language I've used, I think Swift has the nicest approach to memory. You can be lazy and just let the ARC deal with almost everything and selectively optimise some parts with more explicitly managed memory. It's a great approach.
It‘s amazing how one can radiate excitement about tech! Thanks for the video. I was playing around with Swift at some point and was greatly surprised how „ergonomic“ (for a lack of a better word) it feels. I didn’t have much experience with programming back then, but learning Swift after JavaScript was quite fun. Didn’t stick to it as lots of products back then were still in Obj-C, supporting clients on older iOS versions etc. But watching this video got me thinking to go and look into Metal and continue to learn. Thanks!
If you like one you ought to like the other. Both communities are pretty friendly and helpful too but it can be harder to find Swift people when you need help with a problem.
@@andrewdunbar828 Yeah, I'm getting similar nice vibes from both :) I think I'm covered on the swift front luckily as the entire iOS team at work writes it, and they're all a friendly bunch
The LadyBird browser engine (an independent, open-source, from-scratch engine currently written in C++) is switching to Swift because it has the benefits of Rust but with good C++ interoperability.
I used to use Swift in my previous job. It's living proof that a great language is nothing without the right ecosystem. I ended up having to use Objective C++ for some tasks because there were no good Swift libraries for linear algebra like Eigen in C++.
There's a lot of borrowing between the two. I find it funny that surface level, Swift syntax looks closest to something like Kotlin. But in terms of actual concepts and features, Swift and Rust are basically twins.
@@andrewdunbar828Yep, as I said before in a comment, the creator of Rust, Graydon Hoare, joined the Swift team and contributed to the language short after it was launched
Swift is pretty nice and you should look at it. It's easier than Rust because it doesn't try to do the hard stuff Rust tries. It's a bit more comparable to Zig. I like all three.
good to hear you talking about some taylor swift, been programming in that for the last 8 months, and I'm having a blast after so many years dealing with Java/JS shait
Oh no. What a discovery. You must think ahTML is a language. Fing batch or Basic is better language than JS or Java. Why the slash. As if the two were related 😂
Swift has been really fun to learn and use. It does feel a lot like Rust in some ways. It’s also pretty fast. There’s a reason Apple uses it to write everything from Mac OS to all of its apps. It delivers some great performance and safety.
@@thedeemon You mean they use C and C++ to get to the heart of the machine. Nothing wrong with that and Swift allows that integration as it was built on top of C.
six years ago I wrote a little AR game in Swift in six weeks flat, including the time it took to learn the language and I hadn't learned a new language for 20 years if you don't count shaders. At the time I was THREE YEARS into a theoretically "quick" C++ game that I never even finished.
Less debug. I forgot the term but from my understanding.. it’s way easier to find bugs. Everything is like connected or able to be linked.. which basically means it’s all linked.
Can you do a video or live stream where you show how you learn a new language? So what is your approach, and what steps do you follow? Would be nice to see how other engineers get into a new language. Something like 0 to hero in Swift...
@@Devenias There is SICP and HTDP that can provide base techniques that can be transferred to various languages. MIT course in Python also tries to do the same. My basis is the SICP approach to programming that I have transferred to various languages.
In my 4 years of golang experience i couldn't find golang alternative, it is so simple and rich in server development. As a developer i look to handle multiple request at same time and because of small concurrency code built in compiler help us lot.
The term parameter pack comes from modern C++, but in C++ they are almost like a language within a language. You can do ”for each” on a pack, but the syntax is weird.
Dug up this video now. 13:24 I would looooove to see you using swift for 2 weeks and telling us what you think! 😁 But I would even more like to see what kind of setup you would use to not use Xcode to build an app. Xcode might be my least favourite editor, but I believe I still have to use it to make iOS apps. Is there a way around it? I haven't found it. (AppCode is dead and I never started using it) The problem I'm guessing is SwiftUI and running simulators of phones. ... But is there a way? Anyways, would love to see it! Love the content. 🤟
I recently got a mac mini, just for learning dev in their ecosystem since i learned win32 and linux+gtk+qt already. Now i'm about to learn swift, feels weird rn. Especially since i'm not used to Xcode and especially macs keyboard bindings
gotta say, xcode's builtin documentation tool is insane. Similar to man pages but much more complex and powerful. even more powerful than markdown pages
I was hoping that that is true, but after doing some more serious work - vim with sourcekit lsp is an inferior experience to xcode, regarding how language features work. That makes me really sad as nvim user that has to write few thousands line of code in Swift in next months.
I am 52 years old. I started with Assembly and C. Did C++ for the most of my time. I did a little bit of Java, when I had to but tried to avoid it. I did JS when I was physically forced to do FE. And a bit of scripting (Python, Perl) and ABAP stuff on SAP. I tried to avoid C# and hated Objective C from the bottom of my heart. That said, Swift is the most exciting stuff in Software Development for a long long time. Only thing is that for my taste it is a litte bit too ambigious. But all in all well crafted and exciting technology.
Swift took some good things from Objective-C, like the named parameters and I prefer Objective-C messages style than Swift. A lot talk about Obj-C [[[]]] but are they any different to C/C++/Swift etc ((())) Obj-C was quite a decent language, I like some features in Obj-C than what other languages have done.
Mostly it’s because of the opposite of fanboyism. Since it’s mostly used in the Apple ecosystem, people who don’t like Apple for whatever legitimate or illegitimate reason they have will immediately sh*t-talk it the same way they do with Apple hardware without ever actually exposing themselves to it.
@@andrewdunbar828They’ve been taking Swift on Linux pretty seriously and working to make it a good server language. Windows support has been an afterthought for the most part.
I still prefer Objective-C/C++ over Swift when dealing with low level memory access and working with C/C++ code as Swift previously only supported C and is not great at low level access like creating pointers to pointers to access floats as int etc, too much safety
There’s classes and class-based OOP, mainly for Objective C interop (e.g. so you can use existing libraries, without needing to rewrite the world like Go). But most idiomatic Swift uses protocols and structs, in a more Rust-like style
And another language inspired by Swift is Hylo programming language, formely Val programming language, wich have mutable value semantics and the types are integers.
Yea I think Swift’s type system is much better than Rust’s - I found quite a few things missing in Rust, but Rust is catching up a bit which is nice to see.
Thanks, guys. I read some on Swift tonight. It does seem pretty interesting. I'm going to dive into it some more. Thanks for the recommendation! I am for sure now Swift-curious
@@NamanGoel34 Swift's syntax is weird/crazy though. Function parameters have an inside and an outside name, callback parameters spill past the function call, explicitly annotated exceptions everywhere, etc. I have my gripes with go but nothing in it is as crazy as swift's syntax.
@@isodoubIet 1. By default parameters have the same name inside and outside. And named parameters are an upgrade over position based upgrades. 2. The curly brackets *outside* the parenthesis is a little weird at first, but actually turns out to be super nice in the long run. Also, it’s optional so you can just not do it in your own code. 3. Explicitly annotated exceptions? There are no exceptions in Swift. Don’t quite get this one. Overall, fair that Swift’s syntax is a bit weirder than Go. But it’s simpler than Rust, which is full of cryptic symbols and shortened names. Swift is very readable after you learn its couple of idiosyncrasies.
yeah swift is nice, though i use it only on iOS. i see it pretty equal from the learning curve to kotlin and dart, i use all of them and can quickly switch. actually i did the android version of some app by literally copy+paste the swift code into android studio and manually fixing the obvious syntax errors and manually fixing non-portable constructs like task/coroutine handling. that went pretty quick - on a port from/to rust, i'd not even try this but rewrite from scatch. (for backend stuff, i still prefer rust).
When Swift was first released, I was surprised at how similar it originally looked to JavaScript back then. Unfortunately, due to many factors I didn't keep up with it and if I saw it now I wouldn't even recognize it. If I want to make iOS apps now like I wanted to in the past (my whole reason for getting a MacBook Air in the first place) I'd have to learn Swift from zero again.
@@ConernicusRex Dawg Lattner worked at Apple, it was developed by Apple employees and announced at Apple’s WWDC. The initial released wasn’t even open source
"...supports...macOS and Linux, with Windows support coming soon." ... Windows is always a 2nd class citizen in the world of Swift which is understandable given where it comes from, but in the context of gamedev, this is the biggest anti-feature you could have.
Favorite language hands down. It’s absolutely amazing. Perfect syntax, tiny footprint, bare metal programming, best type system, and seamless multi threading and concurrency. “Better Rust,” is a very good way to put it.
My favourite language too, and very much agree on the type system. I’ve had a list of things Rust does worse than Swift, especially with the type system, but I’m glad to see Rust start to tick a few of those off my list. The two languages really are competing but also working together which is great.
Lost all interest in swift when I learned about the absurd callback syntax.
@@isodoubIet swift has concurrency now. One of the best concurrency systems of any language. You can now use standard async await for async functions instead of having to deal with callbacks.
@@isodoubIetwhich callback syntax?
@@zollerboy1429 When you call a function that takes a callback as the last argument, the body of the callback goes outside the function call. Like if you were to pass a lambda to a function in C++ it would be as if you did it like this:
std::ranges::sort(v, {}, [](std::string s)) {
return s.size(); // sort according to length
}
Just all around baffling.
Swift is a weird language like that. You see the list of features, nod along like "yes, yes, that is a good idea, yes, it seems nice"... and then you spot the exact moment where the designers popped an aneurysm.
Many Swift features were heavily inspired by Rust. Even Graydon Hoare, the creator of Rust himself, joined the Swift team and contributed to it short after the language was launched. I think that's an interesting fact to be aware of too
the first *stable* release of rust came out in 2015. also languages are constantly being developed so they probably inspired each other, regardless of who technically came out "first".
Swift came first, my man.
Not true
Both languages inspired each other. And both stole liberally from existing FP languages.
I looked at Swift a few years back when i worked with a ios developer and was kinda blown away how good the code base was
you can shit on apple on a lot of points but not the language
it was made by the god himself Chris Lattner
Can you shit on them for Objective C at least?
My point exactly (well maybe let's not get carried away with the 'god' tag). But man, isn't that man a genius?!@@corpseopera
@@pwinowski then legend?
The man’s reputation can float on the LLVM alone for the next 25 years but he keeps coming up with new great ideas. Pretty incredible mind.
I'm a big swifty. Hate xcode, love swift. Apple managed to create the worst IDE and the best language.
True 😂
How’s the swift LSP experience these days?
I don’t think there are people who actually like Xcode outside of the official testimonials. It’s so slow and takes forever to launch.
Could not agree more. Love swift. Xcode literally ruins my life
@@BigfootPrintingI’ve used the LSP in VSCode and it’s OK.
gotta remember chris latner was a lead designer for swift. dude really is a genius.
He was good on the Atlanta Hawks as well
I like that he's willing to learn and try it out.
I really like Swift, his use case seems much different to what I use it for but hopefully he finds it interesting when he tries it out.
Swift seems really cool, too bad it's not been adopted almost anywhere except the Apple ecosystem.
That can change though if the popularity increases, and they manage to disassociate Swift from Apple. Much like C# isn't only for Windows specific operations, even though it's certainly the best option for Windows development
Apple made the right move here by open sourcing it, and it is indeed on us to adopt it I guess@@GOTHICforLIFE1
I think its cause it's a pain in the ass to use on Windows. I've watched a couple of times from Fireship where he says that he switches to a Mac machine when using Swift, whereas in other languages, he is mostly Windows to record.
@@oserodal2702 windows sucks for development anyway (except when you develop for windows)
@@GOTHICforLIFE1well it’s not the best option for windows development if you’re already a C++ dev. I can write both but always use C++ for new projects.
I love Swift. It’s come a long way of being more of a general purpose language. Language server works well. There’s packages for cross platform GUIs. Vapor, Hummingbird, Smoke, and the Swift runtime for AWS Lambda have made Swift development for servers very interesting.
Vapor is competing with Go to be my favorite thing for the backend.
What about PHP?
Swift's a lot like Rust in a tonne of ways, except the coolest thing that I don't think most people know about is how they do generics right.
Swift doesn't monomorphise its generics into specific implementations in library code, so it doesn't take a MyType and turn it into a MyTypeInt and MyTypeString and a new type for every possible use case known at compile time. Which is what Rust and Go and such will do.
Nor does it just type erase everything so that MyType is just MyType under the hood. Akin to Java.
A MyType stays as a MyType, in the compiled code, so you can just have the lib headers (no source) and you'll be able to link against a library that uses generic types and it'll work.
The C# effect
The generic system is the best I’ve ever seen and it isn’t even close. I’m consistently surprised at how seamlessly it works.
how does this work it sounds very interestingyou got any articles on that on how that works deep down?
@@tgirlshark There is a UA-cam video named "Implementing Swift Generics, " from an LLVM meeting.
There's a reason why types are monomorphized at compile time. It means you can get generics without paying the cost of virtual functions. This is a different tradeoff (usability for new types at the expense of performance), not "doing generics right".
i honestly don't understand why they care so much about supporting this niche operating system *specifically* designed for gaming.
especially since it's been deprecated since July 2021. I mean there are a few incompatibilities with the newer standard sure but at the end of the day not sure why you'd bother keeping an entire system around just because a few developers like to go out of their way to screw you over, seems weird IMO.
If bidirectional interoperability really works with C++ without the need for a use of a manual bindgen, kinda like zig's cImport then it's freaking awesome
Comptime and macros are for different pruproses. Macros are for easy use of new features or mundane parts. Comptime is for calculating what is possible AOT or code generation but in more modular way
cumtime
Swift is way better than rust and even it still feels very new.
0:35 FINALLY! I have been waiting for C++ integration since release. I guess I need to get back to work on my DAW.
Swift is really nice, but I just use it to write CLI tools for my general workflow stuff. It's a very nice language. If adoption picks up and the eco system grows, it seems like it'd be a great choice for many situations. Out of all language I've used, I think Swift has the nicest approach to memory. You can be lazy and just let the ARC deal with almost everything and selectively optimise some parts with more explicitly managed memory. It's a great approach.
It‘s amazing how one can radiate excitement about tech! Thanks for the video.
I was playing around with Swift at some point and was greatly surprised how „ergonomic“ (for a lack of a better word) it feels. I didn’t have much experience with programming back then, but learning Swift after JavaScript was quite fun. Didn’t stick to it as lots of products back then were still in Obj-C, supporting clients on older iOS versions etc.
But watching this video got me thinking to go and look into Metal and continue to learn. Thanks!
I've written a bit of swift, it's pretty nice. Looking at picking up zig atm, but otherwise swift mightve been it. Worth checking out imo
If you like one you ought to like the other. Both communities are pretty friendly and helpful too but it can be harder to find Swift people when you need help with a problem.
@@andrewdunbar828 Yeah, I'm getting similar nice vibes from both :) I think I'm covered on the swift front luckily as the entire iOS team at work writes it, and they're all a friendly bunch
Swift mentioned, LET’S GO
The LadyBird browser engine (an independent, open-source, from-scratch engine currently written in C++) is switching to Swift because it has the benefits of Rust but with good C++ interoperability.
It's as good as it looks. Hands down my favorite language of all time. Just a delight.
I used to use Swift in my previous job. It's living proof that a great language is nothing without the right ecosystem. I ended up having to use Objective C++ for some tasks because there were no good Swift libraries for linear algebra like Eigen in C++.
And now you can just import the C++ library you want!
@ThePrimeTime If you're using Swift Macros, one can easily expand macros to see its generated Swift code within Xcode.
BTW, if-let is a syntax started by Swift, and then copied by Rust
There's a lot of borrowing between the two.
I find it funny that surface level, Swift syntax looks closest to something like Kotlin. But in terms of actual concepts and features, Swift and Rust are basically twins.
Some key people have worked on both.
@@andrewdunbar828Yep, as I said before in a comment, the creator of Rust, Graydon Hoare, joined the Swift team and contributed to the language short after it was launched
Conditional unwrapping is 🔥
Swift is pretty nice and you should look at it. It's easier than Rust because it doesn't try to do the hard stuff Rust tries. It's a bit more comparable to Zig. I like all three.
It would be funny if swift 25.0 become twice as good as rust and still nobody notices.
good to hear you talking about some taylor swift,
been programming in that for the last 8 months, and I'm having a blast after so many years dealing with Java/JS shait
Oh no. What a discovery. You must think ahTML is a language. Fing batch or Basic is better language than JS or Java. Why the slash. As if the two were related 😂
Andrej is a genius.
Do you… think Java and JavaScript are somehow related or interchangeable?
Swift can be written in Linux, I Love that.
Arc browser is using it on windows. Its a great start.
I love using Plot as an HTML “DSL” (domain specific language). You can write type-safe HTML. I am just now binding HTMX directives into Plot.
I’m doing the same thing with swift-html!
Swift has been really fun to learn and use. It does feel a lot like Rust in some ways. It’s also pretty fast. There’s a reason Apple uses it to write everything from Mac OS to all of its apps. It delivers some great performance and safety.
Apple doesn't really use it that much in its own products.
@@thedeemon
You mean they use C and C++ to get to the heart of the machine. Nothing wrong with that and Swift allows that integration as it was built on top of C.
@@thedeemon Are they picking C/C++/Objective-C for new projects? Can't expect them to rewrite existing software in Swift.
Part of the reason I use Odin is cause once you leave iOS you are on your own, but I still keep up with it cause its a dope lang
"OCaml has an amazing standard"
OCaml doesn't even have strstr in its standard library.
There's a reason everyone uses the Jane Street lib!
six years ago I wrote a little AR game in Swift in six weeks flat, including the time it took to learn the language and I hadn't learned a new language for 20 years if you don't count shaders. At the time I was THREE YEARS into a theoretically "quick" C++ game that I never even finished.
The LSP is not in mason because it is bundled with swift, so it will always have the same version as the swift version you are using
cargo expand is built into the ra vscode extension and rustrover (and it's very granular per macro call)
Less debug. I forgot the term but from my understanding.. it’s way easier to find bugs. Everything is like connected or able to be linked.. which basically means it’s all linked.
Swift has Vapor framework, it's fast and easy to use
Can you do a video or live stream where you show how you learn a new language? So what is your approach, and what steps do you follow?
Would be nice to see how other engineers get into a new language.
Something like 0 to hero in Swift...
You learn from your own base techniques.
@@Art-is-craft sure I do, but I want to know how other people do it to improve my way of learning by picking some methods that fit my current style.
@@Devenias
There is SICP and HTDP that can provide base techniques that can be transferred to various languages. MIT course in Python also tries to do the same.
My basis is the SICP approach to programming that I have transferred to various languages.
XCode let's you expand the macro directly in the code.
Okay I've got more reasons to learn Swift now aside from having the same name as Taylor.
This channel's coeff of entertaining is real.
Swift Feels like C++ in the aspects of stuff that it adds..
In my 4 years of golang experience i couldn't find golang alternative, it is so simple and rich in server development. As a developer i look to handle multiple request at same time and because of small concurrency code built in compiler help us lot.
The term parameter pack comes from modern C++, but in C++ they are almost like a language within a language. You can do ”for each” on a pack, but the syntax is weird.
so happy to be in my last months of software development career...no more f**** to give about what's new
based comment
Damn ... any advice to give to us younglings? And congrats on the retirement! (hope it's retirement and not the other possibility 💀)
Man. Another gets PIP’d. You hate to see it.
Still waiting for you to try Swift. Hope you give it a shot with 6.0.
Dug up this video now. 13:24 I would looooove to see you using swift for 2 weeks and telling us what you think! 😁
But I would even more like to see what kind of setup you would use to not use Xcode to build an app. Xcode might be my least favourite editor, but I believe I still have to use it to make iOS apps. Is there a way around it? I haven't found it. (AppCode is dead and I never started using it) The problem I'm guessing is SwiftUI and running simulators of phones. ... But is there a way?
Anyways, would love to see it! Love the content. 🤟
I didn't even know swift was cross platform.
It's very hard to use Swift on windows
“Crossplatform” === ios, ipados, macos, watchos, tvos……
Yep. Windows and Linux have been supported since 2020.
Swift has had Linux Support for almost a decade. Windows support has always been an afterthought.
@@NamanGoel34bro Swift itself is not even a decade old lmao
I installed V, it was fun from what little of it I got to use. Maybe I'll give Swift a shot.
Talking about Ocaml and html templating.. have you seen TyXML with Reacon's JSX like syntax?
If you were here we'd laugh about their vacant stares.. but right now.. my time is theirs.
Go Swift!!!!!
use vapour for web templating in swift
I recently got a mac mini, just for learning dev in their ecosystem since i learned win32 and linux+gtk+qt already.
Now i'm about to learn swift, feels weird rn. Especially since i'm not used to Xcode and especially macs keyboard bindings
that sounds fun
gotta say, xcode's builtin documentation tool is insane. Similar to man pages but much more complex and powerful. even more powerful than markdown pages
need to update this to 6.0 now
Swift was my first programming language! Swift 1.0
If you could do Swift outside of xcode without problems it would be one of the best languages imho
Swift ships with an LSP. I’ve tried in VS Code and it works OK.
I was hoping that that is true, but after doing some more serious work - vim with sourcekit lsp is an inferior experience to xcode, regarding how language features work. That makes me really sad as nvim user that has to write few thousands line of code in Swift in next months.
I believe you can even put debug breakpoints inside swift macros.
I am 52 years old. I started with Assembly and C. Did C++ for the most of my time. I did a little bit of Java, when I had to but tried to avoid it. I did JS when I was physically forced to do FE. And a bit of scripting (Python, Perl) and ABAP stuff on SAP. I tried to avoid C# and hated Objective C from the bottom of my heart. That said, Swift is the most exciting stuff in Software Development for a long long time. Only thing is that for my taste it is a litte bit too ambigious. But all in all well crafted and exciting technology.
Swift took some good things from Objective-C, like the named parameters and I prefer Objective-C messages style than Swift.
A lot talk about Obj-C [[[]]] but are they any different to C/C++/Swift etc ((()))
Obj-C was quite a decent language, I like some features in Obj-C than what other languages have done.
The hate towards Java and C# was a mistake. Honestly, you missed out on a remarkable era.
I really like Swift, sourcekit lsp is evolving as well
swift is a great language tbh
I do wonder how swift compares to the other languages. With these features I kind of don't get why it is not as widely adopted
Because everything works well only on the Apple platform
They don't seem really that serious about Swift on non-Apple platforms.
Mostly it’s because of the opposite of fanboyism. Since it’s mostly used in the Apple ecosystem, people who don’t like Apple for whatever legitimate or illegitimate reason they have will immediately sh*t-talk it the same way they do with Apple hardware without ever actually exposing themselves to it.
they never tried to brand it outside of anything apple related so the community doesnt really care about its widespread adoption outside of macos
@@andrewdunbar828They’ve been taking Swift on Linux pretty seriously and working to make it a good server language. Windows support has been an afterthought for the most part.
I give up using Swift because it changed every month, no stability at all.
I still prefer Objective-C/C++ over Swift when dealing with low level memory access and working with C/C++ code as Swift previously only supported C and is not great at low level access like creating pointers to pointers to access floats as int etc, too much safety
D had macros that work like Zig's comptime. But nobody ended up using D.
:(
waiting for your video on swift.......
I know people will say a lot if I say I use swift for my Quant engine...
I also do not know Swift. Reading it does support inheritance and composition which is weird. How does that work out in the long run?
There’s classes and class-based OOP, mainly for Objective C interop (e.g. so you can use existing libraries, without needing to rewrite the world like Go). But most idiomatic Swift uses protocols and structs, in a more Rust-like style
My brother in Christ have you never used a multi paradigm language like Rust, Kotlin, or Go? Same shit.
its a revolutionary language you should give a try
I’m genuinely curious to know what language you use that doesn’t support both?
Waiting jsx in swift and htmx stuff
Zig claims to have macros as sane as possible. Did not try them yet tho
I sometimes dream of a world where all JS code would be replaced by Swift 🤩. Think of all the bugs solved, the hours saved🤪
Hey primegean, have you seen Idris programming language? (Type drive development)
Loving Idris, but tbreal Prime doesn’t like/care about Haskell, and Idris is even more academy-focused, so probably he won’t like it a lot.
@@clementdato6328 maybe, but the conceptual design brought by that is really interesting.
And another language inspired by Swift is Hylo programming language, formely Val programming language, wich have mutable value semantics and the types are integers.
13:33 I also would love an easy-syntax language like Go with Rust's type system. That sounds amazing. Prime, let us know if you find it!
It’s called Swift.😂
Yea I think Swift’s type system is much better than Rust’s - I found quite a few things missing in Rust, but Rust is catching up a bit which is nice to see.
Thanks, guys. I read some on Swift tonight. It does seem pretty interesting. I'm going to dive into it some more. Thanks for the recommendation! I am for sure now Swift-curious
@@NamanGoel34 Swift's syntax is weird/crazy though. Function parameters have an inside and an outside name, callback parameters spill past the function call, explicitly annotated exceptions everywhere, etc. I have my gripes with go but nothing in it is as crazy as swift's syntax.
@@isodoubIet 1. By default parameters have the same name inside and outside. And named parameters are an upgrade over position based upgrades.
2. The curly brackets *outside* the parenthesis is a little weird at first, but actually turns out to be super nice in the long run. Also, it’s optional so you can just not do it in your own code.
3. Explicitly annotated exceptions? There are no exceptions in Swift. Don’t quite get this one.
Overall, fair that Swift’s syntax is a bit weirder than Go. But it’s simpler than Rust, which is full of cryptic symbols and shortened names. Swift is very readable after you learn its couple of idiosyncrasies.
Objective-Rust#
It's typo.
Pony lang has gc and borrow checking and ownership
yeah swift is nice, though i use it only on iOS. i see it pretty equal from the learning curve to kotlin and dart, i use all of them and can quickly switch. actually i did the android version of some app by literally copy+paste the swift code into android studio and manually fixing the obvious syntax errors and manually fixing non-portable constructs like task/coroutine handling. that went pretty quick - on a port from/to rust, i'd not even try this but rewrite from scatch. (for backend stuff, i still prefer rust).
I’ve done this from js to dart and that also kinda works
kotlin is not that much outside of Android. Same for C# and Microsoft.
Unfortunately, Swift still inconvenient when you try use pointers. It so simple and effective thing in C++, but in Swift it complete terrible.
Swift on Windows? Mind blown!
9:36 Imagine using a language that is called "Objectively you're seeing PP's"
It's really nice
Is it still not possible to have generic protocols?
You can. It’s called associated type. Been around for a long time
Quite literally has never been impossible. Associated Type has been part of Swift’s protocol system since the beginning.
Taylor swift is so talented
Singer, cybersecurity specialist and now, super powerful programming tool??
Fell in love w Swift after 2 days of using it
Prime buying the Taylor versions of the albums
Told you to learn Swift
1:00 prime once again provin he's living back in June 2021
Swift is in the same category of Apple fails as MobileMe
All I need is Swift transpile and interop with JS ecosystem.
When Swift was first released, I was surprised at how similar it originally looked to JavaScript back then. Unfortunately, due to many factors I didn't keep up with it and if I saw it now I wouldn't even recognize it. If I want to make iOS apps now like I wanted to in the past (my whole reason for getting a MacBook Air in the first place) I'd have to learn Swift from zero again.
The Swiftiegen
LoL “I’ve never used Swift”. Are you for real?
Swift is the best thing Apple created.
It’s open source and created by Lattner, creator of the LLVM. Not apple.
@@ConernicusRex Dawg Lattner worked at Apple, it was developed by Apple employees and announced at Apple’s WWDC. The initial released wasn’t even open source
@@ConernicusRexSwift initially was closed source and it’s backed by Apple
swift is awesome
These videos where people passionately discuss languages used by less than 5% of the industry as if they matter are a lot of fun. :)
5% is a huge threashold, or we are not living in the same world.
"...supports...macOS and Linux, with Windows support coming soon." ... Windows is always a 2nd class citizen in the world of Swift which is understandable given where it comes from, but in the context of gamedev, this is the biggest anti-feature you could have.
Look at crystal and crystal macros. Crystal is a very nice language.
Are we advertising for Go
I never knew that Swift looks so similar to Rust whoa
seems to me like you want to try kotlin
Kotlin is nice, but Swift is a lot nicer
(Kotlin’s tooling is better)
Swift was better than Rust a long time ago