Grasshopper

algorithmic modeling for Rhino

just a procedural question...

why yo decide to use a static method  (NurbsCurve.create) to build a new NurbsCurve instead of a normal constructor ?

Views: 393

Replies to This Discussion

Hi Pepe

I think the original thinking (I asked once) was that it could return null on error, rather than throwing an exception. That was especially useful for rhinoscript usage.

I hope this helps,

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

I also read somewhere in a design guideline that it is not good to throw exceptions in "unexpected" locations if possible. These locations are constructors and properties.

it helps a lot to understand how all that things are working

and an experienced team take decissions.

I really apprecciate your answers.

thank you

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service