"free variables" always confuses me, like how free are they? they're bound somewhere else before you even get to the closure you're looking at

@cwebber You can't tell a variable what to do, they're free.

<examines documentation for set!>

Ah, I was mistaken. You can tell them what to do.

@mdhughes @cwebber but then they're mutated for the rest of their lifespans...

@dl @mdhughes the main reason we're losers is that we have mutable cons cells by default though tbqh, Racket made the choice there to make cons cells immutable by default

@dl @mdhughes "built your whole language out of this immutable datastructure? psycheeeeee"

@cwebber @dl I don't set-car!/set-cdr! every day, but it's in many of my programs. And if I bothered to make trees instead of hashtables (I'm not convinced trees are any faster, and I know they're buggier), it'd be in every one.

I'll be immutable when I'm dead!

@mdhughes @dl Racket *does* provide mutable cons cells also, but the default ones are immutable.

BUT, you can always box variables in the immutable datastructure! Which I think is a better approach.

Sign in to participate in the conversation
Octodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!