Тёмный

Is Swift getting too complicated? - Chris Lattner on Swiftly Speaking 

Paul Hudson
Подписаться 107 тыс.
Просмотров 9 тыс.
50% 1

In this excerpt from Swiftly Speaking, Chris Lattner talks about whether Swift is getting too complicated. For the full interview, click here: • Swiftly Speaking 11: C...

Наука

Опубликовано:

 

28 июн 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 41   
@vell0cet517
@vell0cet517 3 года назад
I love Swift, especially all of the safety that the compiler brings. The problem is that clever people who read/write very clever code are the ones steering the boat. Their idea of readability is very different from mine. I would rather have a dozen lines of simple, clean code that anyone can follow, than one line doing a dozen steps chained together in a manner that takes 3 Stack Overflow visits to figure out. The big problem I see is how terseness became synonymous with readability, and the trend towards omitting labels and keywords and overloading things makes looking up code difficult/impossible, whereas if it’s an unfamiliar keyword, a simple trip to the browser can sort out any confusion. Also no one wants to be the guy/girl who says “I don’t get it.”
@Wishwader
@Wishwader 3 года назад
Exactly. Couldn’t agree more. I wish the terse advocates would stick with Perl out of the way. Unfortunately property wrappers is turning Swift into an opaque mess at the whim of whatever quirks Apple decides to add. Watching this years Stanford course on iOS shows how property wrappers get ugly real fast, requiring workarounds, to get the most basic things done.
@michaellee2786
@michaellee2786 3 года назад
I've found that the programmer ego is getting in the way of simplicity. It's not okay for us to call the language complex, because the moment we do, our peers will either; assume we don't know it, or use this opportunity to assert that they have deeper understanding. The conversation always derails.
@indieshack4476
@indieshack4476 2 года назад
This.
@bobweiram6321
@bobweiram6321 Год назад
Learn Ada.
@ronaldbell7429
@ronaldbell7429 Год назад
I'm writing this 2 years after the fact, so probably no one will read this but... What I wish is that Xcode would have a "verbose" mode, to sort of de-simplify some of that extra-lean code. Swift understands all these shorthands, but it would be nice to be able to automatically convert that shorthand to a longhand, especially if you're learning Swift (or learning new features of Swift).
@petersuvara
@petersuvara 3 года назад
Glad you raised this point Paul. Absolutely we need to contain the complexity. Having so many ways to implement the same thing, brings about decision fatigue as to the best approach to take when solving problems.
@petersuvara
@petersuvara 3 года назад
Especially looking forward to the concurrency solutions.
@JoseQuintanaMex
@JoseQuintanaMex 3 года назад
For getting those iOS 13 apps out, i've been loving the .OnAppearing() and .OnReceived() integrated into the views, it has made it easy to dish out multiple apps very fast. I am also a fan of Xamarin/c#, but SwiftUI is quick to learn!
@rebelsdeveloper367
@rebelsdeveloper367 3 года назад
compare to other. swift and objective c is crazy odd. We spoil to press,type "." dot to auto complete. Swift ui seem like react all weird state..
@waoneill
@waoneill 3 года назад
I have been a C++ programmer since 1990. I still prefer it to Swift... Swift is really just an attempt to mitigate the issues that arise from Apple’s “Closure-oriented APIs”. Compared to C++ it feels claustrophobic and limiting. I could understand the compromise of flexibility vs safety before SwiftUI, but by implementing SwiftUI using Function Builders they have compromised ALL the safety benefits the language brings. Now, we have a claustrophobic language that is very limited, but just as unsafe as the earliest C++ implementations!
@petersuvara
@petersuvara 3 года назад
SwiftUI seems more of a constrained, declarative subset of Swift. I think you need to be careful when comparing swift to c++, especially when in context of SwiftUI.
@michaellee2786
@michaellee2786 3 года назад
You say that you feel limited by Swift, can you speak more about that or give us an example? I'm interested.
@WouterStudioHD
@WouterStudioHD 3 года назад
@@michaellee2786 C++ is ridiculously powerful. For example variadic templates and fold expression are incredible. Compile time programming is great too and memory manipulation is really easy in C++. For certain types of programming Swift is also not suited, because it is not deterministic enough. For example realtime audio processing is best done in systems languages like C/C++/Rust. It can be done in Swift, but only if you take away all type safety. Then you'll end up with a much worse unreadable version of your program. That's also why frameworks like AudioKit are really just C++ code that is called via Swift.
@karrantza
@karrantza Год назад
Comming from c# trying to learn swift, swift is the most confusing shit I have ever seen.Trying to be cool by adding closures, lambda expressions to he syntax is the most complicated way with arrows () and symbols makes it not cool but a big barrier for new developers to jump into swift. And for no reason.
@yalcinozer4434
@yalcinozer4434 Год назад
Exactly.
@pookiepats
@pookiepats Месяц назад
This is just your battle with familiarity, Swift was my first language and it just makes sense, now having learned other (FP) languages you can see where the inspiration for that syntax came from and again, if you think mathematically it just makes sense. C# / Java / Objective C are ugly old bags
@maxwell4upyours
@maxwell4upyours 3 года назад
I just barely wrapped my head around AppDelegate and SceneDelegate, now Apple has removed them. I pray my workspace compiles correctly in the new Xcode.
@michaellee2786
@michaellee2786 3 года назад
Apple has not removed them. You're referring to AppKit, which is not going away. SwiftUI has a lot of chatter around it, but it is not a replacement for AppKit.
@pookiepats
@pookiepats Месяц назад
More misinformation, do be careful kids what you take to heart - everybody has an agenda and sometimes it’s just to spread their own ignorance
@carlmuller8967
@carlmuller8967 2 года назад
Just learning Swift, it seems that 80% of all swift answers from google/stack overflow are lies. Nothing ever compiles first time let alone runs. Code works on one specific version of Xcode and one specific version of iOS and the next year everything is changed. On the other hand code in C++ that i wrote in 1991 still compiles and runs, although it could be improved. Code written in FORTRAN in the 1980s is still used in photogrammetry programs! Apple APIs go from Alpha->Beta->Deprecated without stopping at Production. This is quite different from learning Python for example, even though they keep adding features also.
@yes-vy6bn
@yes-vy6bn 2 года назад
the real problem is apple's documentation. you can find enough resources to program something simple, but as soon as you want to do something that not every app uses, you're basically fucked. the documentation is so bad even the people that do coding tutorials FOR A LIVING can't understand the docs, so can't make a tutorial
@bobweiram6321
@bobweiram6321 Год назад
Swift's syntax is very dirty and needlessly complex, especially for a language designed and developed by a company obsessed with clarity and ease of use. The ecosystem around it, however, is even worse. The available libraries are poorly documented and are always changing directions. I was shocked to learn about new features in Apple's Developer videos which couldn't be found on any of the scant online documentation.
@ngtamphuong
@ngtamphuong 10 часов назад
I had two project written in Swift. With every release of Swift, I had to go over it and fix it in order to build, let alone to run properly. All because the APIs, syntax had changed with every release! Now I'm happy with Objective-C++ for native things, and Flutter for everything else.
@indieshack4476
@indieshack4476 2 года назад
Appreciate the great Paul Hudson's interview with Chris. Unfortunately, Chris's response about Swift getting too complicated that "they haven't spent time with C++" is not for me a valid answer. It's gotten to the point that I'm moving away from Swift iOS dev because readability has become a major issue, coupled with Apple's API which has massive changes on a yearly basis. I get that Swift was open sourced by Apple because initially it wasn't getting much traction (for years and years, Apple declined to specify the percentage of apps being submitted to the App Store written in Swift), but in my view open sourcing it was a mistake - its development has been hijacked by the C++ crowd.
@user-dj5ki4km8c
@user-dj5ki4km8c 2 года назад
Swift (and its ecosystem, SwiftUI) is unnecessarily advanced, it's unreasonably complex for beginners who just need to build a simple app. Its complexity / inconsistency is one of the reasons why it is not popular. It's compiler-friendly, not programmer-friendly.
@yalcinozer4434
@yalcinozer4434 Год назад
Exactly. As a person who has 3 year experience with JS, Swift too many new thing to learn. A person who learns it as first programming language will be demotivated, thats for sure. I have been learning it for two weeks. If my thoughts wont change, I will take a look to the Kotlin.
@user-dj5ki4km8c
@user-dj5ki4km8c Год назад
@@yalcinozer4434 I've been doing software dev since 1997, and after using SwiftUI for 3 years, I still don't know how it works, the layout system is confusing, harder than dealing with cypher / security problem.
@ngtamphuong
@ngtamphuong 10 часов назад
For that long compiling time, it's even not compiler-friendly : ))
@bobweiram6321
@bobweiram6321 Год назад
Swift has one of the ugliest syntax and styling conventions I've had the misfortune of working with. The syntax is oddly sparse in some ways, yet verbose and convoluted in other ways. Swift, for instance, deprecated the ++ operator because the designers feared it may encourage latent bugs, yet the language is loaded with obtuse syntactical structures which hides the programmer's intent. 😊
@ngtamphuong
@ngtamphuong 10 часов назад
Swift community is where C++ developers gather together to make their own "improved" C++ language with the copied features from Objective-C, Ruby, Python, C# etc.
@KK-pq6lu
@KK-pq6lu 3 года назад
It isn’t complexity...it is just creating really stupid ways to do things.
@michaellee2786
@michaellee2786 3 года назад
Creating a different way to do something forces someone that wants to do something to make a decision with one more option than would otherwise exist, and so makes decisions more complex to make. That is complexity.
@tenminutetokyo2643
@tenminutetokyo2643 2 года назад
This is the messiest BS language I have ever seen. What happened to simplicity + elegance?
@ZoeSummers1701A
@ZoeSummers1701A 3 года назад
Swift and swiftui are vile. Functional programming is awful. He claimed swift was to be more readable than a C based language but C languages had sensible rules; swift let’s you obfuscate everything until it’s unreadable. How is that easier to read? Closure syntax is the worst.
@petersuvara
@petersuvara 3 года назад
I believe you haven't then used the ASM keyword in C :)
@michaellee2786
@michaellee2786 3 года назад
I don't necessarily disagree with what you're saying, but it is more constructive and less manipulative to show your work when you say things are bad. There are young minds soaking up your opinions every day.
@mccallionr
@mccallionr 3 года назад
Functional programming is a very useful mental model for thinking about certain kinds of problems. As a data scientist, I think about all of my data pipelines basically like function compositions. It's great! TBH I never really understood why OOP needed to exist until I decided to code an app as a side project. GUIs lend themselves to OOP. The moral of the story is that certain tools are only awesome *to you* if they improve your life. Functional programming improves mine!
@ronaldbell7429
@ronaldbell7429 Год назад
I take it you're one of those people who can only rate things as a 1/5 star or 5/5 star. There's a difference between you not liking sometimes and it actually being bad. It's subjective. Except for functional programming of course. There, you're wrong. Functional programming is extremely powerful for people who can understand it, and extremely confusing for people who can't.
Далее
Build your next website in Swift
24:45
Просмотров 6 тыс.
Fazendo MÚSICA com COISAS ALEATÓRIAS 🎵
00:24
Просмотров 2,5 млн
Python vs Swift | Chris Lattner and Lex Fridman
11:16
Просмотров 146 тыс.
Write Better Code with Swift Algorithms
34:34
Просмотров 31 тыс.
НЕ ПОКУПАЙ iPad Pro
13:46
Просмотров 302 тыс.
3D printed Nintendo Switch Game Carousel
0:14
Просмотров 2,7 млн
✅ЛУЧШИЙ гаджет Apple🍏
0:32
Просмотров 308 тыс.