4 ms·
Swift could've easily replaced python. but the language got complex and is now a baby C++.
by dzonga 2y ago
Swift could've easily replaced python.
but the language got complex and is now a baby C++.
- azinman2 2y agoThose are pretty different languages. One you just run as a script with no compilation and no static typing, the other is fully compiled and linked into a binary. How could they replace each other? And what’s the complexity now that even remotely approaches c++?
- dagmx 2y agoFwiw, you can use Swift in a very Python like way. If you give a Swift file a shebang, it’ll execute as a standalone script. I still don’t agree they’re necessarily as overlapped as the other person claims but there is a decent area where Swift is easy enough to replace Python tooling
- guestbest 2y agoDoes swift still lack a built in package management system?
- pzo 2y agoI think it's too late which is sad since Swift is not a bad language even though I agree it got complex since the last 5 years. Python is mostly used not because of its language features but for cross-platform ecosystem. This is hard and slow to build especially these days (comparing to 10 years ago) since there are many languages and winner takes all or most of the cake. The only way is 1) to provide something really groundbreaking at the time (e.g. ruby on rails) 2) piggyback on other ecosystem by providing great interop (e.g. maybe mojo in the future) 3) slowly grind and hustle until something eventually catchup (e.g. maybe rust in the future) The problem with apple is they are too much focused to wall garden you instead of build ecosystem. Their IBM partnership failed to make something like Rails or Spring Framework for backend. Tensorflow for Swift failed even though it was google project. They don't have cross platform support in their DNA. You don't even get Xcode on Windows or iPad - this is dealbreaker for many people. I would bet more on kotlin (native) / java even though I'm iOS dev myself. Embedded is the exception that they still might win the game since the only competition there is pretty much: C, C++, Rust and sometimes python, js more as a glue.
- glhaynes 2y ago"Swift is too complex now" has seemed to have achieved meme status of late but I don't see it. For the average developer, writing modern Swift is generally not any more difficult than it was several years ago (much more often it's easier), it's just that the language can do a lot more now. But you only need to learn those new parts if you're using them. If you're not writing low-level or special-purpose code, you don't need to learn about more recently added things like move-only types, the embedded subset, varadic generics, or macros, etc, etc. And if you are writing things that require those features, you often couldn't have even considered Swift for that purpose before they were added.
- veidr 2y agoI'm rooting for Swift, but OMFS (S=Science btw, join my acronym club, it's free) the complexity has doubled? tripled? since I wrote the Swift SDK for my emlpoyer's API, in the Swift 3-4 era. I think it is a lot more difficult now, because the scenario wrt the, uh FUCK, WHAT THE— CEASE ALL MOTOR FUNCT—
- msie 2y ago"But you only need to learn those new parts if you're using them" - people only use a subset of C++.