From: Florian Weimer <someone@deneb.cygnus.argh.org>
Subject: Re: Dummy
Date: 2000/02/07
Date: 2000-02-07T19:54:35+00:00 [thread overview]
Message-ID: <873dr4pz44.fsf@deneb.cygnus.argh.org> (raw)
In-Reply-To: t7ya8xdp3z.fsf@calumny.jyacc.com
Hyman Rosen <hymie@prolifics.com> writes:
> class a
> {
> interface i
> {
> int get();
> void set(int n);
> }
> i local_ref()
> {
> int local;
> return new i {
> int get() { return local; }
> void set(int n) { local = n; }
> };
> }
> static void main(String[] v)
> {
> i i1 = local_ref();
> i i2 = local_ref();
> i1.set(3);
> i2.set(4);
> System.out.println(i1.get());
> System.out.println(i2.get());
> }
> }
This prints `3' and `4', doesn't it? Cool. I didn't know that Java
supports class closures. Now Java only needs operator overloading
and some syntactic sugar for dispatching by name and introspection,
and Java will become my favorite scripting language. ;)
next prev parent reply other threads:[~2000-02-07 0:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-02 0:00 Dummy Simic_10111
[not found] ` <3898C380.BC01EC03@earthlink.net>
2000-02-03 0:00 ` Dummy Hyman Rosen
2000-02-03 0:00 ` Dummy Tucker Taft
2000-02-04 0:00 ` Dummy Robert A Duff
2000-02-04 0:00 ` Dummy Florian Weimer
2000-02-04 0:00 ` Dummy Robert A Duff
2000-02-05 0:00 ` Dummy Jean-Pierre Rosen
2000-02-10 0:00 ` Dummy Geoff Bull
2000-02-07 0:00 ` Dummy Hyman Rosen
2000-02-07 0:00 ` Florian Weimer [this message]
2000-02-07 0:00 ` Dummy Hyman Rosen
2000-02-03 0:00 ` Dummy Gautier
2000-02-03 0:00 ` Dummy Hyman Rosen
2000-02-03 0:00 ` Dummy Larry Kilgallen
2000-02-03 0:00 ` Dummy Hyman Rosen
2000-02-03 0:00 ` Dummy Larry Kilgallen
[not found] ` <389c50a6.14707859@news.flash.net>
2000-02-04 0:00 ` Dummy Marin D. Condic
-- strict thread matches above, loose matches on Subject: below --
2000-01-11 0:00 Dummy Simic_10111
2000-01-11 0:00 ` Dummy Gautier
2000-01-11 0:00 ` Dummy Ehud Lamm
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox