Jump to content
CyberAbc

Is it poor programming practice?

Programming Practice  

2 members have voted

  1. 1. Is it poor programming practice to pass parameters as objects?

    • Are you making code more maintainable?
      0
    • Or just covering up poorly defined methods?
    • If a method accepts a parameter of type Object, I should expect that any object I pass to the method will work.
      0
    • What it sounds like is that only certain subclasses of Object are allowed.
      0


Recommended Posts

And IMHO, even if we must define in which context and with which language, it's a potential security breach and an open door to possible exploits. Practically, I open up 'flexibility' that may, and will, be used to simply crack the code or the system the code runs on...

So at the end, it's a security risk all around, worst than a simple 'poor programming practice'.

Share this post


Link to post
Share on other sites

objects are  not  the  same  thing, from a  coder point  of  view, as passing a  parameter...  so just  like  good  coders  never  add  program notes,  which  means  what  the  hell  they are  trying  to  perform  with the  last  bit  of  code....  most  coders  I  know  will  not  do  so,  but  I don't  respect this  point  of  view.

My  code  is  not  always  clear,  but  works  and  you  will  understand the  logic,  once  you  read  the  reasons/notes  behind  it...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×