I don't intend to get into an extended debate on this point here on Quora, but let me introduce some salient facts.
It is inaccurate to conflate "Scheme" and "Racket" in this context (or indeed in almost any context, other than syntactic). Racket long since diverged from Scheme in many respects. One of those respects was in its treatment of types.
There are a few different ways in which people meaningfully define "types". There's the famous "syntactic discipline" view; another is to think in terms of data abstractions: that is, the ability to define new classes of data, and have your program respect those classes (here, "respect" means you can't misuse or abuse a datum in a type-disrespecting fashion).
For well over two decades, the Racket team has believed in the latter, and even to some extent in the former notion of types. Starting from about 1991, the extended team has been involved in the construction of numerous static disciplines for dynamic languages, such as Soft Scheme, MrSpidey, Typed Racket, Typed JavaScript, and so on.
Indeed, part of the philosophy of Racket-the-platform is that Racket-the-language (dynamic, without a static type discipline) is no more privileged than any other language that runs on that platform, whether it's Typed Racket or Lazy Racket or even Scribble (documentation tool). There are Racket users whose default is to fire up #lang racket
and others whose default is to fire up #lang typed/racket
. In fact, there are even multiple typed Rackets in the distribution: besides Typed Racket there's also #lang plai-typed
, which was created for my book (Programming Languages: Application and Interpretation), and is essentially an ML language in Rackety syntax.
Similarly, if you read our primary textbook, How to Design Programs, you will find that the programming philosophy is profoundly type-driven. Our slogan is that the structure of data suggest a structure for the program; without data structure, then, you can't do anything; and once you have it, everything else follows from that: even the exceptions to that proposition are interesting and earn their own chapters. We are "typed" in that respect, too.
So why isn't the default #lang racket
language typed? There are many reasons, but note that there's probably no single person on the Racket team who agrees with all of them, and some may have others, too:
- Racketeers are heavily focused on building new languages. While types offer an interesting scaffolding for doing this, the lack of types offers other benefits, namely an absence of a priori restrictions and/or need to create encodings. That's probably why the languages that come out of Racket look quite different from those from other sources.
- We care a lot about the error experience. Indeed, I have done some of the most significant work in evaluating the quality of error messages (i.e., HCI research). It's a pretty bad story even for dynamic errors, and much worse for static ones. This issue is constantly swept under the rug, but it remains an issue, and progress remains slow.
- Racket is a large system, which means it has significant legacy issues. It could not change overnight, or even in any small period of time. Given that, it's an interesting question of how to transition from a dynamic to a typed language, and the Racket team has been at the forefront of this research (what is often called "gradual typing"). In fact, more and more parts of the Racket codebase are being converted.
- In lieu of static types, the Racket team has invested heavily into understanding dynamic contracts, again doing some of the most interesting research happening in that field.
- Racket has an enormously powerful syntactic abstraction system (which is how the
#lang
s are defined), and it's still a big research problem to figure out its interaction with types.
So, there is a combination of practical, instinctive, and research questions that mean there isn't a switch that can just be flipped, and even if there were, it might not be.
That said, none of this is a staunch defense of programming without types. And for that I would anyway be a poor choice to ask, because I mostly program with them or with proxy mechanisms for them. You'd have to ask a greater partisan than me for a tub-thumping answer. But someone asked me to answer this, and I wanted to set the record straight at least on Racket, because Racket's relationship with this issue is (as the original question recognizes) quite complicated.