UGH, debugging Scheme is.... not pleasant at all.

And that's even with DrRacket doing its best to help, at least telling me what line of code crashed

Somehow I'm passing the wrong variable and I have no clue how.

Scheme really teaches you to appreciate other languages:

* where you can insert tracing print statements into a block of code
* where there ARE multiline blocks of code so you can do that without having to find a matching paren somewhere on the other side of the screen
* where there are breakpoints and debugging environments

Wow, I FINALLY got it working!

After staring at the screen for an hour I realised I had a 'car' where I was SURE I had a 'cdr'.

The story of Lisp in a nutshell.

Other modern things you sorely miss:

* list comprehensions / destructuring binds

eg, when you REALLY REALLY need to return two or more values from a function, so you return (a,b) and your calling function just goes '(x,y) = myfunction(c,d)'

That is very nice and eliminates a whole lot of nasty '(cons (cons (car (cdr' hackery

* objects/structs/types, ie being able to NAME elements of a data structure and then access them later BY NAME.

Names are so important!

'car' is not a good name.

Follow

@natecull these are the problems I saw with the small amount of lisp stuff I did - not having structured types means a lot of the way I instinctively program just... isn't available

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!