4 ms·
I've been following Rust for a long time, and though I'm happy to see how popular it's become I'm also a bit wary. When people become attached to an exciting n
by kibwen 12y ago
I've been following Rust for a long time, and though I'm happy to see how popular it's become I'm also a bit wary.
When people become attached to an exciting new language, in their elation they tend to envision using it in every context imaginable. But most languages are designed for a particular (and possibly narrow) domain. As you venture further from that domain, things begin to unravel.
Example: after giving a presentation at a recent Rust meetup, someone asked me if they could use Rust as a scripting language. My response was something along the lines of, "sure, it's as Turing-complete as any other language, but why would you want to?" Mostly I would like people to acknowledge that different languages exist to serve different needs, and that there does not and will never exist One Language To Rule Them All.
Rust is a low-level systems language, and it's optimized very, very well for that niche. I'm very happy if you want to use it all time, for everything! But please continue to evaluate it as a systems programming language. There are very good reasons for every feature in the language, but many of those reasons may seem entirely superfluous if you don't appreciate the context in which they were made.
- meddlepal 12y agoI agree with the use the right language for the job sentiment, but most developers work for other people's businesses and engineering is just as much about designing and building something as maintaining and growing it. I can definitely see why some engineers would want a single "magic bullet" type language that can do everything from replace shell scripting to building complex distributed systems; it's easier to hire people to maintain that program 10 years down the road.
- kibwen 12y agoI acknowledge that irrational managers may dictate a single language to fulfill all purposes, but I disagree that sticking to a single language for your entire stack makes it easier to hire people. If you can learn Java, you can learn Python. I'm also not trying to encourage unchecked language proliferation; you can get by with one language for applications, one language for scripting, and, if necessary, one language for all the lower-level stuff.
- BuckRogers 12y agoScripting, applications, webservices can be met with Python. Especially once you start to look at the different implementations like PyPy. Not much out there can do the entire gamut though. Erlang and Rust look like great compliments for specific needs to a Python-centric company.
- lmm 12y agoWhy not a single language that scales up and down? Problems come on a continuous range; rather than an infinite number of languages specialized for every spot on the range, it's better for interoperability and tooling's sake to have one language that can accommodate many different styles of programming. /Scala fan, would and have used it for scripting.
- kibwen 12y agoDifferent domains will be optimally served by different features,[1] and any language that aspires to be usable in every domain must assimilate all of those features somehow. This is especially pernicious when considering how similar features can overlap and interact in unexpected ways, creating a labyrinth of corner cases with which a user must familiarize themselves. To maintain sanity, people will start carving out bits of the language to create "dialects" and restrict themselves to only those dialects, at which point you have effectively created multiple languages, each with their own idioms and learning curves. Consider as well that as long as there exist languages that are so heavily-laden with features, there will continue to crop up "minimalist" languages like Go which will appeal to people by virtue of sheer simplicity and eat the lunch of the maximalist languages. [1] An example: you know one thing that's great about using bash instead of Python for quick scripts? I don't need to put quotes around strings! Imagine how much time you'd waste in your terminal if you had to type `git grep foo -- bar.txt` as `git "grep" "foo" "--" "bar.txt"` all the time (which is valid bash, btw), or worse, `git("grep", "foo", "--", "bar.txt")`. TCL adopted this barewords-as-strings behavior as well, and though I hear mixed things about the rest of TCL this feature has always intrigued me. But this feature would be awful for any language where text input or string manipulation were not the predominant activity, so how would you go about turning it on and off? And even if you provide tools to automatically convert source files between barewords-as-strings and barewords-as-keywords, is that even the same language anymore?
- lmm 12y ago> To maintain sanity, people will start carving out bits of the language to create "dialects" and restrict themselves to only those dialects, at which point you have effectively created multiple languages, each with their own idioms and learning curves. Sure, scripting Scala looks rather different from high-performance Scala. But there's a continuity between them, which allows you to customize the appropriate "dialect" for a particular project, and avoids the overheads of using multiple languages in a project that straddles one of the lines. > how would you go about turning it on and off There's already a certain level of syntax customizability in most languages, e.g. I can use an import that will make symbols ('grep) treatable as strings. Whether this is a single language or a suite of languages designed to work closely together is an academic question, but I certainly think it would be possible to write something that allowed you to write (say) C-like code and Python-like code with a much smoother interface between them than there currently is when calling C from Python.