To take an example, consider a set of discounts available to a supermarket shopper.
We could define these rules as data in some standard fashion (lists of qualifyin
The best practical answer to this question I found is this: Any class that needs to be serialized, now or in any foreseeable future, is data. Everything else is code. That's why, for example, Java's HashMap is data - although it has a lot of code, API methods and specific implementation (i.e., it might look as code at first glance).