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: 187

Reply to This

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 Piacentino
for Robert McNeel & Associates

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





© 2018   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service