What does “cdecl” stand for?

前端 未结 4 999
广开言路
广开言路 2021-02-02 09:19

Yes, I know that \"cdecl\" is the name of a prominent calling convention, so please don\'t explain calling conventions to me. What I\'m asking is what the abbreviation (?) \"cd

4条回答
  •  孤街浪徒
    2021-02-02 09:49

    You're reading too much into this. It stands for the calling convention of the implementation for calling C functions in general (but especially important with varargs).

    It doesn't have to be an abbreviation for something that combines "C" and "declaration"; names are just names, especially in programming. Mnemonics help, but even though "malloc" means "allocate memory", it has additional meaning that we know and attach to it; "alloca" also "allocates memory", for example.

    Or take "struct" which "means" a "structure", but "structure" is so generic by itself that without the meaning we attach subconsciously to "struct" we would be hopelessly lost – as new programmers still learning the terminology are often lost.

提交回复
热议问题