r/Mathematica • • Mar 20 '11

Seriously though. Multiple undo. Most major applications have had it since about 1994.

http://imgur.com/dBJff
23 Upvotes

10 comments sorted by

4

u/johnmcdonnell Mar 21 '11

Apparently it is because they refuse do it until they can roll back the kernel state. How out of touch can they be? Who even wants to roll back the kernel state?

1

u/[deleted] Jul 29 '11

What does that even mean?

1

u/johnmcdonnell Jul 30 '11

When you say, "x=3", you change the kernel state. The kernel now knows the name "x" and binds it to the number "3". maybe it used to be 2, or maybe it used to be unassigned. Undoing the kernel state would mean rolling back the binding of x to what it was before you ran the command x=3.

1

u/[deleted] Jul 31 '11

Oh yeah, unrolling the kernel state would so useful because I end up with

Clear["x"]

statements everywhere when I am trying something out. Either that, or restarting Mathematica.

2

u/johnmcdonnell Aug 02 '11

You need to use module. It allows for local scoping so this doesn't happen. x=10 Module[ {x}, x=somesuch (* somecodewithx ) ] x==10 ( True *)

Generally I use it for functions, so

doseomestuff[x_]:=Module[ ...

1

u/[deleted] Aug 02 '11

Local scoping, okay. It's funny how Mathematica can barely to pretend to be a real programming language (I mean I have to work hard just to get parenthesize to look indented and everything).

1

u/[deleted] Jul 29 '11

What does that even mean?

8

u/[deleted] Mar 29 '11

Mathematica is teaching you to not make mistakes

3

u/[deleted] Mar 30 '11

Why do you question the great and powerful Stephen Wolfram? Don't you know how great and grand he is?

2

u/[deleted] Mar 26 '11

I agree 100%, it's unbelievable that Mathematica can't manage this.