Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upNever show function names in toString #804
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Jan 8, 2017
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Jan 8, 2017
|
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hojberg
Jan 8, 2017
Could we have it show the real function name instead?
for instance:
> import PhotoGroove exposing (Msg(..))
> SetHue
PhotoGroove.SetHue : Int -> PhotoGroove.Msg
We could keep <function> or something similar for the anonymous functions
(hope this suggestion was succinct enough to be ok for an issue comment vs a discussion on the mailing list)
hojberg
commented
Jan 8, 2017
|
Could we have it show the real function name instead? for instance:
We could keep (hope this suggestion was succinct enough to be ok for an issue comment vs a discussion on the mailing list) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rtfeldman
Jan 8, 2017
Member
@hojberg Sure, cleanly presenting more information than just <function> seems like it has little drawback, but I don't feel urgency there; I have yet to ever want that information from toString.
I would prefer to treat this as a bugfix and then consider that a separate feature request. I see this situation as first and foremost "guts are spilling out, so let's stop that!"
|
@hojberg Sure, cleanly presenting more information than just I would prefer to treat this as a bugfix and then consider that a separate feature request. I see this situation as first and foremost "guts are spilling out, so let's stop that!" |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rtfeldman
Jan 9, 2017
Member
Minor note that occurred to me: someday Elm will target other platforms, and it's likely some number of them won't support functions knowing their name or package information at runtime, so there's a consistency case to be made for <function> everywhere too.
|
Minor note that occurred to me: someday Elm will target other platforms, and it's likely some number of them won't support functions knowing their name or package information at runtime, so there's a consistency case to be made for |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jan 12, 2017
Member
Makes sense to remove for now. Can add back if we get it working nice again. I think it relied on naming conventions from older code gen, so it probably got weirder with 0.17.
|
Makes sense to remove for now. Can add back if we get it working nice again. I think it relied on naming conventions from older code gen, so it probably got weirder with 0.17. |
rtfeldman commentedJan 8, 2017
It's lovely when
elm-replprints out a<function>signature for me:It's less lovely when the
<function>value includes the internal name of the JavaScript function:It really seems like it would be better if all function values displayed as
<function>and that's it.This PR makes that happen. If this solution is undesirable for some reason I'm missing, I'd be happy to close this PR and open an issue about the UX problem instead.