术语“ functor”一词在Prolog中,与类别理论所获得的术语有任何关系吗?

发布于 2025-02-02 00:46:55 字数 175 浏览 3 评论 0原文

我开始学习Prolog,然后读到结构开头的原子通常称为 fuction

我也熟悉类别理论和函数编程中的术语函数

所以我的问题是,prolog中函子一词的选择是否对类别理论有任何影响? prol中的函子是一种转化吗?还是只有巧合的名字的选择?

非常感谢!

I started to learn Prolog and I just read that the atom at the beginning of an structure is usually called functor.

I'm also familiar with the term functor from Category Theory and Functional Programming.

So my question is, does the choice of the word functor in Prolog have any implications on Category Theory? Are functors in Prolog a type of transformation? Or is the choice of the name mere coincidence?

Thanks so much!

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

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

发布评论

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

评论(1

゛清羽墨安 2025-02-09 00:46:55

prolog中的“函数”一词是否与从类别理论中获取的一词有任何关系?

不。


prolog中函数的选择是否对类别理论有任何影响?

不。


Prolog中的函子是一种转换吗?

主观回答这可能会导致许多反驳的评论;这是事实。

Prolog具有ISO标准,在标准中是

§3.77fuctor:标识符与Arity一起。

如果您与Prolog足够合作,您将学会象征性地思考,然后意识到fundor只是某物的名称。 Prolog中的其他通用名称是术语listatomvarible

请参阅此 POST 有关更多详细信息。


还是单纯的选择?

我不会说巧合,就好像您看这两个单词的血统一样,您可能会到达与数学有关的一个共同点,所以这不是巧合,那是当人们可以选择命名某些东西时有时会使用熟悉的名字时有时他们会为一个新词创造一个新词。

在这种情况下,多年来,人们只是一遍又一遍地使用函数来进行各种事物,而其含义的树已经显着增长。

至少使用单词fuctor并不像逗号作为编程语言的操作员过度使用那样糟糕。


关于可能在序言中使用的函数使用的血统的旁注。

在谷歌搜索fuctor的定义中,找到了Wikipedia文章 fuctor Wikipedia文章函数word 。对于功能Word IT注意

在语言学中,函数单词(也称为函子)是几乎没有词汇含义或模棱两可的含义并在句子中表达语法关系的单词,或者指定说话者的态度或情绪。

如果您知道首先是为处理法语而创建的,[]然后,这似乎是Prolog Side上单词函子的血统的可能路径。

1- Alain Colmerauer和Philippe Roussel的“ Prolog的诞生”

Does the term "Functor" in Prolog have any relation to the term taken from Category Theory?

No.


Does the choice of the word functor in Prolog have any implications on Category Theory?

No.


Are functors in Prolog a type of transformation?

Answering that subjectively can lead to many rebuttal comments; here are the facts.

Prolog has an ISO standard and in the standard is

§3.77 functor: An identifier together with an arity.

If you work with Prolog enough you will learn to think symbolically and then realize that functor is just a name for something. Other common names in Prolog are term, list, atom, variable.

See this post for more details.


Or is the choice of the name mere coincidence?

I would not say coincidence as if you look at the pedigree of both words you will probably arrive at a common point related to math, so it is not a coincidence it is that when people have a choice for naming something sometimes they use a familiar name or sometimes they coin a new word.

In this case over the years people just keep using functor over and over again for various things and the tree of what it means has grown significantly.

At least the use of the word functor is not as bad as the over use of comma as an operator in programming languages.


Side note on possible pedigree for functor use in Prolog.

In Googling for a definition of functor found the Wikipedia article functor which noted the Wikipedia article function word. For function word it notes

In linguistics, function words (also called functors) are words that have little lexical meaning or have ambiguous meaning and express grammatical relationships among other words within a sentence, or specify the attitude or mood of the speaker.

If you know that Prolog was first created for processing the French language [1] then this seems like a likely path for the pedigree of the word functor on the Prolog side.

1 - "The birth of Prolog" by Alain Colmerauer and Philippe Roussel

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