[LRUG] [Chat] IronRuby
David Salgado
david at digitalronin.com
Tue Jul 24 07:45:43 PDT 2007
Well, since it's a .NET thing, I hope I never have to find out!
On 24/07/07, Martin Sadler <mtsbtt at googlemail.com> wrote:
>
> I'm with you on this too.
>
> I use exceptions sparingly. Littering your app throwing exceptions
> left right and centre is definitely a recipe for disaster.
>
> My point was to what extent would IronRuby currently penalize you
> performance wise for exception handling on a typical Rails app.
>
> As it happens it seems not much.
>
> On 24 Jul 2007, at 13:45, Tom Ward wrote:
>
> > On 24/07/07, David Salgado <david at digitalronin.com> wrote:
> >> Personally, no. I'm just against exceptions occurring as an
> >> integral part of
> >> the core of your application. Catching a save! exception is great for
> >> errors, but you shouldn't be throwing exceptions unless something
> >> goes
> >> wrong.
> >
> > I agree with this. And by something going wrong, I would mean more
> > than just a validation failure in a place you might expect validations
> > to fail. So to me, this pattern (which I've seen in the wild) or
> > variations of the same would smell bad:
> >
> > def create
> > @person = Person.new(params[:person])
> > @person.save!
> > redirect_to :index
> > rescue
> > # validation failed, go back to form
> > redirect_to :new
> > end
> >
> > If you go along with this, then the performance of begin/throw/rescue
> > in IronRuby shouldn't make much difference to the core performance of
> > your app.
> >
> > Tom
> > _______________________________________________
> > Chat mailing list
> > Chat at lists.lrug.org
> > http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20070724/6906fb89/attachment-0003.html>
More information about the Chat
mailing list