Hi zyx,

how would you ensure that nobody abuses a static-methods-only
factory class? What do you think of as best practice? I think,
warning and error messages are instrumental to prevent abuse.
Regarding the "unfinished work": should I submit an empty inline
implementation (but commented out to prevent calls to it)?
 
Best regards, mabri

--------------------------------------------
zyx <z...@litepdf.cz> wrote on Mo, 30.11.2015:

 Subject: Re: [Podofo-users] Prohibit instantiation of factories (all methods 
static)
 To: podofo-users@lists.sourceforge.net
 Date: Monday, 30 November, 2015 10:07 Uhr
 
 On Sun, 2015-11-29 at
 23:16 +0000, Matthew Brincke wrote:
 > I
 have left off the implementation to also prevent it from
 > being instantiated from the inside (as
 IMHO there's really
 > no need to
 exist for any such instances).
 
     Hi,
 yes, I understand
 the move to the private section of the class, there's
 no problem with it.
 
 What I do not like is to declare a class method
 (constructor, in this
 case), but do not
 implement it anywhere. Being it to make sure the
 class is not instantiated anywhere through the
 compiler warnings/errors
 is not the best
 practice from my point of view. It looks like
 unfinished work, which I really do not like.
 Imagine someone adding a
 non-static method
 to the class and realizing that there is some
 constructor defined, but without (even empty)
 implementation. That
 might not be good.
 
 Just my opinion.
     Bye,
     zyx
 
 -- 
 http://www.litePDF.cz            
                     i...@litepdf.cz
 
 
 
 ------------------------------------------------------------------------------
 Go from Idea to Many App Stores Faster with
 Intel(R) XDK
 Give your users amazing mobile
 app experiences with Intel(R) XDK.
 Use one
 codebase in this all-in-one HTML5 development
 environment.
 Design, debug & build
 mobile apps & 2D/3D high-impact games for multiple
 OSs.
 http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
 _______________________________________________
 Podofo-users mailing list
 Podofo-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/podofo-users

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to