public inbox for
 help / color / mirror / Atom feed
From: Duncan Mak <>
To: kawa mailing list <>
Subject: Disambiguate method from function
Date: Wed, 16 Dec 2020 03:49:01 -0500	[thread overview]
Message-ID: <> (raw)

Hello all,

I have some code like this,

(define-simple-class Person ()
>   ((hello)
>    (hello "Calling from method")))

(define (hello message) (format #t "~A~%" message))

(hello "Calling from function")
> ((Person):hello)

This doesn't work because I think it gets confused between hello the method
and hello the function:

test.scm:3:4: call to 'hello' has too many arguments (1; must be 0)

I could of course resolve this by renaming 'hello' the function to
something like 'hello*', but is there another way to disambiguate the two?


             reply	other threads:[~2020-12-16  8:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  8:49 Duncan Mak [this message]
2020-12-16 10:59 ` Per Bothner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).