首页 \ 问答 \ 为什么我们不能/不能将OOP概念应用于内核编程?(Why can/can't we apply OOP concepts as much to Kernel Programming? [closed])

为什么我们不能/不能将OOP概念应用于内核编程?(Why can/can't we apply OOP concepts as much to Kernel Programming? [closed])

关于为什么OOP是正确的或它在哪里工作等问题有很多问题,所以这是其中之一,但是我从内核的角度来问它,为什么它不用作例子。

内核主要用C语言编写。 它几乎不使用OOP。 关于OOP的一般共识是它是编程中最好的范例(主要是许多新成员),但内核尽管是最具挑战性的编程领域之一 - 不使用OOPS。

所以我想知道OOP的工作原理是什么,以及为什么它不能用于内核之类的东西? 我试图在某些情况下获得工程方面的原因。你可以说GUI编程可能会从OOP中受益 - 我理解的原因是你要创建一个以上特定事物的案例而你可能会操纵它们 - 因此具有相同行为的不同状态是有道理的。

在更高的层面上,OOP可以被认为是一种自然选择的优秀案例与仅仅是过度设计的情况有什么关系呢? 我很乐意得到关于这个问题的指示,因为这已经在很多地方讨论过了。

PS:我正在寻找工程方面。 我理解这个问题非常广泛。 任何有用的指针都会很好。

一些相关问题: 虽然我理解大多数OOP概念,但我无法创建实现OOP概念的清晰画面。 为什么?


There are a lot of questions on why OOP is correct or where it works etc , so this is one of them , however I am asking it from the perspective of Kernel and why it doesn't use as an example .

Kernel is mostly written in C . It hardly uses OOP . General consensus on OOP is that its the best paradigm in programming ( mostly by many of the new comers ) but Kernel despite being one of the most challenging areas of programming - doesn't use OOPS .

So I would like to know what are the cases where OOP works and why it can't work for things like Kernel ? I am trying to get the engineering aspects of why it works in some cases .You could say GUI programming might benefit from OOP - the reason for that from my understanding is that you are going to create more than one case of a particular thing and you might manipulate them - so having different states with same behaviour makes sense .

On a higher level , what are the good cases where OOP can be considered as a natural choice vs where would it just be an overdesign ? I would be happy to get pointers on this question beacuse this is already discussed on many places .

PS: I am looking for an engineering aspect . I understand this question is very broad . Any helpful pointers would be nice .

Some related questions : I can't create a clear picture of implementing OOP concepts, though I understand most of the OOP concepts. Why?


原文:
更新时间:2022-06-05 14:06

最满意答案

根据这个问题,是一个div容器推开菜单。

旧的和错误的容器是:

<div class="col-lg-12" id="content-container" style="
display: table-cell;">

可以通过添加其他引导类来修复它:

<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="content-container">

According to this the problem, was that a div container pushed the menu away.

The old and wrong container was:

<div class="col-lg-12" id="content-container" style="
display: table-cell;">

It could be fixed by adding additional bootstrap classes:

<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="content-container">

相关问答

更多
  • 最好使用顶栏,因为它将为您处理元素(导航)的大小调整和切换。 这是我从Foundation的doc页面借来并简化的代码:
  • 尝试这个。 你可以为图标添加fontawesome。 Js Fiddle p9Lea8g4 / 7 / Try this. you can add fontawesome for the icons. Js Fiddle p9Lea8g4/7/
  • preventItemClick选项默认设置为true。 将其设置为false将解决您的问题。 但是,强烈建议使用如下所示的回调。