no procedural code and non mvc in ruby and python?
i know that these 2 languages require oop.
but inside the classes, could you have procedural code?
and for the mvc part, that pattern comes with their frameworks right?
nothing to do with the actual language 开发者_Go百科itself?
Neither of these languages require OOP, especially Python. In Python you can write as many ordinary functions as you want, and there are plenty of modules which don't define any classes. In Ruby you can do the same thing, except instead of functions you have methods on a module.
You are correct that MVC is related to the frameworks and not to the languages themselves.
They don't require OOP, but they do require procedural code, as they are imperative languages, and not functional ones. You can use some functional techniques.
There are plenty of frameworks that use MVC for both languages, yes.
精彩评论