5 ms·
Just to be clear: The teaching languages aren't Racket. The teaching languages consists of a series of small languages designed for beginners. The idea is that
by soegaard 3y ago
Just to be clear: The teaching languages aren't Racket.
The teaching languages consists of a series of small languages designed for beginners. The idea is that a beginner can get more precise error messages.
Analogy: On a calculator, what should the result of sqrt(-4) be?
Depends:
If the user is a third grader, then maybe "error, can't take square root of -4".
If the user knows complex numbers, then "2i".
The teaching languages does just that. They are linked to the book, which tells you when to "level up".
Conflating the teaching languages and Racket is not helpful.
- a1369209993 3y ago> "error, can't take square root of -4" That has nothing to do whether the user knows better than to trust such a answer; it's because they (likely implicitly, which is admittedly unfortunate) asked for a real-valued result, which indeed can't be done. Eg, in python: >>> import math,cmath >>> math.sqrt(-4) ValueError: math domain error >>> cmath.sqrt(-4) 2j
- velcrovan 3y agoI remember the first time I ever used Python, the very first thing I did was type that exact thing. When I saw that error I immediately deleted Python, wiped my hard drive and drop-kicked my Dell Vostro computer all the way into the sun. It was so infuriating to me that that any programming language lie to people about basic math, deliberately keeping them ignorant and stupid, and actively preventing them from understanding the simple beauty of complex numbers.