Talk:Function frequency

From Rosetta Code

Specification

It seems to me this could be better specified. For instance this looks likes it is to be run against a source file. However, it could equally be run against an entire library or collection. For instance what are the statistics for a commonly used public library or Rosetta. I know this complicates things and I'm not asking to change the tsak itself. Just to clarify the intent. --Dgamey 12:23, 7 December 2011 (UTC)

What is a "function"?

Questions to ponder:

  1. Is a macro a "function"?
  2. Is a parse-time word a "function"?
  3. Is a compiler directive a "function"?
  4. Is a lookup table a "function"?
  5. Is a lookup table a "function" in a language where lookup tables and procedure calls use the same syntax when mapping arguments to results?
  6. Are functions which are built into the language "functions"?
  7. Are language built-ins which are not functions (for example, the assignment operator) "functions"?
  8. Are constants "functions"?
  9. Are operations which produce constant results that take (and ignore) their arguments "functions"?
  10. Are constants functions in a language where language syntax allows numbers to take (and ignore) arguments "functions"?
  11. Are procedures with side effects "functions"?
  12. Are procedures which return void "functions"?
  13. Are OS calls "functions"?
  14. Are words which have not been defined "functions"?
  15. Are words which are not yet defined "functions" if they will later be defined to be procedures?
  16. Are words which are not yet defined "functions" if they will later be defined to be constants?
  17. Are words which are not yet defined "functions" if the language allows function definitions to be loaded lazily but does not allow constant definitions to be loaded lazily?

(All of these questions have languages where they are pertinent issues, though not all of these issues will be pertinent in the same language for any language that I know of). --Rdm 20:03, 8 December 2011 (UTC)