This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: improvements to import form
- From: mikel evins <mevins at me dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: mikel evins <mevins at me dot com>, Kawa mailing list <kawa at sourceware dot org>
- Date: Wed, 15 Apr 2015 01:41:59 -0500
- Subject: Re: improvements to import form
- Authentication-results: sourceware.org; auth=none
- References: <552E0035 dot 5090401 at bothner dot com>
> On Apr 15, 2015, at 1:07 AM, Per Bothner <per@bothner.com> wrote:
>
> Using define-alias to abbreviate a classname is a bit verbose:
>
> (define-alias StringBuffer java.lang.StringBuffer)
>
> I checked in a new variant of import which should be more convenient:
>
> (import (class java.lang StringBuffer))
>
> The syntax is (import (class PREFIX NAME1 NAME2 ... NAMEN)).
> This is roughly equivalent to:
> (define-alias NAME1 PREFIX.NAME1)
> (define-alias NAME2 PREFIX.NAME2)
> ...
> (define-alias NAMEN PREFIX.NAMEN)
>
> Strictly speaking, it's more like define-private-alias, since the new
> names are (by default) not exported.
Thanks, Per. This is very nice for my uses and will eliminate some macrology I've been using.