Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: can't throw Date: Mon, 17 Sep 2012 21:02:33 +0200 Lines: 25 Message-ID: References: <19af6b94-7a1e-4491-afb2-79782406f560@googlegroups.com> <504fe3a6$0$293$14726298@news.sunsite.dk> <4NmdnaSmEpADlMvNnZ2dnUVZ7oWdnZ2d@giganews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net FMUrq6PHbta4wd72T1s6Rg2z/4oWC21iI9XiAK2RMI9dIQOA84pzSGv7XvQ71X9UM= Cancel-Lock: sha1:sPWXoDItxz1gy+SdnnBDrlE9+uY= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:18811 On 17.09.2012 09:39, Leif Roar Moldskred wrote: > Robert Klemme wrote: >> >> My point was not that it can't be made "safe". I rather questioned >> whether the additional complexity introduced in the language would be >> beneficial (even if we let compatibility issues aside for the moment). > > I don't think there is any additional complexity -- it's just a > different expression of the complexity that today is expressed through > the Throwable hierarchy. No, there is more complexity: you have the class hierarchy and _additionally_ you define at throwing site how the exception needs to be handled. With the current language design that distinction is bound to the exception type while the suggested approach allows to vary handling per exception type; hence there are more degrees of freedom and consequently more complexity. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/