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

Exception Specifications

Expand Messages
  • Amr Elssamadisy
    Hi - just wanted to know what the group thought of this (evidently it is old news - a 2 year old post) - but I ve always thought that exception specs were one
    Message 1 of 23 , May 26, 2004
    • 0 Attachment
      Hi - just wanted to know what the group thought of this (evidently it is
      old news - a 2 year old post) - but I've always thought that exception
      specs were one of Java's really good features. Evidently not everyone
      feels this way - so I thought I'd ping the group and maybe get some
      enlightenment :)

      Here is something from MSDN. Just search for Stroustrup and Three Strikes

      Exception Specifications


      Next to export, exception specifications are probably the biggest conformance feature missing in Visual C++ .NET. And like export, it's a feature that sane people can argue should never have been in the language to begin with. Indeed, at a talk he gave at Microsoft a couple of months ago, C++ Godfather Bjarne Stroustrup labeled exception specifications a "failed experiment." Exception specifications are particularly nefarious because they don't do what many people think they do or want them to do.

      .... <snip>




      --
      Amr Elssamadisy

      Developer,Researcher,Student
      (In no particular order...)

      tel: (413) 207-1225
      email: amr@...
    • Eric Nickell
      Amr, I have mixed feelings about declaring exceptions. In everyday usage, they seem to help. But I don t think we really have a good handle on the edge cases.
      Message 2 of 23 , May 27, 2004
      • 0 Attachment
        Amr,

        I have mixed feelings about declaring exceptions. In everyday usage,
        they seem to help. But I don't think we really have a good handle on
        the edge cases.

        Let's say you're using two libraries, A and B. Particularly, library A
        requires that you implement your own class which extends an abstract
        class in A. Several design patterns (Bridge and AbstractFactory come
        to mind) lead to such libraries. The SAX parser would be an example.

        Now, you've created a class to extend some abstract class in library
        A. (Or, to implement some interface in library A.) If the
        functionality requires that the methods of this class access something
        in library B, you may run into exception problems. I'm assuming that
        libraries A and B were written independently of each other.

        This is the typical place where I get grief with exceptions.

        /1/ Was library written well enough that all methods you might
        reasonably extend throw some kind of checked exception? Can you write
        code to throw those exceptions?

        /2/ Even if /1/, the code to catch exceptions thrown by B and adapt
        them to the kind of exceptions that A knows about is klunky. And if
        you choose to deal with the exception outside of the call to A, the
        code to unwrap an exception of the type A knows about to find the
        exception of the type B knows about is also klunky. This isn't always
        needed, but does come up occasionally.
      • Keith Nicholas
        Hi All, I was recently asked by someone what s a good way for a 12 year old who has an interest in programming to get started. Anyone have any
        Message 3 of 23 , May 27, 2004
        • 0 Attachment
          Hi All,

          I was recently asked by someone what's a good way for a 12 year old who
          has an interest in programming to get started. Anyone have any
          recommendations? Ideas? Books? Etc

          Regards,

          Keith
        • Dossy
          ... Teach them Tcl. It s very powerful and the syntax is incredibly simple. And, Tk is one of the easiest GUI toolkits to learn. Brent Welch s Tcl/Tk book is
          Message 4 of 23 , May 27, 2004
          • 0 Attachment
            On 2004.05.28, Keith Nicholas <keithnlist@...> wrote:
            >
            > I was recently asked by someone what's a good way for a 12 year old who
            > has an interest in programming to get started. Anyone have any
            > recommendations? Ideas? Books? Etc

            Teach them Tcl. It's very powerful and the syntax is incredibly simple.
            And, Tk is one of the easiest GUI toolkits to learn.

            Brent Welch's Tcl/Tk book is an excellent book, as well.

            And, the tcltest package has existed since 1980 or so, and is very
            simple to use.

            -- Dossy

            --
            Dossy Shiobara mail: dossy@...
            Panoptic Computer Network web: http://www.panoptic.com/
            "He realized the fastest way to change is to laugh at your own
            folly -- then you can let go and quickly move on." (p. 70)
          • J. B. Rainsberger
            ... I think you can get much of our collective wisdom by reading the exceptions are evil pages on c2.com. Summary: checked exceptions (aka specified
            Message 5 of 23 , May 27, 2004
            • 0 Attachment
              Amr Elssamadisy wrote:

              > Hi - just wanted to know what the group thought of this (evidently it is
              > old news - a 2 year old post) - but I've always thought that exception
              > specs were one of Java's really good features. Evidently not everyone
              > feels this way - so I thought I'd ping the group and maybe get some
              > enlightenment :)

              I think you can get much of our collective wisdom by reading the
              "exceptions are evil" pages on c2.com.

              Summary: checked exceptions (aka specified exceptions) unnecessarily
              increase coupling between clients and providers; many checked exceptions
              are thrown in situations from which the client is unlikely to recover.
              --
              J. B. Rainsberger,
              Diaspar Software Services
              http://www.diasparsoftware.com :: +1 416 791-8603
              Let's write software that people understand
            • Alex Low (e-wise)
              Why not just let him begin with Visual Basic 6. VB is very easy to learn and to use. You can let him begin with all kinds of weird programming languages, but
              Message 6 of 23 , May 28, 2004
              • 0 Attachment
                Why not just let him begin with Visual Basic 6.
                VB is very easy to learn and to use.

                You can let him begin with all kinds of weird programming languages, but
                with VB he can really 'use' it on his computer and make useful things with
                it. It's also fun. Anyways I assume 12yo kids run windows :)


                Regards,
                Alex

                -----Original Message-----
                From: Keith Nicholas [mailto:keithnlist@...]
                Sent: vrijdag 28 mei 2004 0:46
                To: extremeprogramming@yahoogroups.com
                Subject: [XP] Teaching Kids to program... Whats the best language? Tool?
                Enviroment?

                Hi All,

                I was recently asked by someone what's a good way for a 12 year old who
                has an interest in programming to get started. Anyone have any
                recommendations? Ideas? Books? Etc

                Regards,

                Keith



                To Post a message, send it to: extremeprogramming@...

                To Unsubscribe, send a blank message to:
                extremeprogramming-unsubscribe@...

                ad-free courtesy of objectmentor.com
                Yahoo! Groups Links
              • Michael Campbell
                On Thu, 27 May 2004 22:33:20 -0400, J. B. Rainsberger ... I m not doubting you, I m just not understanding; given the above, how does the absence or presence
                Message 7 of 23 , May 28, 2004
                • 0 Attachment
                  On Thu, 27 May 2004 22:33:20 -0400, J. B. Rainsberger
                  <jbrains@...> wrote:

                  > ...; many checked exceptions
                  > are thrown in situations from which the client is unlikely to recover.

                  I'm not doubting you, I'm just not understanding; given the above, how
                  does the absence or presence of an exception declaration have any
                  bearing on that?

                  If the client is unlikely to [be able to?] recover, does it matter
                  that the exception is checked? Or are you saying that if it is a
                  checked exception, the client is required to add it to ITS list of
                  declared exceptions, for no value?

                  Thanks,

                  Michael
                • Amr Elssamadisy
                  Good idea - there is alot to read on c2 - so I will report more thoroughly later - also there is not an ExceptionsAreEvil page exactly - but quite a few where
                  Message 8 of 23 , May 28, 2004
                  • 0 Attachment
                    Good idea - there is alot to read on c2 - so I will report more
                    thoroughly later - also there is not an ExceptionsAreEvil page exactly -
                    but quite a few where that point is made. I've cut this quote from the
                    AvoidExceptionsWheneverPossible page - and it pretty much sums up my
                    point of view of exceptions:
                    <Quote>
                    I'm not sure what is being proposed as the alternative to exceptions.
                    Return an error value? But how do you ensure the caller checks it? And
                    shouldn't the function return value be used for something more
                    interesting, like its result? Passing in a parameter to be filled with
                    the (possible) error value is syntactically nasty and messes up the
                    caller (who now has to allocate the object). Eiher way seems to make for
                    more complicated code rather than less, and it becomes harder to
                    separate out the error handling.


                    But sometimes you don't /want/ to check the error value. The whole
                    point of the NullCatchClause
                    <http://www.c2.com/cgi/wiki?NullCatchClause> pattern - a pattern
                    that really does occur in nature - is that you have to do ugly
                    things to handle an error some fool library writer thought was
                    important. If Thread.sleep(int) simply returned an indication of
                    whether it was interrupted, a lot of noise could be eliminated from
                    what should be simple code.

                    ::That would only eliminate noise if you didn't check the return value,
                    and therefore didn't handle the exceptional condtion, an interruption --
                    ChrisMosher? <http://www.c2.com/cgi/wiki?edit=ChrisMosher>.
                    </Quote>

                    So - what do you recommend to use instead of exceptions? Should we not
                    know about exceptional states and just protect ourselves (supposedly)
                    with ignorance? Or is there another mechanism?

                    :)



                    J. B. Rainsberger wrote:

                    >Amr Elssamadisy wrote:
                    >
                    >
                    >
                    >>Hi - just wanted to know what the group thought of this (evidently it is
                    >>old news - a 2 year old post) - but I've always thought that exception
                    >>specs were one of Java's really good features. Evidently not everyone
                    >>feels this way - so I thought I'd ping the group and maybe get some
                    >>enlightenment :)
                    >>
                    >>
                    >
                    >I think you can get much of our collective wisdom by reading the
                    >"exceptions are evil" pages on c2.com.
                    >
                    >Summary: checked exceptions (aka specified exceptions) unnecessarily
                    >increase coupling between clients and providers; many checked exceptions
                    >are thrown in situations from which the client is unlikely to recover.
                    >
                    >

                    --
                    Amr Elssamadisy

                    Developer,Researcher,Student
                    (In no particular order...)

                    tel: (413) 207-1225
                    email: amr@...



                    [Non-text portions of this message have been removed]
                  • Keith Ray
                    ... I ve heard that [some?] exceptions in VW Smalltalk are resumable - if you catch an exception, you can take some kind of recovery action, and then resume
                    Message 9 of 23 , May 28, 2004
                    • 0 Attachment
                      > Summary: checked exceptions (aka specified exceptions) unnecessarily
                      > increase coupling between clients and providers; many checked
                      > exceptions
                      > are thrown in situations from which the client is unlikely to recover.

                      I've heard that [some?] exceptions in VW Smalltalk are "resumable" - if
                      you catch an exception, you can take some kind of recovery action, and
                      then resume the execution from where the exception was thrown.

                      In C++, I particularly hate it when the exceptions thrown are "int" or
                      some other type that isn't a subclass of std::exception. I want to be
                      able to catch std::exception at the top of my program and not have to
                      have a long list of catch clauses.

                      --
                      C. Keith Ray
                      <http://homepage.mac.com/keithray/blog/index.html>
                      <http://homepage.mac.com/keithray/xpminifaq.html>
                      <http://homepage.mac.com/keithray/resume2.html>
                    • J. B. Rainsberger
                      ... Absolutely! Why should I be forced to couple myself to an exception class when I have no chance of doing anything with the resulting exception objects? --
                      Message 10 of 23 , May 28, 2004
                      • 0 Attachment
                        Michael Campbell wrote:
                        > On Thu, 27 May 2004 22:33:20 -0400, J. B. Rainsberger
                        > <jbrains@...> wrote:
                        >
                        >
                        >>...; many checked exceptions
                        >>are thrown in situations from which the client is unlikely to recover.
                        >
                        >
                        > I'm not doubting you, I'm just not understanding; given the above, how
                        > does the absence or presence of an exception declaration have any
                        > bearing on that?
                        >
                        > If the client is unlikely to [be able to?] recover, does it matter
                        > that the exception is checked? Or are you saying that if it is a
                        > checked exception, the client is required to add it to ITS list of
                        > declared exceptions, for no value?

                        Absolutely! Why should I be forced to couple myself to an exception
                        class when I have no chance of doing anything with the resulting
                        exception objects?
                        --
                        J. B. Rainsberger,
                        Diaspar Software Services
                        http://www.diasparsoftware.com :: +1 416 791-8603
                        Let's write software that people understand
                      • Michael Campbell
                        On Fri, 28 May 2004 09:51:40 -0400, J. B. Rainsberger ... Gotcha, thanks. I m coming from a checked exception background, but delving into .NET and C#, and am
                        Message 11 of 23 , May 28, 2004
                        • 0 Attachment
                          On Fri, 28 May 2004 09:51:40 -0400, J. B. Rainsberger
                          <jbrains@...> wrote:
                          >
                          >
                          > Michael Campbell wrote:
                          > > On Thu, 27 May 2004 22:33:20 -0400, J. B. Rainsberger
                          > > <jbrains@...> wrote:
                          > >
                          > >
                          > >>...; many checked exceptions
                          > >>are thrown in situations from which the client is unlikely to recover.
                          > >
                          > >
                          > > I'm not doubting you, I'm just not understanding; given the above, how
                          > > does the absence or presence of an exception declaration have any
                          > > bearing on that?
                          > >
                          > > If the client is unlikely to [be able to?] recover, does it matter
                          > > that the exception is checked? Or are you saying that if it is a
                          > > checked exception, the client is required to add it to ITS list of
                          > > declared exceptions, for no value?
                          >
                          > Absolutely! Why should I be forced to couple myself to an exception
                          > class when I have no chance of doing anything with the resulting
                          > exception objects?


                          Gotcha, thanks.

                          I'm coming from a checked exception background, but delving into .NET
                          and C#, and am trying to get my brain re-wired. Sometimes in
                          unexpected ways. =)
                        • Jeff Grigg
                          ... A popular alternative in Java is unchecked exceptions. That is, instead of throwing exceptions that inherit from java.lang.Exception , which must be
                          Message 12 of 23 , May 28, 2004
                          • 0 Attachment
                            --- Amr Elssamadisy <amr@e...> wrote:
                            > So - what do you recommend to use instead of exceptions?
                            > Should we not know about exceptional states and just
                            > protect ourselves (supposedly) with ignorance? Or is
                            > there another mechanism?

                            A popular alternative in Java is "unchecked exceptions."

                            That is, instead of throwing exceptions that inherit
                            from 'java.lang.Exception', which must be declared in your 'throws'
                            clauses, throw exceptions that inherit from 'java.lang.Error'. These
                            do not have to be declared in any 'throws' clause. (But Java gets
                            annoying should you declare in code that you throw Error, Throwable
                            or any Error subclass. ;-)

                            In Java, you can be sure that no method will throw exceptions other
                            than the ones in its 'throws' clause. Except for Error exceptions --
                            any method may throw any Error exception at any time. ;->
                          • J. B. Rainsberger
                            ... I assume you re joking. :) To use unchecked exceptions, subclass from RuntimeException, and not Error. Thou shalt not throw Error; that s for the JVM to
                            Message 13 of 23 , May 28, 2004
                            • 0 Attachment
                              Jeff Grigg wrote:

                              > --- Amr Elssamadisy <amr@e...> wrote:
                              >
                              >>So - what do you recommend to use instead of exceptions?
                              >>Should we not know about exceptional states and just
                              >>protect ourselves (supposedly) with ignorance? Or is
                              >>there another mechanism?
                              >
                              >
                              > A popular alternative in Java is "unchecked exceptions."
                              >
                              > That is, instead of throwing exceptions that inherit
                              > from 'java.lang.Exception', which must be declared in your 'throws'
                              > clauses, throw exceptions that inherit from 'java.lang.Error'. These
                              > do not have to be declared in any 'throws' clause. (But Java gets
                              > annoying should you declare in code that you throw Error, Throwable
                              > or any Error subclass. ;-)
                              >
                              > In Java, you can be sure that no method will throw exceptions other
                              > than the ones in its 'throws' clause. Except for Error exceptions --
                              > any method may throw any Error exception at any time. ;->

                              I assume you're joking. :)

                              To use unchecked exceptions, subclass from RuntimeException, and not
                              Error. Thou shalt not throw Error; that's for the JVM to do.
                              --
                              J. B. Rainsberger,
                              Diaspar Software Services
                              http://www.diasparsoftware.com :: +1 416 791-8603
                              Let's write software that people understand
                            • Jeff Grigg
                              ... (Oops! Sorry. My mind was in a strange place. I stand corrected. ;-) I ve been working recently with a library with plenty of throws
                              Message 14 of 23 , May 28, 2004
                              • 0 Attachment
                                --- "J. B. Rainsberger" <jbrains@r...> wrote:
                                > To use unchecked exceptions, subclass from RuntimeException,
                                > and not Error. Thou shalt not throw Error; that's for the
                                > JVM to do.

                                (Oops! Sorry. My mind was in a strange place. I stand
                                corrected. ;-)

                                I've been working recently with a library with plenty of 'throws
                                java.lang.Throwable' clauses on methods I call. My methods are
                                implementing interfaces containing 'throws java.lang.Exception'. So
                                I have to catch java.lang.Error exceptions and rethrow them, or Java
                                won't let my methods compile. (Worse, I actually must catch
                                Throwable, cast to Exception or Error, and throw them.) It's stupid,
                                meaningless, worthless, wasteful, etc, etc, etc. But without fixing
                                the 3rd party library, I have to live with it.
                              • Amr Elssamadisy
                                ... Actually - if you are never forced by the compiler to acknowledge the exception is thrown - how do you know if you will be able to do anything about
                                Message 15 of 23 , May 28, 2004
                                • 0 Attachment
                                  <snip>

                                  >Absolutely! Why should I be forced to couple myself to an exception
                                  >class when I have no chance of doing anything with the resulting
                                  >exception objects?
                                  >
                                  >

                                  Actually - if you are never forced by the compiler to acknowledge the
                                  exception is thrown - how do you know if you will be able to do anything
                                  about it. Furthermore, even if you can't - maybe someone else using
                                  that library can.

                                  I just *really* don't get it. How can knowing more about a function -
                                  what errors it can produce be a bad thing? There are generally 3
                                  choices I am aware of:

                                  1) ignore the error.
                                  2) use exceptions
                                  3) use return values

                                  Are there more ways that I am not aware of? If so - why is (1) *ever*
                                  better than (2) or (3) ?

                                  --
                                  Amr Elssamadisy

                                  Developer,Researcher,Student
                                  (In no particular order...)

                                  tel: (413) 207-1225
                                  email: amr@...
                                • Doug Swartz
                                  ... One of the advantages of Squeak for children, is it s cool graphics and sound support. It s very easy to do things (like build games with graphical
                                  Message 16 of 23 , May 29, 2004
                                  • 0 Attachment
                                    Friday, May 28, 2004, 2:28:27 AM, Alex Low (e-wise) wrote:

                                    > Why not just let him begin with Visual Basic 6.
                                    > VB is very easy to learn and to use.

                                    One of the advantages of Squeak for children, is it's cool
                                    graphics and sound support. It's very easy to do things (like
                                    build games with graphical interfaces) which are quite
                                    difficult in most other environments, such as VB.

                                    > You can let him begin with all kinds of weird programming languages, but
                                    > with VB he can really 'use' it on his computer and make useful things with
                                    > it.

                                    Why do you assume truly useful things can't be built with
                                    "weird" languages like Smalltalk/Squeak? What makes a language
                                    weird? Is it because it's not sold by Microsoft? Is Lisp
                                    weird? Is COBOL weird?

                                    > It's also fun. Anyways I assume 12yo kids run windows :)

                                    I guess you haven't been to the schools my kids go to. Macs
                                    are alive and well. I've considered buying one myself, now
                                    that they run *nix.


                                    --

                                    Doug Swartz
                                    daswartz@...
                                  • Keith Ray
                                    For someone younger than 12, I d suggest HyperCard to start with (though HyperCard is dead, SuperCard lives on.) ... -- C. Keith Ray
                                    Message 17 of 23 , May 29, 2004
                                    • 0 Attachment
                                      For someone younger than 12, I'd suggest HyperCard to start with
                                      (though HyperCard is dead, SuperCard lives on.)

                                      On May 29, 2004, at 7:14 AM, Doug Swartz wrote:

                                      >
                                      > Friday, May 28, 2004, 2:28:27 AM, Alex Low (e-wise) wrote:
                                      >
                                      >> Why not just let him begin with Visual Basic 6.
                                      >> VB is very easy to learn and to use.
                                      >
                                      > One of the advantages of Squeak for children, is it's cool
                                      > graphics and sound support. It's very easy to do things (like
                                      > build games with graphical interfaces) which are quite
                                      > difficult in most other environments, such as VB.
                                      >
                                      >> You can let him begin with all kinds of weird programming languages,
                                      >> but
                                      >> with VB he can really 'use' it on his computer and make useful things
                                      >> with
                                      >> it.
                                      >
                                      > Why do you assume truly useful things can't be built with
                                      > "weird" languages like Smalltalk/Squeak? What makes a language
                                      > weird? Is it because it's not sold by Microsoft? Is Lisp
                                      > weird? Is COBOL weird?
                                      >
                                      >> It's also fun. Anyways I assume 12yo kids run windows :)
                                      >
                                      > I guess you haven't been to the schools my kids go to. Macs
                                      > are alive and well. I've considered buying one myself, now
                                      > that they run *nix.
                                      >
                                      >
                                      > --
                                      >
                                      > Doug Swartz
                                      > daswartz@...
                                      >
                                      >
                                      >
                                      > To Post a message, send it to: extremeprogramming@...
                                      >
                                      > To Unsubscribe, send a blank message to:
                                      > extremeprogramming-unsubscribe@...
                                      >
                                      > ad-free courtesy of objectmentor.com
                                      > Yahoo! Groups Links
                                      >
                                      >
                                      >
                                      >
                                      >
                                      >
                                      --
                                      C. Keith Ray
                                      <http://homepage.mac.com/keithray/blog/index.html>
                                      <http://homepage.mac.com/keithray/xpminifaq.html>
                                      <http://homepage.mac.com/keithray/resume2.html>
                                    • J. B. Rainsberger
                                      ... NP. ... ...reason #45 not to like checked exceptions. -- J. B. Rainsberger, Diaspar Software Services http://www.diasparsoftware.com :: +1 416 791-8603
                                      Message 18 of 23 , May 30, 2004
                                      • 0 Attachment
                                        Jeff Grigg wrote:

                                        > --- "J. B. Rainsberger" <jbrains@r...> wrote:
                                        >
                                        >>To use unchecked exceptions, subclass from RuntimeException,
                                        >>and not Error. Thou shalt not throw Error; that's for the
                                        >>JVM to do.
                                        >
                                        > (Oops! Sorry. My mind was in a strange place. I stand
                                        > corrected. ;-)

                                        NP.

                                        > I've been working recently with a library with plenty of 'throws
                                        > java.lang.Throwable' clauses on methods I call. My methods are
                                        > implementing interfaces containing 'throws java.lang.Exception'. So
                                        > I have to catch java.lang.Error exceptions and rethrow them, or Java
                                        > won't let my methods compile. (Worse, I actually must catch
                                        > Throwable, cast to Exception or Error, and throw them.) It's stupid,
                                        > meaningless, worthless, wasteful, etc, etc, etc. But without fixing
                                        > the 3rd party library, I have to live with it.

                                        ...reason #45 not to like checked exceptions.
                                        --
                                        J. B. Rainsberger,
                                        Diaspar Software Services
                                        http://www.diasparsoftware.com :: +1 416 791-8603
                                        Let's write software that people understand
                                      • J. B. Rainsberger
                                        ... If there were a way to easily say propagate all exceptions up the chain, then I would do that. Unfortunately, there are an infinite number of ways to say
                                        Message 19 of 23 , May 30, 2004
                                        • 0 Attachment
                                          Amr Elssamadisy wrote:

                                          > <snip>
                                          >
                                          >>Absolutely! Why should I be forced to couple myself to an exception
                                          >>class when I have no chance of doing anything with the resulting
                                          >>exception objects?
                                          >>
                                          >>
                                          >
                                          >
                                          > Actually - if you are never forced by the compiler to acknowledge the
                                          > exception is thrown - how do you know if you will be able to do anything
                                          > about it. Furthermore, even if you can't - maybe someone else using
                                          > that library can.
                                          >
                                          > I just *really* don't get it. How can knowing more about a function -
                                          > what errors it can produce be a bad thing? There are generally 3
                                          > choices I am aware of:
                                          >
                                          > 1) ignore the error.
                                          > 2) use exceptions
                                          > 3) use return values
                                          >
                                          > Are there more ways that I am not aware of? If so - why is (1) *ever*
                                          > better than (2) or (3) ?

                                          If there were a way to easily say "propagate all exceptions up the
                                          chain," then I would do that. Unfortunately, there are an infinite
                                          number of ways to say this in Java. Sometimes it's "throws SQLException"
                                          and sometimes it's "throws FileNotFoundException" and something it's
                                          "throws blah, blah, blah, blah, blah".

                                          I'm all for information; but I don't think I need the compiler to force
                                          me to type all this nonsense. As a result, I end up typing "throws
                                          Exception" a lot, and that's really not all that useful, is it?
                                          --
                                          J. B. Rainsberger,
                                          Diaspar Software Services
                                          http://www.diasparsoftware.com :: +1 416 791-8603
                                          Let's write software that people understand
                                        • Phlip
                                          ... An editor which can automatically add and remove blah specifications is a Design Smell in the language design. If this effect could have been automated,
                                          Message 20 of 23 , May 30, 2004
                                          • 0 Attachment
                                            J. B. Rainsberger wrote:

                                            > If there were a way to easily say "propagate all
                                            > exceptions up the
                                            > chain," then I would do that. Unfortunately, there
                                            > are an infinite
                                            > number of ways to say this in Java. Sometimes it's
                                            > "throws SQLException"
                                            > and sometimes it's "throws FileNotFoundException"
                                            > and something it's
                                            > "throws blah, blah, blah, blah, blah".

                                            An editor which can automatically add and remove
                                            "blah" specifications is a Design Smell in the
                                            language design. If this effect could have been
                                            automated, then why isn't it automated inside the
                                            language itself?


                                            =====
                                            Phlip
                                            http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces




                                            __________________________________
                                            Do you Yahoo!?
                                            Friends. Fun. Try the all-new Yahoo! Messenger.
                                            http://messenger.yahoo.com/
                                          • Michael Campbell
                                            ... ? Why could one not call the fact a compiler is needed a similar language design smell?
                                            Message 21 of 23 , May 31, 2004
                                            • 0 Attachment
                                              On Sun, 30 May 2004 19:20:25 -0700 (PDT), Phlip <phlipcpp@...> wrote:
                                              >
                                              > J. B. Rainsberger wrote:
                                              >
                                              > > If there were a way to easily say "propagate all
                                              > > exceptions up the
                                              > > chain," then I would do that. Unfortunately, there
                                              > > are an infinite
                                              > > number of ways to say this in Java. Sometimes it's
                                              > > "throws SQLException"
                                              > > and sometimes it's "throws FileNotFoundException"
                                              > > and something it's
                                              > > "throws blah, blah, blah, blah, blah".
                                              >
                                              > An editor which can automatically add and remove
                                              > "blah" specifications is a Design Smell in the
                                              > language design. If this effect could have been
                                              > automated, then why isn't it automated inside the
                                              > language itself?

                                              ? Why could one not call the fact a compiler is needed a similar
                                              language design smell?
                                            • J. B. Rainsberger
                                              ... Yes, and I could live with the design smell if my tools acted as a good deodorizer. I have to resign myself to the fact that the language likely won t
                                              Message 22 of 23 , Jun 1, 2004
                                              • 0 Attachment
                                                Phlip wrote:

                                                > J. B. Rainsberger wrote:
                                                >
                                                >>If there were a way to easily say "propagate all
                                                >>exceptions up the
                                                >>chain," then I would do that. Unfortunately, there
                                                >>are an infinite
                                                >>number of ways to say this in Java. Sometimes it's
                                                >>"throws SQLException"
                                                >>and sometimes it's "throws FileNotFoundException"
                                                >>and something it's
                                                >>"throws blah, blah, blah, blah, blah".
                                                >
                                                > An editor which can automatically add and remove
                                                > "blah" specifications is a Design Smell in the
                                                > language design. If this effect could have been
                                                > automated, then why isn't it automated inside the
                                                > language itself?

                                                Yes, and I could live with the design smell if my tools acted as a good
                                                deodorizer. I have to resign myself to the fact that the language likely
                                                won't change....
                                                --
                                                J. B. Rainsberger,
                                                Diaspar Software Services
                                                http://www.diasparsoftware.com :: +1 416 791-8603
                                                Let's write software that people understand
                                              • J. B. Rainsberger
                                                ... One may. I do. -- J. B. Rainsberger, Diaspar Software Services http://www.diasparsoftware.com :: +1 416 791-8603 Let s write software that people
                                                Message 23 of 23 , Jun 1, 2004
                                                • 0 Attachment
                                                  Michael Campbell wrote:

                                                  > On Sun, 30 May 2004 19:20:25 -0700 (PDT), Phlip <phlipcpp@...> wrote:
                                                  >
                                                  >>J. B. Rainsberger wrote:
                                                  >>
                                                  >>
                                                  >>>If there were a way to easily say "propagate all
                                                  >>>exceptions up the
                                                  >>>chain," then I would do that. Unfortunately, there
                                                  >>>are an infinite
                                                  >>>number of ways to say this in Java. Sometimes it's
                                                  >>>"throws SQLException"
                                                  >>>and sometimes it's "throws FileNotFoundException"
                                                  >>>and something it's
                                                  >>>"throws blah, blah, blah, blah, blah".
                                                  >>
                                                  >>An editor which can automatically add and remove
                                                  >>"blah" specifications is a Design Smell in the
                                                  >>language design. If this effect could have been
                                                  >>automated, then why isn't it automated inside the
                                                  >>language itself?
                                                  >
                                                  > ? Why could one not call the fact a compiler is needed a similar
                                                  > language design smell?

                                                  One may. I do.
                                                  --
                                                  J. B. Rainsberger,
                                                  Diaspar Software Services
                                                  http://www.diasparsoftware.com :: +1 416 791-8603
                                                  Let's write software that people understand
                                                Your message has been successfully submitted and would be delivered to recipients shortly.