[61] in java-interest

home help back first fref pref prev next nref lref last post

Re: Proposed Java Language Extentions

daemon@ATHENA.MIT.EDU (Casey Leedom)
Mon May 8 14:20:09 1995

From: leedom@gauss.asd.sgi.com (Casey Leedom)
To: java-interest@java.Eng.Sun.COM
Date: Mon, 08 May 1995 10:50:10 -0700

One of the extesions that you've adopted was something along the lines of:

    int[] a;

as an alternative for

    int a[];

I've thought about a syntax something like this to address the C++
stylistic abomination of

    int* a;

I hate this for reasons which should be obvious: it's just plain wrong and
deceptive.  If I do ``int* a, b;'' I don't end up with two pointers to
integers.  Nevertheless, I understand *what* people are trying to convey
when they use such misleading syntax: they're trying to declare a pointer
to an integer that happens to be named ``a'' without having to associate
the asterisk with the name (i.e. ``int *a;'') or invent an intermediate
typedef just to encode ``int *''.  What I think would do the trick is the
concept of anonymous inline typedefs.  Here's an example of something
along these lines:

    <int*> a, b;

It strikes me that your new array declaration alternative syntax is headed
in this derection and that it might better just to finish the job.  I.e.:

    <int[]> a;

Just my two cents ...

Casey

-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post