cast(public)

Nick Sabalausky a at a.a
Fri Jul 17 21:43:46 PDT 2009


"dsimcha" <dsimcha at yahoo.com> wrote in message 
news:h3qkvv$n5q$1 at digitalmars.com...
>
> What if you want to make the class/struct do something that is enough of a 
> corner
> case that making a formal interface to do what you want would bloat the 
> API for
> the other 99.9% of use cases?  IMHO at a more general level sometimes the 
> best
> thing to do when trying to solve corner cases is to just hack it, so that 
> you can
> simplify the more normal cases.

I can't imagine a scenario where that would actually be a legitimate 
concern. All you'd really need to do is point out in the documentation for 
it that it's not typically needed. Worst case scenario, have the 
documentation grouped by "normal" and "advanced". Or hell, even just leave 
it undocumented. It's not as if formalizing a rarely-needed feature would 
suddenly mean that everyone else has to start using it. 





More information about the Digitalmars-d mailing list