Understanding the Standard Library

  Переглядів 21,103

Paul Hudson

Paul Hudson

5 років тому

Although the Swift compiler is written C++, Swift's standard library is written in Swift and makes for a treasure trove of ideas, techniques, and optimizations.
In this session I'll walk you through several code examples taken straight from the Swift standard library, explaining how they work and how you can apply the same techniques to your own code.
This is a HD re-record of a talk first delivered by me at Mobiconf 2018.

КОМЕНТАРІ: 40
@jevoncharles606
@jevoncharles606 5 років тому
This could be the most important video I have ever watched! I know swift and have been coding with it for some time now, but this video just showed me a whole new world.
@twostraws
@twostraws 5 років тому
I'm glad to hear you enjoyed it! I hope to be recording some new videos soon that should prove just as valuable - watch this space 👍
@thanatosor
@thanatosor 3 роки тому
Like what ?
@Ra_v06
@Ra_v06 5 років тому
Part where you combine 3 methods was brilliant!
@smil1906
@smil1906 4 роки тому
Keep up the brilliant work! You're making a huge impact on the iOS community 🚀
@meherkasam
@meherkasam 3 роки тому
I nearly never comment on UKposts videos. This is one video that I’ll make an exception for because of how great it is! Thank you for all your work.
@gio8139
@gio8139 5 років тому
Thank you for breaking everything down Paul. Thanks for all that you do for the community. Good luck with your own convention!
@VladBatrinu
@VladBatrinu 5 років тому
wow, so awesome!! The rethrows one felt like magic
@gjermundification
@gjermundification 5 років тому
Amazing! I did not know that the standard library was there. I only looked into the make part of the cpp side of swift for the purpose of compiling this for illumos.
@jakobskovsndergard7912
@jakobskovsndergard7912 Рік тому
Hi Paul, I have bought a lot of your books, used them very little, I expect that to change. However you are always my goto point for knowledge on swift. Your videos are amazing!!! Sometimes I see them just for fun in stead of Netflix. Im finishing my university degree in software engineering this summer, and definitely want a job where I get to work with swift, even though the university gave no lectures on Swift. This video in particular is really good, it is enlightening to learn that you can get that much understanding from studying the sourcecode of swift. Thank you!
@WilderPoo
@WilderPoo 3 роки тому
The composition one blew my mind 🤯 really made something click in my head. Binary relations in action!
@gofudgeyourselves9024
@gofudgeyourselves9024 5 років тому
I live for this stuff
@fedoseevvadim
@fedoseevvadim 4 роки тому
I admire you! It is really fascinating!
@droneflightseeing1472
@droneflightseeing1472 5 років тому
Such wow... I would love to see more similar videos
@dambar011
@dambar011 2 роки тому
Just amazing
@rickisyourbro
@rickisyourbro 4 роки тому
Great video!
@bsc_mssv
@bsc_mssv 4 роки тому
Wow, this is awesome :O
@jasuramirov3366
@jasuramirov3366 2 роки тому
thank you, good job !
@JasonMitchellAZ
@JasonMitchellAZ 4 роки тому
Ok, Paul’s a genius 🤯
@shofada
@shofada 5 років тому
Brilliant!!!
@twostraws
@twostraws 5 років тому
I'm glad you enjoyed it!
@aguswidhiyasa
@aguswidhiyasa 5 років тому
This video blow my mind
@antoniodemingo326
@antoniodemingo326 4 роки тому
Amazing! :O
@garyvia602
@garyvia602 4 роки тому
Crazy that you published it for free, many would have already put it on Udemy, and spammed sponsors or ads for the money, but you did not!
@TheBardsCorner
@TheBardsCorner 4 роки тому
Amazing video! Thank you Paul! The last part was a bit obscure to me. I can't understand how we go from declaring an infix operator >>> to declaring a function that is also called >>> and then use it... When we write combined = ........, we just use the infix operator, but where is our function in action? Thanks!
@daniilgavrilikhin34
@daniilgavrilikhin34 Рік тому
infix operator >>> = ... is just a declaration of infix operator inside specified precedence group. Function >>> defines behavior of the operator.
@markuspfeifer8473
@markuspfeifer8473 3 роки тому
Using the de-Morgan rule for allsatisfy admittedly makes the code shorter, but a) is the Compiler smart enough to inline the inversions into the jump instructions or are they actually carried out, thereby decreasing performance? b) I guess contains is implemented the way we‘d expect? c) if so, was the choice which one to do via de-Morgan arbitrary?
@ftnsco
@ftnsco 4 роки тому
Paul, thanks for sharing this knowledge. I wanted to inform you that on, 13:15 the slide does not match your voice. You say you'll add this to safer, slide shows smarter. 👋
@user-zm1nv6mn7f
@user-zm1nv6mn7f 4 роки тому
Smarter, Safer, Faster
@THE_ONLY_GOD
@THE_ONLY_GOD 2 роки тому
In krakow?! I used to reside there.
@jatinmenghani3072
@jatinmenghani3072 5 років тому
What terminal extensions or tools are you using?
@twostraws
@twostraws 5 років тому
I use zsh with Prezto: github.com/sorin-ionescu/prezto
@bart2865
@bart2865 2 роки тому
Wow it's the unique lecture! by the way why did you bring this guy? 😂 44:10
@KushalAshok
@KushalAshok 4 роки тому
Boom!
@DhavalHNena
@DhavalHNena 2 роки тому
🤯🤯🤯
@shubhamshah4322
@shubhamshah4322 4 роки тому
grep "precondition(" * | wc -l Now shows 250 :p
@thanatosor
@thanatosor 3 роки тому
This made me miss FSharp function compose ever more
@8prot8
@8prot8 5 років тому
precondition(!scores.isEmpty, "Error..") is better than precondition(scores.count > 0, "Error...") i guess )
@user-zm1nv6mn7f
@user-zm1nv6mn7f 4 роки тому
一代新人换 mattt
@Boratio
@Boratio 4 роки тому
Coming with some OCaml, Standard ML, and Haskell experience, it's amazing how shitty some of Swift's function signatures are. First thing I noticed when he talked about *func* _&&_ . In OCaml it's just *(&&)* : _bool_ -> _bool_ -> _bool_ . I love your tutorials though, Paul. It's not your fault Swift is a shit show compared to OCaml, Standard ML, and Haskell.
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Переглядів 259 тис.
8 Things I Wish I Knew When I Started Programming
19:51
Paul Hudson
Переглядів 36 тис.
ОДИН ДОМА #shorts
00:34
Паша Осадчий
Переглядів 2,7 млн
Зомби Апокалипсис  часть 1 🤯#shorts
00:29
Bro smelt it & passed out 😂 #comedy
00:10
MrTalalaa
Переглядів 7 млн
Python's Type Annotations DON'T Do What You THINK They Do
8:10
Indently
Переглядів 28 тис.
My 2 Year Journey of Learning C, in 9 minutes
8:42
VoxelRifts
Переглядів 523 тис.
24 Xcode Tips in 15 Minutes
15:30
Paul Hudson
Переглядів 72 тис.
How to use the Coordinator pattern in iOS
18:12
Paul Hudson
Переглядів 70 тис.
"Clean" Code, Horrible Performance
22:41
Molly Rocket
Переглядів 829 тис.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Переглядів 1,9 млн
What's new in Python 3.13?
5:08
Carberra
Переглядів 15 тис.
How to use phantom types in Swift
25:00
Paul Hudson
Переглядів 13 тис.
Create ML for Everyone
43:40
Paul Hudson
Переглядів 30 тис.
GPT Engineer: Things Are Starting to Get Weird
10:14
ArjanCodes
Переглядів 840 тис.
Теперь это его телефон
0:21
Хорошие Новости
Переглядів 132 тис.
Subscribe for more!! #procreate #logoanimation #roblox
0:11
Animations by danny
Переглядів 3,9 млн