quine计划有什么意义?

编程入门 行业动态 更新时间:2024-10-17 12:28:18
本文介绍了quine计划有什么意义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我刚刚在CS课程中了解了今天的Quine程序。我知道它们是用于输出自己的源代码或自我复制的程序。但是我不知道的是,除了对编码能力和逻辑的一个很好的测试之外,重点是什么?这些类型的程序可以在现实生活中使用,还是只是为了好玩? 它们是否适用于真正的单词? 我尝试了什么: 询问Stack Overflow ...并且每个人都是一个混蛋。我真的很感兴趣。

I just recently learned about Quine programs today in my CS class. I understand that they are programs meant to output there own source code, or "self-reproduce". But what I don't get is, besides being a good test of coding ability and logic, whats the point? Can these types of programs be used in real life situations or are they simply for fun? Are they applicable to the real word? What I have tried: Asking on Stack Overflow...and everyone was a jerk about it. I'm genuinely interested.

推荐答案

据我所知,它们很少在现实生活中很有用。我可以设想一个场景,你有一个代码生成应用程序,可以动态编译。通过调用模块并让它编写输出然后编译成独立的可执行模块来包含模块会很有用。 不可否认,这是一个非常人为的理论例子,因为这是我能想到的唯一可能的用途,除了有趣和游戏之外。 As far as I know they are useful in real life applications only rarely. I can envision a scenario where you have a code generating app that compiles on the fly. It would be useful to include a module by invoking it and having it write its output that can then be compiled into a stand-alone executable module. Admittedly, this is a very contrived, theoretical example because that's the only possible use I can think of for them beyond fun and games.

Google是解决此类问题的最佳场所:附带计划 - Google搜索 [ ^ ]。 Google is the best place for such questions: Quine programs - Google Search[^].

更多推荐

quine计划有什么意义?

本文发布于:2023-11-02 16:54:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1552917.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:有什么意义   计划   quine

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!