← Back to context

Comment by troad

16 days ago

There's nothing stopping any other item from being a verb, no? (Not the verb, but a verb.) Anything involving higher order functions?

In the context of the verb, everything else is a noun. When you understand what the verb does, then you can care about the difference between a verb and a noun.

  • Certainly, but the original quote was "It is quite hard to even tell a noun from a verb" (emph. added), and this is correct, you can't tell whether an identifier refers to a function or variable in Scheme by sight alone. This seems desirable if one wants first-class functions, and is very much an intentional choice for Scheme, but it can admittedly be more difficult to build up a mental model of new code if you have no idea what's a variable and what's a function (esp. amidst an already-difficult-to-grok sea of parentheses).

    Notably, this isn't intrinsic to Lisps - Common Lisp uses a different syntax and namespace for function names and variables. My understanding is that Scheme et al's decision to merge the namespaces/syntax was not without controversy in the Lisp community (the Lisp-1 v Lisp-2 debate).[0]

    [0] http://www.nhplace.com/kent/Papers/Technical-Issues.html

    • The only "verb" is the open paren. Other languages just make this simple and fundamental rule way more complicated.

    • > you can't tell whether an identifier refers to a function or variable in Scheme by sight alone

      Nor in C. Nor in JavaScript. Nor in Java. Nor in...

      I mean, what is "foo"? Could be the name of a function. Could be a char variable. Could be a double precision float. Could be a pointer to an array of pointers to functions returning doubles. Without going back to its definition (or prototype, for function arguments) you can't tell, much the same as you can't tell in Scheme without looking for the matching define or set!

      I feel like I must be missing something here. What?

      15 replies →