yacobylab / oo_special_measure

new object oriented special measure
GNU General Public License v2.0
1 stars 0 forks source link

Object Orientation #8

Open mikeyshulman opened 10 years ago

mikeyshulman commented 10 years ago

Some people have raised concerns that object orientation might raise the barrier for entry to special measure since new users will have to learn object oriented programming. I personally don't think that it raises the barrier for entry, particularly, since new users won't be dealing with the intricacies of OOP. The most advance things new users will do is to write drivers, which will be made far easier with OOP.

Please respond with a comment with you opinion. This should be resolved ASAP before continuing.

pmaher86 commented 10 years ago

I'm 100% in favor of going OO, for a few reasons:

1) I don't think drivers will be any harder for people with no programming experience: for them it's still just a matter of looking at a simple existing driver and figuring out what to change. In that respect, OO code should be more readable. 2) OOP, specifically constructors, will allow people to add instruments without the need to understand the innards of all the data structures, which is a big barrier to entry for even using the current version 3) Anyone who ends up contributing to sm beyond hacking a driver together will need to learn a lot to understand the code, even if it's just learning the internal structure of sm. Better that they learn OOP and other "professional" practices rather than just a bunch of idiosyncrasies. Conversely, I think OOP will make it easier for experienced programmers to quickly understand the sm code and contribute.

vivekv2 commented 10 years ago

It should be object oriented. No matter how we code it, barriers to entry can be almost entirely alleviated by having good documentation and making some introductory tutorials (screencasts).

vivekv2 commented 10 years ago

[test]

jmmol commented 10 years ago

In my point of view, the principles of OOP have to be explained thoroughly to new contributors, but afterwards it is just more natural to think of new things and implement stuff the way you want it to be. So I am definitely supporting this approach.

mikeyshulman commented 10 years ago

I agree. Also, at there simplest (i.e. for a new person) an object is a struct that has its own methods written into it. I think that definition is simple enough to get started, probably close to enough to write simple instrument drivers.

vivekv2 commented 10 years ago

BTW... Matlab 2013b added a table type which is good for heterogeneous data and string-indexing.

It should be used instead of structs (and objects) when working with 'columns' may be important (each column is strictly typed and can be quickly accessed).