On 08 Aug 2001 14:57:41 +0200, Dominik Vogt wrote:
> 
> On Wed, Aug 08, 2001 at 04:45:34AM +0000, Mikhael Goikhman wrote:
> > 
> > In any way, this solution is more clean and extendible than the Dominik's
> > one and it does not change any existing syntax.
> 
> Hm.  I'd really prefer a solution that is *not* extensible.  I
> thought there was a common consensus that we don't want to
> implement a scripting language in fvwm.

Are not scripting language and extensible solutions orthogonal?

Maybe we speak about different meanings of extensible solution, or you
really prefer to solve all new and old problems separately? For example,
if there is a need to do the following

  1) Add an alternative command to conditions
  2) Try several file names to Read
  3) Determine that a module was not started
  4) Determine a timeout in some commands

you suggest to alter a syntax of Next, Read, Module, ModuleSynchronous and
others, instead of identifying that all these problems are actually one
if-else problem and implementing an extensible solution, like command
statuses and "Otherwise", without a need to change any existing syntax?
With this solution, solving more similar problems is done by adding a line.

Or another example of extensible solution. We currently only need a
command status True/False, so we go with Boolean by adding it to many
places. But tomorrow we will need another Boolean, so we should add it to
the same places again. An extensible solution would suggest that we will
need more than a Boolean in the future and do it in the first place.

> > So, if there are no
> > objections I will apply the merged patch implementing this new command.
> > 
> > And BTW, it has sense (not yet) to call this command outside of functions.
> > 
> >   Read myfile1 quiet
> >   Otherwise Read myfile2 quiet
> >   Otherwise Echo Error: No myfile1 or myfile2 found
> 
> That's the best example I could think of why global variables are
> *not* the way to go.  Whenever a command is executed outside a
> function, there is a chance that another command gets executed
> first and screws up the return code.

You are right, there is a common problem with synchronizing commands from
the same stream in concurrent environment. But there are no problems if
these commands are Read from a file, because another command can't get
executed until the file is finished.

So I still think that Otherwise outside of functions is useful, although
it is almost useless interactively.

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to