Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Why not:

    - check if a variable called "help" is in scope
    - if not, call help().
    - otherwise, print its value.


view as:

Because then when there IS a variable, the help command you learned will not work.

I think anyone crying and baffled about this is fundamentally not well suited to programming. This sort of logical problem should be intuitive.

The seeming irrationality of the special case behavior is just something funny to make your mom laugh, not something that's actually illogical or inconsistent or stupid.


What if you have defined a "help()" function though?

REPL should be as dumb as possible. That's a feature, not a bug.


Legal | privacy