Re: "static" prefix - to parallel "this" prefix
From: Tim Tyler (tim_at_tt1lock.org)
Date: 12/06/04
- Next message: christoph_at_breidert.net: "HttpSession expired vs. invalidated"
- Previous message: christoph_at_breidert.net: "HttpSession expired vs. invalidated"
- In reply to: Chris Uppal: "Re: "static" prefix - to parallel "this" prefix"
- Next in thread: Tim Tyler: "Re: "static" prefix - to parallel "this" prefix"
- Reply: Tim Tyler: "Re: "static" prefix - to parallel "this" prefix"
- Reply: Chris Uppal: "Re: "static" prefix - to parallel "this" prefix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 6 Dec 2004 15:21:03 GMT
Chris Uppal <chris.uppal@metagnostic.remove-this.org> wrote or quoted:
> Tim Tyler wrote:
> > Suggested syntax would be "static.var" and "static.method()" -
> > instead of today's "ClassName.var" and "ClassName.method()".
> [...]
> > Has this been suggested before?
> >
> > Does it make sense to you?
> >
> > Are there any other proposals to deal with the same issue?
>
> Yes, yes, and yes, respectively ;-)
>
> Alex Hunsley posted a similar suggestion (maybe identical) a few months ago;
> see this thread (sorry about the URL, but it seems that Google is in the
> process of switching how the Google groups work):
>
> http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4ceda7465055571c
>
> (in case the URL stops working, the thread's title is "Good idea or full it
> it?")
>
> Personally, I like the idea but think it would work still better with a
> different keyword such as 'thisClass', see my post in the above thread for
> details.
The idea of eliminating constructor names is appealing.
However, I'm not sure what syntax would be best for that.
About the only alternative I considered for "static." was "class.".
It would *have* to be an existing keyword (or a symbol?) - unless you were
prepared for name clashes with identifiers in existing code.
I also think that "this." should be available to refer to static
data within static methods - and that there should be a corresponding
static object associated with the class that is accessible to the
programmer - i.e. that Java should behave more like smalltalk,
with everything being an object - and having a "this" reference.
However that would result in much more major surgery - and Java
probably has too much inertia for that sort of surgery to be
practical at this late date.
-- __________ |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
- Next message: christoph_at_breidert.net: "HttpSession expired vs. invalidated"
- Previous message: christoph_at_breidert.net: "HttpSession expired vs. invalidated"
- In reply to: Chris Uppal: "Re: "static" prefix - to parallel "this" prefix"
- Next in thread: Tim Tyler: "Re: "static" prefix - to parallel "this" prefix"
- Reply: Tim Tyler: "Re: "static" prefix - to parallel "this" prefix"
- Reply: Chris Uppal: "Re: "static" prefix - to parallel "this" prefix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|