What are some programming langauges where *everything* is immutable?

What are some programming langauges where *everything* is immutable?

Attached: mmm crayons.jpg (336x188, 36K)

If it exists, it's completely useless.

any SSA IL?

What is assembly?

name a single thing you couldn't do with it

I/O

by "everything" I meant data types, not states

In that case, random access arrays.

Haskell.

Not something you understand, clearly.

wrong, monads are just one example of how it's possible

g can't into functional programming.

>I was only pretending to be retarded

you define new state by declare it with a new Identifier.

so u could do
const a = 5
const b = a + 5;

this stuff is regular used, if correctness is your highest priority.

how do dhey work exactly?

Like magnets.

8 >>===== > ~~~

>immutable
>assembly
Nigga what do you think the move instruction does?

Here's what every single 100% immutable program compiles to:
ret

The short version: continuations, callbacks, whatever you'd like to call them.
The long version: Let's say you have a value of type IO Int. This represents a procedure which when called returns an Integer. The procedure does IO. The only thing you can do with the IO Int is to call a method that takes a callback. The callback will take an Int and return the next IO procedure to be executed. The result of the method is a single IO procedure which represents the two procedures executed in order.
Your whole program can just be a sequence of these actions. The part you write (the callbacks) can use no mutation whatsoever, but you still get to do IO.

You have been visited by the Laura of not great, not terrible threads.

This thread is currently reading 19 replies (not great, not terrible).

Attached: Laura.jpg (1275x637, 107K)