[Bluej-discuss] Clearing the terminal
perkins at cs.washington.edu
Thu Apr 3 21:18:52 EST 2003
I guess I've got mixed feelings about this. It would be nice to automatically (more-or-less) clear the terminal, but there's a downside to doing it this way. It encourages incorporating BlueJ-specific code in student projects. Coding around the programming environment is always something that I've disliked having to explain to students, because it encourages environment-specific programming. (This was a real problem with console-based Visual Studio programs, where one needed to insert a spurious read to avoid having output disappear too quickly - but only in release mode, not in debug mode. Ghastly.)
How about another possibility? A lot of things get reset when code is compiled; in particular, the object bench is emptied because it can't sensibly be preserved across recompilations. It would make sense to automatically clear the console window at the same time, since it's pretty likely that new executions that use the console will start from scratch at that point. DrJava does this with their interactions window and it seems very natural.
If people actually do want the console to retain a complete history, even across compilation resets, I suppose there could be an option to allow for this, but I don't think that would be generally useful, and it shouldn't be the default.
> >I have just implemented it, for testing. Doing
> > System.out.println('\f');
> >now clears the terminal. We can include this functionality, or not. Opinions?
More information about the bluej-discuss