Top down and Bottom up programming

前端 未结 10 1328
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-30 03:37

Why do we say languages such as C are top-down while OOP languages like Java or C++ are bottom-up? Does this classification have any importance in software development?

10条回答
  •  醉酒成梦
    2021-01-30 04:03

    I've never heard that classification applied to specific languages, rather it's a programming paradigm - do you first fill out the details (i.e. build full implementation methods) and then put them together (e.g. call them from them main() method), or start with the logical flow and then flesh out the implementation?

    You can really do either with both types of lanugages... But I would say it's typically the opposite, in current OOP languages you'll first define the interfaces, forming the logical structure, and only afterwards worry about the implementation, whereas straight procedural languages like C, you need to actually implement some methods before you call them.

提交回复
热议问题