Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 38255 invoked from network); 27 Oct 2009 23:06:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Oct 2009 23:06:11 -0000 Received: (qmail 91044 invoked by uid 500); 27 Oct 2009 20:16:09 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 91030 invoked by uid 500); 27 Oct 2009 20:16:09 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 91021 invoked by uid 99); 27 Oct 2009 20:16:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Oct 2009 20:16:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 74.125.78.145 as permitted sender) Received: from [74.125.78.145] (HELO ey-out-1920.google.com) (74.125.78.145) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Oct 2009 20:16:01 +0000 Received: by ey-out-1920.google.com with SMTP id 4so44060eyg.8 for ; Tue, 27 Oct 2009 13:15:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=kes+KDpgIUZw0VdW6Kf6C8xvHem+2Vsm2nfCGJbtN2o=; b=I/rVkxkMFFTp6Ylj0buQ7uLl92r9umbGWTAcV4+ePqH/bRsWvyIngijmyQtk6Ab6qR Hv+BhVJ82TO5exvmlFgmuJ8JNZTpLxkr5rBVtcleUUBQy9MeqwvCdOAhx2SaIxqSJiDp WNMH+/WN8ItF3SMI80VmjRj1eKh6xnvog0Doc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=Q3cA1d4qUiVBdCVMk1iZp+kRj2Ye7cnt7fa30UsVptOz2fduwFrYXl+2naW5A6Drgh OzujJmtcU/RjkRaTzJOVwAXyxr/pF/sgua7TCkycHs8JteDCpPd4YIglT7CRGKQ2jIGv gAcG2xXUO/NkvI5p/3SGvyzNSjrkZUTW0MaoY= MIME-Version: 1.0 Received: by 10.216.89.14 with SMTP id b14mr2761227wef.76.1256674541496; Tue, 27 Oct 2009 13:15:41 -0700 (PDT) In-Reply-To: <7FC4BE368A334142B104A2B72F4435AA0452F6@iizuusbs.iizuu.local> References: <7FC4BE368A334142B104A2B72F4435AA0452F3@iizuusbs.iizuu.local> <7FC4BE368A334142B104A2B72F4435AA0452F6@iizuusbs.iizuu.local> From: Jonathan Ellis Date: Tue, 27 Oct 2009 14:14:08 -0600 Message-ID: Subject: Re: Performance of get To: cassandra-user@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Oct 27, 2009 at 2:00 PM, Christopher McKenzie wrote: > Exceptions are a special feature of languages often with their own keywor= ds, primitives, and usually chapters in books. =A0I don't profess to be an = expert in the various exception models for all the versions of various impl= ementations of C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Coc= oa, Smalltalk, and OCaml that thrift supports. =A0But I would claim that, w= ith such a large heterogeneous and dynamic support base, one should use som= ething as varied and unpredictable as the exception handling models with gr= eat care and I don't "personally feel" that the understandably expected err= or case of Get should be escalated to be handled by this mechanism. There are basically two sane options for looking up a key that doesn't exist. One is to return null or the equivalent; the other is to raise an exception. There are pros and cons for each, and examples of languages whose stdlib behaves either way. So a blanket Exceptions Are Not Idiomatic For Key Lookup statement is misguided. And as it happens, Thrift does not support returning null values at all, so from there the natural choice was obvious. -Jonathan