tschneidereit / SwiftSuspenders

NOTE: Find the offical repo at http://github.com/robotlegs/swiftsuspenders
https://github.com/robotlegs/swiftsuspenders
MIT License
280 stars 89 forks source link

Added a default case to ConstructorInjectionPoint #87

Closed bysse closed 11 years ago

bysse commented 11 years ago

I've added a default case to ConstructorInjectionPoint so that it doesn't fail silently if someone should happen to use more than ten arguments to a class.

creynders commented 11 years ago

Anybody who uses more than 10 constructor arguments deserves a silent fail ;)

tschneidereit commented 11 years ago

Yup, this makes a lot of sense. One might deserve a fail for using more than 10 args, but a silent fail is just mean. :)

why you can't add more cases?

Why would we? Really, you shouldn't use that many args for your ctors. Ever.

bysse commented 11 years ago

Great, thanks!

vlaaad commented 11 years ago

I don't use that many args, but 10 args limitation looks strange.

tschneidereit commented 11 years ago

Great, thanks!

Thank you for the patch!

I don't use that many args, but 10 args limitation looks strange.

There's no way to support an unlimited number of args, so we have to draw the line somewhere. Would 11 or 12 look less strange?