Confusing error message

Charles Turner chturne@gmail.com
Sun Apr 17 09:55:00 GMT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 17/04/11 08:04, Per Bothner wrote:
> Technically the "integer" type should probably be renamed "exact-integer"
> - that would be more compatible with R6RS and the just-released R7RS draft.

My mistake. For some reason I associated things like inexact? exact? as
"type checkers" in a sense. If there is an "exact-integer" it makes
sense to me that there should be an "inexact-integer" too. I suppose it
would be sensible to call DFloNum a "real" then, so that,

#|kawa:1|# (cdr #i4)
Argument #1 '4.0' to 'cdr' has wrong type (gnu.math.DFloNum)
; acutally it currently says "inexact"....

would read "... has wrong type (real)".

> I prefer not.  Mostly Kawa looks at the Java method signature, and
> maps that into language types. Mostly that works, but isn't quite right.
> Better would be to use java.lang.reflect.Method#getGenericParameterTypes,
> but that seems non-trivial.  Alternatively, one could use an annotation.

> About your patch:  Mostly good, but some concerns:
> 
> In WrongType, it might be good to make the code more robust in case
> currentLang is null.  Perhaps:

Sorry about that.

> You're write that the old comment was wrong.  Ooops. But it would be
> better to use the {@code ...} JavaDoc syntax, since <<code> doesn't solve 
> the problem with the <<:

Didn't know about that, thanks!

Thank you for your feedback.

Charles.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJNqrjvAAoJEG9M6fiX7bE4RBIH/0uVzFVfCJFDXmwNsI8+Ca/U
HCdMH4No6DocQ5WZcQ+IEbuAK6XEmtHkOBlWQUBtfjJQAbCX660QgMOGLvTqVXpD
2ANsQqYYd8RSu9BQg3Rigcbn1ozLYIn5xlpgX+3ejiZgP3nKJux7lutYjpSBShd9
c/ndbgA5rBdLUtNE7NvA+vXPaeQ2kuEomlwVLeVLfjZ58sS+1ICgZPKKDzSAfZO8
9Mwp6pXb4kHfwMisYjLNTJ8SwzEvSWjiTBTJ0lBjA3b+NS0cIvu+WZQFI+7Wbvk6
VUQ7zPt+L7iak/XL7Mo4hF9UHMxufvo47ewgPW5FQhgJIQ7nvEUxaKlsGgx+zH0=
=mlQ9
-----END PGP SIGNATURE-----



More information about the Kawa mailing list