[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remove $_ for that



On Tue, Nov 02, 1999 at 10:41:52PM -0500, Ted Eiles wrote:
> 
> One of the reasons I like beanshell is that the syntax and special features 
> are NOT like Perl.
> 
> When I saw that @_ represents the result of last expression evaluated I 
> almost barfed.  The shape of "@_" doesn't fit well with my Java coding 
> style (coming from a Smalltalk background) and semantically it doesn't help 
> at all.
> 
> I propose changing (or adding the mapping) @_ to "that". (i.e. "*that* was 
> the previous answer").

That's a cute idea.  (no pun intended ;) ) 
I'll think about it.

What I'd really like to do is have user definable 'history' like sequence
of results...  I like working with 'show()' turned on and just grabbing
the values that I want after the fact.

On the GUI side that kind of leads into the idea of an object inspector...  
One idea would be to let the console show everything as a sort of hypertext... 
you could click on a variable name or value or whatever and grab it to use it...

At minimum I agree that we should get rid of the "$_" name, it was simply a 
five minute hack to save the last value...


Pat