I use python on a daily basis for scientific computing (PyTorch, Matplotlib, 
Numpy, Scipy, scikits-learn, etc.). Python is great for doing quick projects, 
but certain design features of the language make it less ideal for large 
projects (e.g. whitespace, weak typing, speed, etc.). Swift shares many of the 
nice qualities Python has but without some of the warts.

To answer your question, I think anyone who needs to integrate their algorithm 
into larger projects and/or on hardware care about moving away from Python. 

I think trying to include Python libraries makes sense. Julia did the same 
thing, which allowed them to grow their user base very quickly (e.g. being able 
to use Matplotlib in Julia was a huge win). I believe the way Julia imports 
Python libraries is via its extremely powerful (and complex) macro system.

While using Python via Swift is a great way to use already written libraries, 
my preference would be to eventually write everything in Swift (trying to debug 
across languages can be painful). I did (a while ago) write a Tensor library 
for Swift, but ran into some issues when trying to make it run both on the CPU 
and GPU. A new approach I’m considering is to instead wrap a pre-existing C 

My two cents, as the question of users was brought up.


> On Dec 4, 2017, at 12:15 PM, Tino Heth via swift-evolution 
> <swift-evolution@swift.org> wrote:
>> This is a bridge to allow easy access to the vast number of libraries that 
>> currently exist in those dynamic language domains, and to ease the 
>> transition of the multitudes of those programmers into Swift.
> I’ve read several posts that gave me the impression that Python has a huge 
> user base of people who are tired of using that language (the cited statement 
> is just an arbitrary pick)… but is that actually true?
> Afaik, Python never became as common as Java, C# or C++, and it never had 
> much support from big companies — people decided to use Python not because 
> it’s some sort of standard, but because they liked it and found it to be a 
> language that’s easy to learn.
> So the whole story of „let’s make it easier for those poor Python guys to 
> switch to a real language“ sounds very much like hubris to me.
> Of course, that statement is an exaggeration, but still:
> Did anyone ever ask the Python-community who actually wants to switch to 
> Swift? I don’t think there would be enough positive feedback to take it as a 
> justification for the proposed changes.
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

swift-evolution mailing list

Reply via email to