库与原始代码?

发布于 2024-09-12 02:50:00 字数 332 浏览 0 评论 0原文

我正在开发 LGPL 游戏引擎库,并且我更喜欢在没有依赖关系的情况下进行编码。到目前为止,我有使用 Xlib 和 OpenGL 代码的窗口代码。但我担心最终我还是需要使用库。可能是这样,我可以编写自己的图像加载内容等等,但我无法编写音频代码或网络代码。

现在,我想知道,为了获得学习经验,最好自己做这一切吗?我确信我能解决这个问题,但我真正担心的是我的代码中存在库已经解决的错误。

现在,如果我确实使用库,那么编写原始代码并仅使用库就毫无意义了。

如果这是一件很难的事情,我很抱歉,但我有强迫症,它要么是其中之一,要么是某种解决方案,例如编写原始代码并使用库作为替代方案(因为无论如何一切都是抽象的)。

I'm working on an LGPL game engine library and I prefer to code without dependencies. So far I have windowing code using Xlib and OpenGL code. But I'm worried that eventually I'll need to use libraries anyway. This may be the case, I can write my own image loading stuff and much more, but I can't write audio code or networking code.

Now, I'm wondering, is it best to do it all myself for the learning experience? I'm sure I could figure it out, but what I'm really worried about is having bugs in my code that libraries have solved.

Now, if I do use libraries, that'd make it pointless to write original code and just use libraries.

I'm sorry if this is a hard thing, but I have OCD and it's either one or the other or some kind of solution like writing original code and having libraries as alternatives (since everything is abstracted anyway).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

左耳近心 2024-09-19 02:50:00

我确实使用库,这使得编写原始代码并仅使用库变得毫无意义。

正确的。

请注意,每个人似乎都使用其他人代码的库。

下载几十个大型、复杂的开源项目并查看依赖关系。

站在巨人的肩膀上,才能爬得更高。

尽早并经常使用其他人的代码。除非您编写自己的操作系统和语言,否则“无依赖性”生活方式就不可能存在。

但我有强迫症

没关系。把你的个人问题留给自己。严重地。如果您拒绝根据技术做出技术决策,请考虑另一条工作线。

I do use libraries, that'd make it pointless to write original code and just use libraries.

Right.

Notice that everyone seems to use libraries of other people's code.

Download a few dozen large, sophisticated open-source projects and look at the dependencies.

You can climb higher by standing on the shoulders of giants.

Use other people's code early and often. The "No Dependencies" life-style can't exist unless you write your own OS and language.

but I have OCD and

Doesn't matter. Keep your personal issues to yourself. Seriously. If you refuse to make a technical decision based on the technology, consider another line of work.

祁梦 2024-09-19 02:50:00

就我个人而言,我会在使用库为我完成原始代码之前编写原始代码。我喜欢知道它是如何工作的,并且通过实际操作我可以学到最好的东西。有些人只需阅读图书馆就可以更好地理解它。这取决于什么最适合您。

不过,我肯定会在大型项目中使用库来帮助避免错误。

Personally, I write original code before I use a library to do it for me. I like to know how it works and I learn best by actually doing it. Some people can understand it better by simply reading through the libraries. It depends on what suits you best.

I would definitely use libraries for large projects to help avoid bugs though.

终难愈 2024-09-19 02:50:00

图书馆是供我们使用的。给自己施加压力去做已经完成的事情是没有意义的。

如果库没有提供某些功能,那么您可以编写自己的代码来满足该特定需求。这样做速度更快、效率更高。

The libraries are there for us to use. There is no point in stressing yourself out to do something that is already done.

If there's something the libraries aren't offering, then you write your own code to satisfy that specific need. It is much faster and efficient to do it this way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文