snow-deprecated
snow-deprecated copied to clipboard
Magic variable containing the previously evaluated expression in Interactive Snow
In Ruby's IRB, there's the magic variable _ that contains the most recently evaluated expression at the top level. This is very convenient, so I propose an equivalent to be made available in Snow.
Not a bad idea at all. The feature is specific to interactive mode, right?
Traditionally, yes. I've been playing with the idea of bringing it into the language as a whole, but even ''I'' realize that's a can of worms. It's still worth some thought, though.
I think it would be neat if Interactive Snow was a regular program built in Snow, and not compiled directly into the executable. It makes it far more extensible, and it's always good to eat your own ass (or whatever it's called) :-)
I do not believe I possess the dexterity required to do that. But yeah, good point. It can be done already, using the amazing(ly undocumented) dlopen/ExternalLibrary features.
However, for debugging purposes (Snow is the thing being debugged – if something goes wrong in isn, it's nice to know that it's your code, not the isn code, that fails), I think we'll keep the C++ implementation for now, at least until Snow is somewhat more stable.
I concur with both Judofyr and Simon. isn should definitely be implemented in Snow in the future, but it's probably not 0.1 material. Should a feature request be filed now? This conversation is straying slightly off topic ;)