3 ms·
I'm not sure this discussion applies to MVC as easily as you're making out. It's a design pattern, not a code pattern. Let's make it more general, though. How w
by jrajav 14y ago
I'm not sure this discussion applies to MVC as easily as you're making out. It's a design pattern, not a code pattern. Let's make it more general, though. How would a language that "gets rid" of the problem of modular code look like? That is, a language that makes it natural to organize your code based on high-level functionality, responsibility, and/or dependency? It seems to me that such a language would have to bring in arbitrary limits and introduce a lot more problems than it would solve, assuming it's feasible at all. I'm not saying this is something I've given a lot of thought to, it just has a "concept smell" to me.
There are cross-cutting concerns in software development that don't have an obvious technical solution. Modular code is one of them. There's no logical reason for us to organize code in such a roundabout way, it's only to help us measly humans reason about it more efficiently during the process of software development. So, there's unlikely to be a way to unproblematically translate that process into something logical.
- lmm 14y agoA lot of the reason for MVC is to avoid mixing business logic and data. So maybe one route to making it redundant is to have the language make more of a distinction between data objects and logic objects. Scala's case classes give you a slight nudge in this direction - after a while you become uneasy at seeing a complex function on a case class, or a non-case class with lots of data members - but it's quite subtle; maybe a future language could make it harder to do these two things. I think there's this constant tension in language design between giving you the power to do really cool things (python) and the constraints to stop you screwing up (java). But I think that more modern languages are getting further down the funnel, combining the advantages of both.