public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Duncan Mak <duncanmak@gmail.com>,
	kawa mailing list <kawa@sourceware.org>
Subject: Re: Pretty-printing records
Date: Tue, 01 Jan 2019 03:33:00 -0000	[thread overview]
Message-ID: <bd27b0c2-1de4-3ac2-cecd-5820c2cf8f94@bothner.com> (raw)
In-Reply-To: <CABgWrqq8Rycv3O_Vf4afhQS40fvTMWojSQuUStrQuGJT5+LfBQ@mail.gmail.com>

On 12/31/18 6:58 PM, Duncan Mak wrote:
> Hello,
> 
> Is there an extension to Kawa that will allow SRFI 9 records (or other
> records?) to have a nice pretty-print in the REPL?

It woudl be easier for make-record-type records, since printing those
already prints out the fields.  So it's just a matter of checking for
classes that extend kawa.lang.Record.

Something similar could be done for SRFI-9 records, but it might take some changes
in how they are implemented, to better support introspection.  Using Java
reflection is possible, though maybe expensive.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

  reply	other threads:[~2019-01-01  3:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  2:59 Duncan Mak
2019-01-01  3:33 ` Per Bothner [this message]
2019-01-01 20:05   ` Per Bothner
2019-01-01 20:42     ` Duncan Mak
2019-01-01 21:37       ` 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:
  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=bd27b0c2-1de4-3ac2-cecd-5820c2cf8f94@bothner.com \
    --to=per@bothner.com \
    --cc=duncanmak@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).