Loading ...
Sorry, an error occurred while loading the content.

Re: [JSX-ideas] $ and Inner-class naming

Expand Messages
  • Brendan Macmillan
    ... No, it would need to be called ArrayOf- to confuse JSX... ... Yes, it does already: the - . ;-) But it doesn t hurt to reiterate such ideas, as it s
    Message 1 of 11 , Sep 1, 2001
    • 0 Attachment
      > > > Hmmm... I suppose we could just replace "$" with "-$":
      > > > <ArrayOf-$Fred
      >
      > ...seeing this example... what if i implement a class that is actually
      > called 'ArrayOf'. wouldnt that confuse JSX?
      No, it would need to be called "ArrayOf-" to confuse JSX...

      > JSX should build some invalid java into every XML tag it generates for its
      > own purposes...
      Yes, it does already: the "-". ;-)

      But it doesn't hurt to reiterate such ideas, as it's surprisingly easy to
      overlook them.

      > > "java.util.Collections..Synchronized"
      > I like that best for that it is short and looks good.
      Great!

      > P.S.: I am off for a week now. i won't read my mail on a beach in
      > greece...
      Just had to mention where you were going, didn't you? hehehe ;-)

      Hope you had a great time!


      Cheers,
      Brendan
      --
      e: bren@... v: +61 (3) 9905 1502
      Email is checked daily Phone is rarely attended
    • Brendan Macmillan
      ... I didn t see this issue at all! You are quite right, thanks. ... I somehow think you are saying that B. would be better? ;-) It s just that A. is much
      Message 2 of 11 , Sep 1, 2001
      • 0 Attachment
        > Here's a question, do you think it would be better to:
        >
        > A. Just make JSX0.8.20.2 write out ".." but be able to read in "$" and
        > ".."
        I didn't see this issue at all! You are quite right, thanks.

        > or
        >
        > B. Implement versionning first, and then solve the problem?
        >
        > Welcome to the slippery slope :)

        I somehow think you are saying that B. would be better? ;-) It's just that
        A. is much much easier - at least for the single case, anyway.

        I think B. requires a lot of design (eg: how to handle the two cases in A?),
        and I won't be able to devote the time to it until after Wednesday. But I
        could do A in an hour or so. Easy!

        For B, how would we solve the problem, if versioning was implemented first?
        If it is pre-0.8.20.2, then set a flag "old$treatment" to be true. In the
        code for getting classes from class names, to test this flag. If old, then
        do no mapping; if new, then do the new mapping.

        Another way to implement this is to subclass JSX, and override the old mapping
        method. Then, we have a factory method to return the instance of JSX to use,
        instead of setting and testing an explicit flag.

        These issues are important to think about! For example, now it seems clear
        that we need an ordering over version numbers. We could do this with a
        version class, implementing the "Comparable" interface. We could store the
        version as an array of ints (or perhaps a vector).

        However, even with B's versioning, I still like the idea of it being able to
        read both formats - that is, if for some reason there is a $, that it can
        read it OK. Arguable, it should throw an exception in this case, because
        it is breaking the rules of that specific version.

        Ah! Making it like A (that is, robust instead of brittle) is important for
        the case where a human is entering the class name. Of course, versioning
        does still need to be done.

        How does that sound? Anyway, I've got to go right now - it's been a very
        interesting bunch of posts to the list today! Thanks to all.


        Cheers,
        Brendan
        --
        e: bren@... v: +61 (3) 9905 1502
        Email is checked daily Phone is rarely attended
      Your message has been successfully submitted and would be delivered to recipients shortly.