The concept of sets as above described is probably from a programmers point of view the most logical way. Forget scales, major, minor whatever. Just deal with numbers and try to define a set of rules so there is always a musical result. I don’t mind if there are some limitations, if it’s musically interesting, then it’s fine. Experimentation is the key.