Anonymous user
Talk:Call a function: Difference between revisions
It's a fundamental semantic difference
(A constant is not a function.) |
(It's a fundamental semantic difference) |
||
Line 1:
== Duplication? ==
== Huh? ==
Line 15:
::::::Maybe. But, I think that that reasoning conflicts with the ''Some languages have different mechanisms for functions and subroutines'' bit from the first part of this talk page. That said, right now, given your reasoning, I am leaning towards the "anything that can be said to be equivalent to language X's concept of a function" concept of "function", where X="ZX Spectrum Basic". --[[User:Rdm|Rdm]] 19:02, 15 July 2011 (UTC)
:::A constant is not a function. Functions may produce different results at different times, whether or not they require arguments. For example time related functions, random functions, or device control functions may return different results at different times. [[User:Markhobley|Markhobley]] 19:12, 15 July 2011 (UTC)
:::In stateful languages, a function that takes no arguments is an entirely relevant concept; the environment may still vary. Purely stateless functional languages would of course have no-argument functions be constants. It's all a matter of how explicit things are made, and ''that'' is something that language designers (and their groupies) have argued over uselessly for many years. –[[User:Dkf|Donal Fellows]] 14:48, 16 July 2011 (UTC)
|