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

Re: Naming convention for ZigZag functions

> On Wed, Nov 18, 1998 at 11:54:40PM +1100, Bek Oberin wrote:
> > Andrew Pam wrote:
> > > I hereby request that we avoid the & syntax altogether unless semantically
> > > required, and find another way to distinguish local functions.  Perhaps we
> > > should capitalise the first letter of local functions?
> > 
> > Ghods NO.  Don't do anything so hideously ugly and non-standard!
> It's just a naming convention, and I have seen it used before.  It is
> consistent with the global variables too - after all, the functions also
> have global scope (within package main, anyway!)
> Of course, another alternative might be to prefix all our functions with "zz_"

I think the problem may go away by itself once the OO interface is
finished.  Instead of this:

	sub zz_cursor_move_direction
	# Move given cursor in a given direction
	   my $curs = &zz_cursor_get($_[0]);
                                     &zz_cursor_get_dimension($curs, $_[1]));

We will have something like this:

	sub cursor_move_dimension {
	  my ($zz, $win_num, $dir) = @_
          my $window = $zz->window($win_num); 
	  my $curs = $window->cursor(); 
	  my $dim = $window->dir_to_dim($dir)