This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

function argument numbering


In error messages, arguments to a function have been
numbered starting at 0:

#|kawa:1|# (sqrt "23")
Argument #0 to 'sqrt' has wrong type

I'd like to change that to starting at 1.  I think this is
more natural for people.  It does seem to be consistent with
Guile.  Any opinions for or against?

Btw: in my latest code, the exception message is more informative:

#|kawa:1|# (sqrt "23")
Argument #1 (23) to 'sqrt' has wrong type (gnu.lists.FString) (expected: gnu.math.Quantity)


Later, we should replace the gnu.lists.FString and gnu.math.Quantity
by <string> and <quantity> respectively, but the complication is that
this mapping should be language-dependent.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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