BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

OOP Privatize Data As a Benefit


@PiDi wrote:

 

It's never the client responsibility to make sure the toolkit supplier code* works. The supplier should make sure that the client knows how to use his code without problems...simply don't let anyone break anything. 


I do not agree with this and to some extent is is laughable that your code cannot be "broken" by anyone.  Lets speak about DAQmx for a second.

 

Lets say I drop down a DAQmx Start Task.vi.  My VI is broken because an input is required.  So I create a constant and run, but I get an error because the task is empty.  In the users opinion the software is broken and doesn't do what they intended.  As the developer I say they didn't use it right and reading the documentation of the function, and the error should make it clear that they did something wrong.

 

Similarly if I provide some code to someone, with an Init, Read, Close, and they leave out the Init, and just use a Read with a constant, it will likely break.  That init needed to do things that the Read needs, and the help and error should make this clear.

 

I still think OO is a good thing, especially for modular code similar to a toolkit, I just don't agree with your reasoning.

 

You say you don't like the term toolkit because it is a "specific entity where someone during developement had to weight reliability and capabilities - and sometimes the latter would win."  Isn't this all software?

 

Also your link is broken.

0 Kudos
Message 11 of 11
(2,857 Views)