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

Re: [XP] Eliminate Exceptions (was: Writing simple software - A Challenge!)

Expand Messages
  • Kyle Cordes
    From: Ron Jeffries ... It all depends on how you need the collection to work, of course. I wasn t trying to make any point at all
    Message 1 of 139 , Dec 1, 2002
    • 0 Attachment
      From: "Ron Jeffries" <ronjeffries@...>

      > Consider now a set of records People, containing fields Name, Address,
      > and Phone. The result of this query:
      >
      > People select p such that p.Height = 72inches
      >
      > is therefore an empty set of people. Now it is possible to argue (and
      > Kyle apparently does) that this query is a mistake and should hurl.


      It all depends on how you need the collection to work, of course. I
      wasn't trying to make any point at all about situations like this one.
      Rather, if you send in a query like this:

      People select 879548w49s^%45 )-d6b7s4p7-0s3b70b 9 8sy90 r9u r

      Of if you send in a well-formed query, but this collection has some kind
      of database behind it, I'd much appreciate a meanigful exception rather
      than an empty set. I want an empty set to me "I understood the
      invocation, it made sense, and nothing met the criteria"; I don't want
      it to me "Either I understood and nothing met the criteria, or it's a
      totally incorrect invocation, or the database was down, or I could't
      load a file, or any of 100 other things went wrong".


      Kyle Cordes
      www.kylecordes.com
    • J. B. Rainsberger
      So said ericheikkila on 12/4/2002 -------------------- ... Often, i means something. Say what you mean; mean what you say. :) J. B. Rainsberger,
      Message 139 of 139 , Dec 7, 2002
      • 0 Attachment
        So said ericheikkila on 12/4/2002 --------------------

        >Single letter variables drive me nuts. ;)
        >I use 'index' instead of 'i' (or loop, or maybe count, depending on
        >the context).
        >As far as abbreviations go...if the entire team agrees, fine.
        >If someone on the team doesn't know that itr is the same as iterator,
        >just change it to iterator.
        >
        >Usually, I'll not abbrev ;)

        Often, "i" means something. Say what you mean; mean what you say. :)

        J. B. Rainsberger,
        President, Diaspar Software Services
        Let's write software that people understand.
        http://www.diasparsoftware.com/
        telephone: +1 416 791-8603
        All correspondence (c) 2002 Diaspar Software Services.
        If you want to use it, just ask; don't steal.
      Your message has been successfully submitted and would be delivered to recipients shortly.