Earlier quoted context omitted.
> dart or kotlin? ... ocaml, SML, or F# + scala, go, rust, elixir/erlang Yeah its so much time to learn all this stuff. Its a good reason they probably will all fade, better stick to js/python/java/C#/C++ like everyone else and wait.
> better stick to js/python/java/C#/C++ like everyone else I would change Java to Kotlin here, since Kotlin has a 1:1 interop with Java while having goodies like null safety, type inference and functional programming without the academicism of Scala (and its slow compilation time). If you also account for the smooth learning, Kotlin is probably the safest bet from these 9 mentioned. A lot of businesses with Java code…
The Decade of Swift
81–90 of 145 posts
Re: The Decade of Swift
#82Can someone sell me on Swift over dart or kotlin? They seem to be direct competitors. Since we're talking about the future of programming, can someone sell me on Swift instead of ocaml, SML, or F#? I don't see a good reason to pick it outside of targeting Apple devices.
Re: The Decade of Swift
#83Earlier quoted context omitted.
Good to know, thanks :) I've only ever used Python for my own tinkering purposes so I haven't been too aware of any new developments. But I assume the old ways are still valid code, so if you're working with Python code you may encounter any of now 3 different systems of just navigating paths for file i/o, what the parent claims should be dirt simple.
Yes. It is dirt simple, for dirt simple things. It's quite easy and discoverable from documentation for more complex things. The method in my link (which changed rather drastically between versions): - is very much iOS and MacOS specific - requires knowledge of quite a few iOS/MacOS-related things (FileManager.SearchPathDirectory is probably 80% Apple-specific) - even though it's a "FileManager", it doesn't even let…
It just did not worked out that way, as WinDev tanked Longhorn efforts and now we have UWP (aka COM) instead of .NET for OS APIs.
Which are anyway easily accessible from .NET given its COM support.
Re: The Decade of Swift
#84Earlier quoted context omitted.
Swift is already a top 10 language according to TIOBE.
TIOBE’s methodology and rankings seem very dubious to me. When was the last time you met someone who primarily programs in C? (I was one of those people for 14 years, but that was a while ago). Red Monk seems much closer to reality: https://redmonk.com/sogrady/2019/07/18/language-rankings-6-1...
Re: The Decade of Swift
#85Earlier quoted context omitted.
Yeah I think it will be a really hard sell since my perception is that programming is python for a lot of data scientists. Also static typing is something you have to use for a bit before you can understand that the little bit of extra formality is actually saving you a lot of trouble in the medium and long term. Still given the growth of that industry, it's hard to imagine that Python can bear the burden of the incr…
Static typing is useless for exploratory data analysis and data wrangling. Once you get to the modelling step all of the data is in typed arrays. Static types start to shine once the project grows and the new type annotation syntax works great for that. I've tried doing machine learning in C++, Java, Scala and JavaScript and all of them are a pain compared to python. Python would be perfect if I could annotate parts…
In my experience, doing this kind of task in an weak-typed or duck-typed language is already tedious. Function signatures don't tell me enough detail to know exactly what I'm working with, so I end up spending a lot of time digging through documentation or print debugging. Why not let the compiler, or the function signatures do this work for you?
Re: The Decade of Swift
#86I like a lot about Swift: strong typing, good support for closures, reasonable abstractions. But there's a lot that I dislike too. A lot. In general, I find the language to be far too trendy and fussy. I get the impression the design was guided by the goal of streamlining snippets of code meant to highlight cool features, gaining undesirable complexity as a result. One example: Do we really need $n function parameter…
The named parameter handling is one of my favorite features of Swift. It makes Swift code self-documenting in a way most languages aren't.
Re: The Decade of Swift
#87Earlier quoted context omitted.
I'm pretty sure they went with Kotlin before Swift was open sourced, but I agree with you that the likelihood of them doing it is very low. Swift for Tensorflow hasn't gotten much traction because the overlap between programmers who know swift and machine learning engineers is super tiny. Making the core language differentiable sounds very promising though .
Swift was open-sourced 18 months before Google announced support for Kotlin. There was probably several months or more of debate and work within Google by the time of the announcement, but it seems reasonable that during those 18 months they would have also considered and rejected Swift.
In any case, open source Swift was not ready for prime time at time of release.
Re: The Decade of Swift
#88Earlier quoted context omitted.
TIOBE’s methodology and rankings seem very dubious to me. When was the last time you met someone who primarily programs in C? (I was one of those people for 14 years, but that was a while ago). Red Monk seems much closer to reality: https://redmonk.com/sogrady/2019/07/18/language-rankings-6-1...
There are worlds of software developers outside of the Startup sphere.
Yet I haven’t know anybody who primarily or even occasionally used C in their work for over a decade. I know they exist but the majority of C programmers moved on to C++ a long time ago.
There are areas like kernel and driver development where C is still in widespread use but these jobs represent a tiny fraction of developers.
Any language popularity metric that ranks C as the second most popular language is massively flawed.
Re: The Decade of Swift
#89I like a lot about Swift: strong typing, good support for closures, reasonable abstractions. But there's a lot that I dislike too. A lot. In general, I find the language to be far too trendy and fussy. I get the impression the design was guided by the goal of streamlining snippets of code meant to highlight cool features, gaining undesirable complexity as a result. One example: Do we really need $n function parameter…
I certainly don't disagree that there's too much C++ in Swift (the Swift architects write C++ for a living, not ObjC, so it's hardly surprising) but it's not due to trendiness. Most of the features you mention derive from direct experience with Objective-C. Function arguments, property accessors (get/set/didSet), extensions (categories), etc. Every one of these things solves a real problem in the field. I don't under…
As for reference counting: I'm referring to capture lists, and the "unowned self" hack needed with closures. E.g. https://www.raywenderlich.com/966538-arc-and-memory-manageme.... And it gets more complicated with @escaping. I sure don't view all these subtle interactions of closures and ARC to be invisible. This stuff is subtle. Get it wrong and you have leaks.
Re: The Decade of Swift
#90Can someone sell me on Swift over dart or kotlin? They seem to be direct competitors. Since we're talking about the future of programming, can someone sell me on Swift instead of ocaml, SML, or F#? I don't see a good reason to pick it outside of targeting Apple devices.
Excuse me, but what makes you think of OCaml, SML and F# as "future of programming"? As much as I like OCaml, for example, I don't see it being mass-adopted in the near future, nor its tooling reaching the state of more established languages. All those languages you mentioned are most likely to continue being just niche ones. The only mostly-functional language I can see being mass-adopted right now is Elixir, and it…