未加星标

(I think) Lennart did not understand Unix

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二05 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

Lennart Poettering gave this interview where he said some thing which lead me to the conclusion that he misunderstood some things about unix.

So I do not want to bash systemd or Lennart himself here. This is not a “I hate systemd” article, to be honest, I even like systemd. I acknowledge that a lot of people hate systemd for specific reasons, and I even can agree to a certain degree with some of these points, but overall, I do not hate it.

Everything is a file. Yes it is.

Lets talk about the article from above. There are two things I want to talk about here. The first one is the everything-is-a-file concept:

One of the most well-known concepts that people often cite about Unix is that everything’s a file. I personally think that’s a complete bullshit thing. That’s because everything is not a file. My printer is not a file and if Unix pretends that my printer is a file, that’s complete rubbish because a file is a very different thing.

The above quote is from the article .

I think that Lennart completely misunderstood what the concept is here. Yes, in Unix “everything is a file”. But, in my understanding, this is not a rule but rather an abbreviation to explain an abstraction. The “everything is a file”-thingy is nothing more than a way to interface with things. Fundamentally, there is not such thing like a “printer” or “graphics card” - at least there is no other way to represent those in a operating system, besides a file.

Unix does not say that everything is a file (note the missing quotes in this sentence). It says that files are the interfaces for all the things. The actual quote

Everything is a file.

is just a way to tell users in a short and time-saving manner how Unix abstracts hardware.

Lennart continues…

He said that most people who are programmers will eventually learn about object-oriented programming, hopefully at university or another school. They will find that the most abstract concept that object-oriented programming has, how it sees the world, is generally the object.

which I hope will never be the case. Object orientation is dead .

Do one thing! Do it well!

The second point I want to talk about here is the idea of Unix that a program should do one thing only but do it well.

Lennart says

People often complain that systemd has one large repository where a lot of components are living in one source code repository. They think that is not Unix and that’s actually the greatest rubbish of all. Because if you look at BSDs, which unlike linux are actually true Unixes, they all maintain pretty much the entire Kernel and user space in one single source code repository. Contrary to what people think, in Unix, everything ended up being maintained in one repository, just like systemd.

which also completely misses the point.

The whole idea is not that everything should be kept in small repositories and cleanly seperated - I really do not care whether my system comes from one giant repository or from hundreds or even thousands of repositories. And I bet nobody does.

What people are complaining about is that systemd does not do only one job. systemd does not have one concern but many. Is it an init system? Is it a service/job control system? Is it a bootloader? Is it a time synchronization application? Is it a package manager? Is it a printer daemon? Is it a container/virtualization layer/helper/manager? Is it a <insert thing> ? No, it is not - and yes, it is all of them. And exactly that is the problem people complain about. It doesn’t seperate concerns.

Conclusion

I know that Lennart has always an open ear for concerns and critical voices - at least he once wrote that.

I guess he got some things wrong here and I hope that if he sees that he will understand the concerns of the broader community.

Please note that this is my view on the things. I’m also just human and I might got things wrong here(, too). I’m more than happy to learn, so if you have anything you want to talk to me about, feel free to send me an email. I know the topics I scratched here are more than emotionally discussed in the community. Because of this: Please keep it calm if you send me an email, keep it technical. I will happily ignore emotional stuff.

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: Linux
分页:12
转载请注明
本文标题:(I think) Lennart did not understand Unix
本站链接:http://www.codesec.net/view/529883.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(9)