Python vs Swift | Chris Lattner and Lex Fridman

preview_player
Показать описание
Please support this podcast by checking out our sponsors:

PODCAST INFO:

CONNECT:
- Subscribe to this YouTube channel
Рекомендации по теме
Комментарии
Автор

I love that you interrupt the conversation to clarify on statements your guests make. Many of the times the viewer is wondering the same thing.

lessmoneylessproblems
Автор

When I learned C and Pascal, the first thing that I liked is that you can pass practically anything by either value or reference to anything else.

henrymach
Автор

coming soon to python:
from pyswift import *

alfonshomac
Автор

Love seeing this pure CS stuff. Please include more pure CS! So interesting. Would be awesome to see people involved in Rust.

hackerculture
Автор

love how Chris gets into the details of how value semantics is achieved in a thoughtful and novel way compared to purely functional languages or Java using string immutability. Copy on write has been around for decades of course, but Swift brings it up the stack considerably.

kleetus
Автор

Swift really is an elegant language, its taking everything we've learned in the last 30+ years of programming languages and starting on a clean slate.

konrain
Автор

In my humble oppinion, C++ does this the best since value semantics is default, reference semantics is opt-in. Furthermore, you can pass by constant reference to provide a read-only view over the data without copying. Then, there is move semantics which is required if you want to make value semantics efficient.

rudolflovrencic
Автор

C# knows both value and reference types and has an implicit operation called (un)boxing to switch between value and reference type when needed.

TheVincent
Автор

Man I can’t tell you the number of times I’ve gotten stuck by that reference semantic thing with Python. It is super annoying and very confusing especially when you’re using someone else’s Library. Thank you for mentioning that.

wholenutsanddonuts
Автор

Excellent clip Lex, thanks for posting, much appreciated. Your channel is one of the best in the world. Thanks for interviewing remarkable brilliant guests and sharing them with the world. A+

honestinsky
Автор

If you learn Java as your first language, it may be a nightmare at the start, but you will understand a lot of concepts for other OOP languages.

PhilStein
Автор

You don't have to copy lists in functional languages. Generally speaking of you add something to a list in FP, you create list that points to the old one and your new value. Typically they are implemented as a tree to achieve this

asdqwe
Автор

Swift sounds great, but if I understood everything correctly something to some degree similar is done in Rust. There is no copy on write, if you own a string you can just manipulate it. But once you give out a borrow you can't manipulate it anymore. And the receiver can't store away a reference that can change, but if you pass ownership to someone else that one can of course store and change it, if they want to. So you get pretty much the same advantages as with Swift, but you don't need any runtime checks (as you would need with copy on write - there you need to check if you need to make a copy on every write operation).

You can do some of that with C++ (e.g. Qt's QString is copy on write internally), but it doesn't track ownership the way Rust does.

blenderpanzi
Автор

Started Swift about 2 years, it almost immediately became my favourite language. Going from Swift to Dart felt like such a downgrade.

coke
Автор

Java maintains String objects as immutable, but they use String objects pool to reduce consumption of Heap memory while runtime. So the concern guest is saying is very minimal in real world performance and memory consumption.

vivekvarma
Автор

"Actually good design is something you can feel" totally agreed. I bought a google phone and miss apple design

TrippSaaS
Автор

Lex's face change when Chris says "copy on write" and the question that was piling up in his head is answered. :)

andreasnulein
Автор

“Actually good design is something we can feel”. And that’s why Steve Jobs was right since the beginning and Apple is most valuable. Developer experience is of most importance. When it feels good, you build better products.

logusgraphics
Автор

I've never heard these topics discussed in these terms. In functional programming, it's immutability and lazy evaluation. Nice to hear that swift took some inspiration from FP. I tried it when it first came out, but it to me it just felt like another OO language with a nicer, more convenient syntax. Maybe I should take another look at it.

ycombine
Автор

Chris Lattner has the mannerisms to be one of those Thermian aliens from the movie Galaxy Quest.

stueygewy