Marcus Denker <den...@...> writes: > > > On 25.02.2009, at 22:27, Matthew Fulmer wrote: > > >> > >> Each command will then be a message sent to the object referenced by > >> the variable 'shell'. > >> > >> entering 'ls' will then invoke 'shell.ls'... > > I would say that a command like "ls" is not a method. It's an object > (instance of a sublass of "Script" or "Command"). > > You want, for example, inherit things like command line parsing, > standard options > (e.g. --help) and things liket that. A command like ls is far too > complex to be > just one method. > > Marcus > > -- > Marcus Denker -- den...@... > http://www.marcusdenker.de >
I would say ls is a message, and Shell ls answer with a LSCommand which is kindOf: Command. A Command use lazy evaluation: it does not evaluate until a end of line or pipe message triggers evaluation (i mean send the message #value). Before being evaluated, Command behaviour can be modified by sending all sort of message, like -l --help etc... Of course, apart options which are messages sent to the command (eventually with arguments), a list of arguments can be passed to the Command itself (Command valueWithArguments: aList). Just have to invent the syntax now... Nicolas _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
