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

Re: [XP] Pattern Encoded Suffix

Expand Messages
  • MarvinToll.com
    Ron, Sounds like you and Tim are not in alignment on the impact to the reader of the code. My perspective also focuses on the impact to the author. However,
    Message 1 of 191 , Aug 9, 2012
      Ron,

      Sounds like you and Tim are not in alignment on the impact to the reader of the code.

      My perspective also focuses on the impact to the author. However, it appears most people do not talk much about what happens in an author's brain when including a pattern in a class name. This "reader" vs "author" discussion imbalance is evidenced by comments to an informal poll on the Java Architect forum:

      http://www.linkedin.com/groups/Does-using-Pattern-Encoding-suffix-50472.S.141854572?qid=067a7f8b-deab-4dcb-9c40-093d9993fdf9&trk=group_most_popular-0-b-ttl&goback=%2Egmp_50472

      _Marvin

      --- In extremeprogramming@yahoogroups.com, RonJeffries <ronjeffries@...> wrote:
      >
      > The programmer does not need to know every time he looks at a class name what pattern it comes from. He needs to know that infrequently. Therefore the pattern should not generally be part of the name.
      >
      > Ron Jeffries
      > www.XProgramming.com
      > If not now, when? -- Rabbi Hillel
    • MarvinToll.com
      Jeff, Thanks for your feedback. The notion that a a Java author precisely considers whether they are using one of the two exception mechanisms to indicate a
      Message 191 of 191 , Sep 23, 2012
        Jeff,

        Thanks for your feedback.

        The notion that a a Java author precisely considers whether they are using one of the two exception mechanisms to indicate a true unanticipated exceptional break-down, or as an indication of alternate path processing (e.g. instead of return codes), is the thought-path I'm suggesting for consideration.

        As you mentioned (twice), there are contexts where the author could be wrong... and the code catching can respond as required.

        Said another way, I'm suggesting that authors throwing exceptions clarify the intended usage... even though a client's corner-case might warrant a different course than the author anticipated.

        _Marvin
        PatternEnabled.com

        --- In extremeprogramming@yahoogroups.com, "JeffGrigg" <jeffreytoddgrigg@...> wrote:
        >
        > The code that throws an exception should not (and cannot reasonably) know how the code that catches it will handle it. It's the responsibility of the code that catches the exception to do the right thing.
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.