5 ms·
I've dabbled in a few lisps and definitely a noobie but I have absolutely no idea what you're talking about
by drekipus 3y ago
I've dabbled in a few lisps and definitely a noobie but I have absolutely no idea what you're talking about
- logicprog 3y agoThat language behavior fundamentally misrepresents how a proper cons should actually work. It's a link between any two values, represented as essentially two joined pointers, one to each value. It represents a linked list when cons cells are nested, but that's just something that falls out of the far more beautiful and fundamental core axiom of the cons cell, not all of what cons cells are. Thus claiming cons cells must be nested (which is what requiring the second argument of cons to be a list (I.e. more nested cons cells or nil) implies) is actually bastardizing what a cons cell is, reducing it to a menial operation for producing lists that means the same thing as "prepend" instead of an elegant core abstraction you can derive further things from. Bastardizing it like this, honestly especially in a language for teaching CS, in the name of talking down to students, is unforgivable. I learned Common Lisp at 12 partially from Land of Lisp and partially from a Lisp 1.5 manual and experimentation. Properly learning the core abstractions was vital.
- kazinator 3y ago> requiring the second argument of cons to be a list A language called ISLisp (ISO Standard Lisp) also does this nasty thing.
- a1369209993 3y agoTo be scrupulously fair, that seems to fall under > just being a local idiosyncracy albeit a stupid one; whereas Racket actively targets beginners in particular. Also, this is ISO we're talking about here; we probably shouldn't expect anything technically competent from them that isn't just a rubber-stamped version of someone else's specification, and they didn't call it "ISO Standard Common Lisp" or "ISO Standard Scheme", presumably for good reason.
- soegaard 3y agoJust 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.
- deleted 3y ago[deleted]