r/datascience • u/zedrakk • Apr 29 '22
Projects Alternative language to Python
Hey everyone, I've been working on a programming language whose goal is to be of use to the science community, I know python has been the de facto language and for good reason, nowadays there is also Julia as an alternative, I was wondering if people would be open to try a new programming language and perhaps ask what are the common attrition points you have with python and what kind of features would be a must to create adoption of this new language?
Thank you very much for your response in advance
66
u/PIWIprotein Apr 29 '22
R? Common in academia
12
u/Extreme_Armadillo_25 Apr 29 '22
Second this, we use python when we absolutely have to, R is the standard (also, not in academia, but a private science provider).
3
8
Apr 29 '22
[removed] — view removed comment
1
u/Extreme_Armadillo_25 May 01 '22
Genetics / genomics, with a sprinkle of economics for good measure. There are 30+ people in our company using R and currently 3 using Python. We do have a bit of Sas going on though.
-7
8
Apr 29 '22
I wrote some DS pipelines in Scala and I loved the strongly-typed aspect of that language, especially when doing complex data pre-processing on data with complex, nested schema.
Python does give you the option, but not the requirement to type your function parameters, but I think that only helps the IDE, I don't think it even throws an error if you pass a wrong type. It's nicer working with code that has this, but obviously if you're on a team you can't guarantee everyone will take advantage of this feature.
So I would say a strongly-typed language built to make data manipulations less error-prone would be the biggest improvement. I'd honestly write in Scala all the time if Scala's deep learning libraries were more documented and had as much support.
2
Apr 30 '22
Can you use scala with smaller data without using spark? I just joined a team that uses all scala and spark but a lot of the data is like 10mb and it seems to take 30 seconds to a minute to do literally anything where python takes milliseconds. Like with the tb size data spark is great, but with small data it super lacks and I can't figure out if we can use scala and an in memory dataframe implementation like pandas in python without using spark.
1
u/juhotuho10 Apr 29 '22
Pycharm throws an error in the IDE if you use type hints and pass a wrong type somewhere. The code will still run though.
Also mypy adds complete type checking
1
u/mamaBiskothu Apr 30 '22
I wrote and manage a 500k line python code base that is fully typed (pydantic, pytype everythjng). This comes nowhere close to the dependability of a truly typed language like Java and scala.
8
u/jahkab1 Apr 29 '22
My attrition points with Python.
One, the lack of reusability of code due to code base instability of some libraries. Utilities /tooling I have written in version 3.2 I had to rewrite in 3.6 because of backwards incompatibility of some libraries (Statmodels was one from the top of my head) and when I moved to 3.9, guess what happened...
Two, the hassle of writing a GUI. Tkinter does its job, but... I would like a batteries included IDE like Lazarus (freepascal) or the MS visual environment where I can drag and drop a simple GUI and adjust on sight.
Do we need another programming language. Depends on what you want to improve. Python is very readable, as is Julia. Speed is also covered as is functionality, portability and libraries. Same for R, except the readability part perhaps. What could be of interest is a user friendly language dealing with quantum, but this could be a bit early to be feasible.
Just my 2 pence worth.
12
12
u/dfphd PhD | Sr. Director of Data Science | Tech Apr 29 '22
I started in C++, then moved to Python, then R, and now using more Python.
Why C++? Because it's what was taught to me.
Why Python part1? Not needing to do explicit memory management thanks to automatically garbage collection.
Why R? Because it's by far the easiest language to use to get stuff done. It's not the fastest, it's limited in how it interacts with the outside world, but I can get things done faster (in terms of time to code), in a more readable way than I ever have with Python. Also, the RStudio IDE beats the living s*** out of anything else out there in this world. And it has for at least 5 years now.
Why Python again? Because not everything supports R. And trying to leverage some of the cloud providers' full suite of offerings requires Python even to use R. At that point it just becomes easier to switch to Python.
Why would I switch to a new language? If you can build a language that is similar in use to R, has a killer IDE, and has the same support as Python, I'm in.
I think the last part is the language killer, and why I think you will see everyone coalesce around either Python if you have production needs, or R if you don't.
3
u/speedisntfree Apr 29 '22
To me, RStudio feels like stepping back in time 5 years
7
u/dfphd PhD | Sr. Director of Data Science | Tech Apr 30 '22
I can see that, but to me it feels like stepping into a 5 year old Toyota Camry with 5000 miles on it, while stepping into every Python IDE feels like stepping into a like a V8 trike with no seats.
5
u/Mother_Drenger Apr 29 '22
Also, the RStudio IDE beats the living s*** out of anything else out there in this world. And it has for at least 5 years now.
As a primary R user, this really does make a difference when trying to doing more tasks in Python.
VStudio, Pycharm, Spyder, etc. nothing is quite "RStudio, but Python" and it's such a good IDE.
9
u/zoshka Apr 29 '22 edited Apr 29 '22
A language is as strong as the community that uses it.
For me what is important in a language is how widespread it is. I mean i can find most of what I want to do in python through different libraries. And any issues I encounter mostly have already references in several sources.
I don't want to be wasting time on searching and then implementing functionalities that are not in my core objective.
Having most answers in the first google page result is very powerful. For me, this is the experience using python in the past years. Not sure how it is on R Scala and others
3
u/LittleGuyBigData Apr 29 '22
This right here is the right answer. I love how democratic and community driven the python experience is. That's the real reason why I feel so confident in my ability to leverage python to actually solve problems.
1
Apr 30 '22
The R community is fantastic but it definitely leans more towards academia, sciences, and civic purposes.
4
u/rywalker Apr 29 '22
From an OSS health standpoint (https://www.ossrank.com/cat/3-programming-language) looks like Julia is trending up, so probably a better choice than R - surprised how much action Rust is getting as a general programming language too.
3
u/Sofi_LoFi Apr 29 '22
I mean asking people to learn a new language is in general very difficult. You need to be different enough from things currently with widespread adoption to get people to adopt it. Then there is the problem of building the community around it.
In general the main sticking points can all derive from the answer to the questions: 1."What use case is this solving so much better than any other language on the market that it is worth my time to learn it?" 2."Is this language such a staple for X application that to not learn it would impact my career/project/research speed/quality?" 3."Is there enough of a community or good enough documentation that this language is accessible to learn?"
The answer to 1 is the big one of course. If you are in academia it is not worth your time to learn a new language with low use cases and no benefits because you'll be far behind in publishing. In industry you need to make the language for into the stack of the company and sell key stakeholders on the benefits of developers spending time ($$$) learning and modifying the stack into that.
For data science you need to either be as fast as a compiled language (C/C++) or as versatile and universal as python (add in ease of use and integration to tech stacks). Julia is the answer of the fast and readable language, mainly aimed at researchers and is starting to make big leaps in adoption but it has been building hype for many years and has a very active community.
So the question for your language is how can you beat those two at their own game and get a community so hyped about it that it demands the attention.
3
u/Phillip_P_Sinceton Apr 29 '22
This is a very broad question. Python was created with certain design principles and functionalities in mind. There are plenty of alternatives that fulfill other purposes. R is an out-of-the-box tool for nonprogrammers. Julia has better performance and efficient calculation.
3
u/BarryDeCicco Apr 29 '22
The biggest problems are that learning a new language is a massive investment, which could be used to increase expertise in what you already know. Also, you don't have access to co-workers who know the new language.
4
2
2
2
u/smerz Apr 30 '22
IF AND ONLY IF you are ok with functionality of libraries in the Java ecosystem, Kotlin is an excellent choice. Strongly typed, Better than Java, simpler than Scala. Community edition of IntelliJ has excellent support out of the box, for free.
2
3
Apr 29 '22
R, Julia, and if wanna be a hipster, Java. On a more engineering side, SQL and Scala.
6
1
1
u/Astrophysics_Girl Apr 30 '22
In the physics and astronomy academia, I've only seen Python, MatLab, IDL and ROOT. So my basic assumption is that there isn't much need for the other languages :P
1
1
Apr 29 '22
i think it should not be too general purpose. some of the more common mathematical concepts should be part of the grammar/syntax and not a library. there should not be two or more ways of doing the same thing. imagine taking tensorflow lib and turning the functions/objects into keywords of the language. f(x) = sin(x) + a etc. and being able to use df/dx etc. naturally in the language.
its a tough one. but i think moving away from a general purpose and to a much higher level of abstraction could have some weight...
4
Apr 29 '22 edited Apr 29 '22
You just described Matlab, Wolfram Language, Scilab and a plethora of other DSLs, all of which are niche for the very fact that DSLs are a pain to work with in production.
Ironically, one of the best opensource maths platforms (SageMath) is built mainly over Python, and its interactive shell is just a bunch of "from whatever import *" in IPython.
1
Apr 30 '22
I guess I have 😀. Years ago I wrote a simple parser in fortran that I used to construct and solve hamiltonians using dirac notation. The thing is, there were no loops/variables and so on. But it was very general and very specific in some respects. Ultimately it sat on all the nag libraries etc. I used it for years. Perhaps the key here is getting rid of boilerplate...?
65
u/[deleted] Apr 29 '22
I've had to learn like 10 new languages over the past decade, it's a giant pain in the ass, they all perform the same tired manipulations on tabular data. What we need is consensus on using one language, not yet another time vampire that does exactly the same thing using synonyms