nixpulvis / brainfuck

A simple brainfuck interpreter in Rust.
http://nixpulvis.com/brainfuck
23 stars 3 forks source link

Pass a Mutable Reference to the Interpreter for the Hook #8

Closed nixpulvis closed 8 years ago

nixpulvis commented 8 years ago

This allows for looking at the state of the interpreter, or changing it in a hook. I;'m not sure if we really want to be changing the state in a callback though. So maybe this should be an immutable reference.

offlinemark commented 8 years ago

in this case I think "more power to the user" is a good thing, mutable gets my vote. making it mutable could let you do neat stuff like extending the language, or making polymorphic programs.