Oddbean new post about | logout
 @4c9dfcc3 I would love to correct anyone in the Rust community who claims that Rust invented algebraic data types. I didn't see someone say that yet.

Of course, it is a feature. And people will say "Rust has X". They don't have to say "Rust has X where X was first invented by Y and implemented by Z1, Z2, …"

It is worth noting that Rust is not only targeted at systems programming. It is a general purpose language that you can get as low level with it as you want. 
 @5150cec1: i don't think anyone is arguing that they INVENTED ADTs, but that it seems it is the only place people are willing to USE them because of Rust's inertia.

And of course Rust is "general purpose". But GCs are in most application level languages for a reason: they're damn convenient to use! In my work, I am generally not chasing every iota of performance. I need something that I can be sure meets user and business requirements. Im sure that all involved here agree that ADTs  REALLY REALLY help with this. But how and when my primitives get cleaned isn't a HUGE concern for me. Yes - i will try and do the right thing by closing handles and not wasting memory etc, but by and large - it will be okay as long as the types are correct and the GC is halfway competent. 

Im not saying that acknowledgement must be given for every feature, but I would like to see some increased interest in "less complex" languages that include useful features like ADTs without fundamentally changing the way I have to think about data handling . 
 @4c9dfcc3 It is funny for me to call Rust a complex language after tagging Haskell and Scala.

My conclusion from my last blog post about teaching Rust in 5 days at my university is that Rust is not complicated if students with limited experience in Python can learn it in 5 days.
Complicated and complex are different adjectives, but I can expand my conclusion to "Rust not being complex" too. It is a language with new concepts that require people to first learn them before starting to hack. 
 @4c9dfcc3 But I think that we both agree that ADTs should be adopted by more languages. It is a concept that should be decoupled from specific languages. 
 @5150cec1 @4c9dfcc3 Haskell isn't complex.  GHC is.  The type inference is sophisticated, but not complex.  The syntax / grammar is actually very small.  The core libraries defined in the report are also small.  I think the most complex thing in the report are the rules around how foreign imports interact with the core library, and that can be avoided.  Haskell 98 didn't have a standard FFI.

Haskell is many things (hard, frustrating, theoretical, awkward, etc.), but not complex.