- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
在package initialization Go 规范的一部分,“词法文件名顺序”是什么意思?
To ensure reproducible initialization behavior, build systems are encouraged to present multiple files belonging to the same package in lexical file name order to a compiler.
最佳答案
来自 Wikipedia :
Lexical order is a generalization of the way the alphabetical order of words is based on the alphabetical order of their component letters.
在实践中,这意味着将文件名作为字符串进行比较,使用字符代码来决定顺序。英文字母的字符代码顺序遵循字母的自然顺序,但如果非字母也是文件名的一部分(例如数字和其他字符,如 '-'
).
如果包包含多个源文件,这只是定义源文件(任意)顺序的约定,如果重新编译包(当然文件不会重命名),该顺序将保持不变。
目的是让源文件始终以相同的顺序处理,因此包 init()
函数也将以相同的顺序执行,您将观察到相同的行为。包 init()
函数的顺序通常无关紧要,但也有可能是这样。通过遵循此词法文件名顺序约定,您可以依赖于 init()
函数的(固定)执行顺序。
关于go - 词汇文件名顺序是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31650965/
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 4 年前。
我们如何知道使用哪个词汇/命名空间来描述带有 RDFa 的数据? 我看过很多使用 xmlns:dcterms="http://purl.org/dc/terms/" 的例子或 xmlns:sioc="
我正在尝试理解 BERT 词汇 here .它有 1000 个 [unusedxxx] token 。我不遵循这些 token 的用法。我了解其他特殊 token ,如 [SEP]、[CLS],但 [
我需要一些词汇方面的帮助,我不经常使用 Oracle,但我熟悉 MySQL 和 SQL Server。 我有一个应用程序需要升级和迁移,执行此操作的部分过程涉及导出到 XML 文件,允许安装程序创建新
我主要使用 Ruby 来执行此操作,但到目前为止我的攻击计划如下: 使用 gems rdf、rdf-rdfa 和 rdf-microdata 或 mida 来解析给定任何 URI 的数据。我认为最好映
我是一名优秀的程序员,十分优秀!