To All Rustaceans,
NOTE: After my initial post there has been some focus on the second part of this post. My main interest is in the first part. The second part relates to certain personal preferences that I was happy to share and discuss in good faith. If you feel like replying or commenting, please do so on either or both points. But please give priority on the first part. Thanks. Special thanks to the first responders
Hello there Rustaceans!
It is not the best idea, but I have to start with an apology and a disclaimer:
- Apology: This is likely to be a long note, so brace yourself and take a deep breath;
- Disclaimer: At no point in this note I have any contrary intent or criticism. I am over fifty and age gives us some more freedom to express our opinions and ideas. Combine that with maturity and the ideas and opinions are both driven and aimed to improve ourselves, the environment (in an ample sense) and hopefully others. I have friends that might hate me for my propensity to offer my opinions, but deep down they say they like it as I present a distinct point of view. It is neither right nor wrong, just different. Take with a grain or a kilo of salt and make your own decisions. OK, enough. I trust you all get it.
To the point: I am a Data Scientist, and I am exploring Rust, so I would like to ask for some suggestions and opinions on matching Rust and Data Science. Some more context and background in bullet points:
- I am a Data Scientist, so I am not a developer.
- For me, a developer is someone that earns a living by working day in, day out in producing code to make computers work to enhance our lives.
- A Data Scientist is someone that uses data to enhance our lives, developing code to some extent in various degrees of time and quality.
- Data Science is not an IT discipline despite relying heavily on IT resources.
- I have used punched cards at university back in the day, and I have learned and used about thirty different programming languages over the years, and I still do. I have learned data structures and algorithms (does “Algorithms + Data Structures = Programs” by Niklaus Wirth or “The Art of Computer Programming” by Donald Knuth ring any bells?), but I am no developer as per my definition above.
- It is not about coding, but Data Science has been associated with languages such as R, Python and Java in most cases with the actual mathematical code under the hood written on C or Fortran decades ago.
- Python is just an interpreted scripting programming language that has nothing to do with Data Science, but it does offer a large number of libraries and frameworks related with Statistics and Machine Learning and feels “lighter” or perhaps less intimidating for the Data Scientist that has to code occasionally. Did I mention that interpreted means interactive but also means slow?
- Python and R are suitable for their simplicity and interactivity for the discovery phase, but not any fast for implementing Data Science in a production context. An opportunity for Rust perhaps?
You might be asking if is there a point, a question, or is this getting anywhere any time soon?
So, as an outsider, my central question is: Given that Rust labels itself as a systems programming language, could it be used at the forefront (not doing mathematics behind the scenes) of parts or the whole Data Science workflow, and to be used by Analysts and Data Scientist as needed?
I am hoping for many answers that are likely to be as long as this note, and predicting that they will fall in three or four categories, but I don’t want to influence more than that.
You can take a break and consider writing it back. I hope you do.
This section is almost unrelated to the previous one, but I decided to put it all together as it touches on the “easiness”, “lightness” or “looks” of the language on an aesthetical level, which I believe can impact the psychological appeal or repeal one might feel when deciding in learning/using a new language. I never felt attracted to Java as it just looks like C in a JVM. I know this is an utter simplification, but what about first impressions?
As an outsider, with just ten to fifteen hours of Rust presentation on YouTube and halfway the Rust book, all during non-business hours, I would ask for your understanding, so let me start:
It was not meant as a joke, but I hope I get some smiles: A good number of keywords in Rust are 3 letters abbreviations (
mod). From the presentations I have seen on the Internet, I can’t believe Rustaceans don’t want to have
fun. They prefer to have
To bring the point up, I don’t like abbreviations in programming languages merely on the aesthetic level and personal taste, others do.
I saw somewhere that Rust wants to be run everywhere, so it would help it to be explicit and “clear”. I can take syntactic sugar as long as the original syntax and meaning are also valid. Perhaps run everywhere doesn’t mean coded by everybody.
Here are pro arguments for short versions:
- If you are a full-time programmer, you can save some minutes in a year.
- Say save 10 minutes in a year = 0.000019 (0.0019%); sure one will lose more time compiling or debugging.
- Granted that developers are lazy (allegedly/in general) but IDEs and Code Editors have means to expand code so that a keyboard combination can produce either
functionall the same and as fast.
- It is to make it familiar for C/C++ programmers
- What is the coherence in having
structlike in C but then having
fn. Is there
- Developers are intelligent (allegedly/in general). Web developers deal with HTML, CSS, JS/PHP/etc. In the same source code! No need to spoon feed with a familiar syntax.
- Make C/C++ developers feel more at home, then what about developers that code in Ruby/Python/PHP/Smalltalk/Basic/Fortran/SQL/awk/I can go on for several more lines here.
- What is the coherence in having
- Let’s develop a new language that has all the bells and whistles of modern techniques, but for some perverted reason let’s make it look exactly like all the others languages before (tick the boxes):
[ ] to respect the giants before us
[ ] because we are not revolutionary/creative enough
[ ] this is not important; get over and focus on the job
[ ] other: _____________
- The difference between an expression and a statement is a semi-colon at the end of the line. Seriously? This distinction sounds like those human languages that rely on phonetics and people laugh at you if you make a mistake. Fine as a mother tongue but terrible for second language speakers. By analogy, this is as terrible as for occasional programmers. As good as the error messages from the compiler can be, this can lead to hours of debugging, with the source code laughing in your face.
- For developers that might think that to code in “low level” and “near the metal” is to have a short syntax is a psychological misconception and historical heritance from when resources were limited, and storage was expensive. The binary code has to be short, and that is the compiler’s problem. Let me put this way: The machine has to do it fast, developers have to do it right.
- Use the best of what is known and improve upon it. Sounds great, but if not done carefully it might result in a Frankenstein like creature. All the sawing might be hard to create a coherent and elegant masterpiece.
- What about
let mut? My suggestions would be
let mutateor better yet
I probably could think of more cases and examples, but I can feel the tension in the room building up. My brain is hardwired in a way that I can see a double space in a text without even reading the text, and I cannot help not pointing it out. Some other people might understand or relate to that.
Unfortunately, I am not eloquent or articulate enough so that I might have felt short on my arguments. I hope it was enough though to convey the message. I wish that there would be enough critical mass in the community or the core team to consider these and other related points, and if so, we could have a Rust 2.0 with some syntax or grammar changes.
I appreciate very much if you have read up to this point. What are your ideas and opinions?