This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Simplifying type names
Jocelyn Paine <popx@pop3.ifs.org.uk> writes:
> Using type-specifiers such as <java.util.Vector> in let-expressions
> and function formal parameter lists and results, is there a way to
> avoid having to write the entire package prefix? Like many other
> Java programmers, some of my package prefixes are quite long -
> e.g. <kb7.mm3.general.Term> - and it would ease writing and readability
> (as long as one ensures there's no ambiguity) if only the class-name
> suffix (<Vector> or <Term>) could be used. Any equivalent of Java's
> 'package' prefix?
You can use define-alias. See examples in gnu/jemacs/buffer/emacs.scm.
Using define-alias is perhaps more verbose than an import statement,
but much more useful, since it allows class renaming.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/