Skip to main content

All Questions

41 votes
6 answers
11k views

Should I create a class if my function is complex and has a lot of variables?

This question is somewhat language-agnostic, but not completely, since Object Oriented Programming (OOP) is different in, for example, Java, which doesn't have first-class functions, than it is in ...
iCanLearn's user avatar
  • 1,341
3 votes
2 answers
2k views

One boilerplate class or many similar classes?

Lets say I'm trying to model a variety of objects that are virtually identical, the only difference being their class variables. Am I better off creating one boilerplate class and just calling the ...
Dan Oberlam's user avatar
  • 1,291
1 vote
1 answer
198 views

Representing mathematical tree structures using software in a compact manner

In my work I frequently come across systems of interdependent equations. I have contrived a toy example as follows. The terminal values w, x, y and z are given: e(y) = A+B A(y) = x*log(y)+y^z B(y) =...
user32882's user avatar
  • 267