Am 13.03.2018 um 19:02 schrieb Allin Cottrell: > On Tue, 13 Mar 2018, Sven Schreiber wrote:
>> Not just Matlab, but also R, Python, Julia, you name it. > > What you're suggesting (making "eval" implicit for any input line that > doesn't make sense as a command or function call) could probably be > done, but there's a relevant difference between the languages you > mention and hansl. Unlike hansl, none of those languages have commands, > they all work purely via functions. So if a given input line is not a > function call it can immediately be taken as an "eval" request. > > Other languages that have commands -- bash, stata, for example, and I > suspect other econometrics software such as RATS, Eviews, Limdep -- > don't do the "automatic-eval" thing. By default they're expecting a > command-word, if not a function call. Ah, very insightful, yes. Although it has to be said that the ipython shell does both. (AFAIK its "magic" commands start with a % character, presumably to make them special and to separate them from the allowed identifiers in python. But the finite set of gretl commands could probably be treated in a similar way.) Also, the gretl console kind of already has a bit of implicit assumptions built in: For a known object x just typing 'x' is equivalent to typing 'print x', no? > At present we print one line of text when the console is opened, > apprising the user of 'help'. Maybe we could add a second line, > something like "You can use 'eval' to evaluate any expression". That would already be helpful I think. Perhaps even include a short example like 'eval I(2) + 2'. thanks, sven
