ClojureScript

Lambda functions are always anonymous, even when otherwise stated

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    Ubuntu

Description

The function (fn hello [] 0) evaluates to an anonymous function. Really it should give me a named function expression, which would enhance the debugging experience.

Activity

Hide
David Nolen added a comment -

I think the main reason this isn't done is because of name hoisting. It may very well be the case that we have already done the work to address this - we track scope and shadowing now. I would love to see a patch that demonstrates that adding a real name doesn't cause problems in practice. Thanks for the report.

Show
David Nolen added a comment - I think the main reason this isn't done is because of name hoisting. It may very well be the case that we have already done the work to address this - we track scope and shadowing now. I would love to see a patch that demonstrates that adding a real name doesn't cause problems in practice. Thanks for the report.
Hide
Julian Birch added a comment -

Actually, I think I've been confused. The lambda is correct, the function wrapping it managed to confuse me.

Please close this, sorry for wasting your time.

Show
Julian Birch added a comment - Actually, I think I've been confused. The lambda is correct, the function wrapping it managed to confuse me. Please close this, sorry for wasting your time.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: