Originally posted by caligula
View Post
In my experience, the Rust compiler is no buggier than GCC. (I think the backend is based on LLVM anyway, which is pretty mature at this point.)
I agree that rust is a harder language to get started with, but it's a false economy to say it's harder in general, because what we're really interested isn't how easy it is to write hello world, it's how easy it is to write a bug free program, and that's actually easier in languages like Rust which allow the compiler to enforce constraints like memory safety and types, because otherwise you need to manually test for all these issues. The comparison isn't between Rust and GC'd languages, because it's designed to be used in contexts where a GC would impose an unacceptable overhead; the comparison is between Rust and languages with manual memory management like C and C++.
Originally posted by caligula
View Post
I agree that pure functional languages aren't as popular as imperative ones, but it is worth noting that both pure functional and pure imperative languages are generally perceived as quite limited. Most of the new languages are mixed-paradigm, where they resemble an imperative language but have functional features. This is true of D (std.functional, pure keyword), C# (LINQ is just functional programming with SQL-like syntax), Python (map, reduce, zip, etc. are built-in functions), Java 8 (Java 7 was pure OOP), Groovy, PHP, etc. Seriously, just look at the Wikipedia article on any recent language - they'll usually have functional, imperative and OOP listed under Paradigms.
And this is precisely why it's important to learn a functional language - not because you're likely to use it directly, but because it shows you a completely different way of programming. Consider the case of a Python programmer who is asked to implement sum() - depending on whether they have a background in functional programming, it could be written as one of two ways:
Code:
def sum(list): x = 0 for x in list: res += x return x
Code:
def sum(list): return reduce(lambda a, b: a + b, list, 0)
EDIT:
Now, I should add that OOP does have some very useful aspects. For instance, it's great for GUI development (which is what it was designed for originally). But it's just one paradigm, and like procedural and functional, it has areas its good for and areas it sucks in. Java 7 was a testament to this - they had to add features like anonymous subclasses because that was the only way to pass a function to another function, instead of just allowing higher-order functions and lambdas.
Comment