I feel like this question about many DSL vs. one big general-purpose language becomes useless at some point without actually discussing what a DSL is. I would argue Tensorflow and Numpy are DSLs, but they’re embedded in Python. Most people would just call them libraries. If it’s the latter, does that mean Python is the one true language for data science?
👍 1
j
Justin Blank
10/16/2019, 6:03 PM
I have a draft post about how many distinct niches there were for different programming languages.
Related to that question, are there features of Ruby/Python/JS/Perl that make some of them better or worse suited to data science (and are any of those features different from those that make them better/worse as a general purpose language)? Or is it all path-dependence. Does data science actually require a separate language?
That was a question I punted on, because I haven’t done data science.
w
Will
10/16/2019, 6:33 PM
It’s probably 50% path dependence and 50% Python having a good C API. I haven’t evaluated Ruby/JS/Perl, but C integration was critical for numpy and tensorflow.
j
Justin Blank
10/16/2019, 6:36 PM
Then I recurse…is there a goal that Ruby/Perl/JS have that precludes a good C api, or is that just path dependence?
Justin Blank
10/16/2019, 6:37 PM
The root question I was asking is “how many distinct languages do we need for non-aesthetic reasons?” (i.e. both Ruby and Python are low-ceremony languages, but often people prefer the feel of one of them).
w
Will
10/16/2019, 7:16 PM
Not that I know of. It’s possible that the developers simply intended for people to develop only within the language. Guido intentionally developed python as “Bash for C programmers”, so the C integration was a bigger goal from day one. (Again, I don’t know Ruby/Perl/JS, so that’s speculation on their part.)
Will
10/16/2019, 7:17 PM
It is definitely true though that the more complex the language, the harder the C integration. Lua is notable for being the scripting language with the easiest C integration, hence why it’s embedded in C applications (games, media editors, etc.). Lua’s runtime is super simple and was designed to be embeddable.