public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Damien Mattei <damien.mattei@gmail.com>
Cc: kawa@sourceware.org
Subject: Re: duplicate version reference - was #<syntax (scheme base) in #61>
Date: Fri, 3 Nov 2023 11:29:22 -0700	[thread overview]
Message-ID: <65a5c611-8d7a-4066-ad44-5f1a72283fd7@bothner.com> (raw)
In-Reply-To: <CADEOadePp2L-bjttw_9PUuaEx02ZhixnxAieLNNh52kVhPNoaA@mail.gmail.com>



On 11/3/23 10:57, Damien Mattei wrote:
> i understand. For my overloading operator idea, do you think is it
> possible in Kawa (like in guile: (define-method (+ (x <vector>) (y
> <vector>)) (vector-append x y)) ),using the class and defining method
> to overload some operators like + ,* ,etc ? and  even do it for basic
> type like vectors? allowing the use of + instead of vector-append?

First, I think using + for vector-append is a bad idea.
It's questionable for strings, but if + on vectors would be
better to mean vector addition - i.e. mapping + element-by-element.
(Of course my exposure to APL is influencing me here.)

Second, Kawa has some half-assed support for "multi-methods":
https://www.gnu.org/software/kawa/Generic-procedures.html
That could be enhanced.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

  reply	other threads:[~2023-11-03 18:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 17:25 Damien Mattei
2023-11-03 17:35 ` Per Bothner
2023-11-03 17:57   ` Damien Mattei
2023-11-03 18:29     ` Per Bothner [this message]
2023-11-03 23:48       ` Damien Mattei
2023-11-04 14:56         ` Damien Mattei

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=65a5c611-8d7a-4066-ad44-5f1a72283fd7@bothner.com \
    --to=per@bothner.com \
    --cc=damien.mattei@gmail.com \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).