Hacker News new | ask | show | jobs
by justinpombrio 1090 days ago
For those thinking "you can do that in any language, just teach a subset of the language": no you can't! The Beginning Student Language (BSL) and Intermediate Student Language (ISL) are subsets of Racket in the sense that you can take any BSL or ISL program and run it in Racket and get the same result. If the program does not error. But if it errors, BSL and ISL will sometimes give better error messages, which they can do because the're simpler languages.

For example, consider the program `((+) 1 2 3)`. Racket gives a runtime error "application: not a procedure" because (+) evaluates to 0, which is then applied to "1 2 3", which errors because 0 is not a procedure. But BSL can give a (helpful) syntax error, because it doesn't have higher-order functions.

(I feel like someone's going to tell me that BSL or ISL isn't a subset of Racket for some obscure reason. They're at least essentially subsets.)