This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Opinions: line/column numbering conventions in the Guile API


Tim Pierce <twp@skepsis.com> writes:

> As ugly as a mixed convention is, it seems to me that there is an
> advantage in using the same convention as Emacs.  When running Guile
> programs under Emacs buffers, Emacs should be able to do something
> useful with error reports,

I'm sorry.  I should have emphasized that my query concerns the API,
i.e. the programmers interface to Guile.  (But it may be important to
discuss the error report format here as well.)

Per Bothner pointed out that there is already a standard for error
reports, and we should probably adhere to it: In error reports,
column numbers should probably start with 1.  If we're running Guile
under Emacs, there are ways of letting Emacs swallow this position
information and do something useful with it instead of exposing it to
the user.

> If that were not the case, I think I would prefer 1-origin numbers for
> both lines and columns.  It would be less confusing to me as a Guile
> user to count lines and columns starting at 1.  If `port-lines' and
> `port-column' are intended mainly as user interface tools, it makes
> sense to cater to the user's expectations.

Hmm... "user" in what sense?  As a programmer, I usually prefer when
things are numbered starting with 0.  Note that `port-column' and
`port-line' will only be used by programmers.

/mdj