question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The Elmish framework use the name “Cmd” to mean something that, when started, may asynchronously generate messages.

There are issues with using “command” in the context of Xamarin.Forms programming (also WPF) because ICommand, Command etc. are used in Xaml/WPF/XF docs. I’ve also never really liked the name for these reasons, though I’m suspect Fable-Elmish people are ok with it.

I do wonder if we should find another name for this in the context of EXF, or simply not really have a name for it at all. In EXF samples people tend to make cmd values from

  • Async<Msg> (Cmd.ofAsyncMsg)
  • Async<Msg option> (Cmd.ofAsyncMsgOption)
  • AsyncSeq<Msg> (used to be used but wanted to remove dependency on FSharp.Control.AsyncSeq)
  • (I guess people could also use IObservable<Msg> and it would be basically equivalent)

Then also Cmd.batch to merge two commands together.

It’s hard to rename though since likely all other good names are taken (action, process, async). Any thoughts?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
dsymecommented, Sep 23, 2018

I’m not necessarily looking for a change 😃 It’s just that I’m always dissatisfied with having to explain “Cmd”. Everything else in the model is so 100% intuitive - as soon as people read the code they get it.

Schedule is actually good, in the sense that the code Schedule.nothing, Schedule.msgAfter, Schedule.asyncMsg etc. is very clear. People will know exactly what that is doing (and know it is doing nothing more than it says). Perhaps that’s partly because schedule can be both noun and verb in english and either interpretation here makes sense.

Again not saying we should change, just mentioning it as a problem (for Elmish in all its forms)

3reactions
Zaid-Ajajcommented, Sep 5, 2018

The name comes from the original Elm architecture, anyone who uses or has used Elm is already familiar with the concept of a “Cmd”, I don’t think it is a problem with WPF /XF because if you use Elmish, you don’t explicitly use IConmand anymore

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I change the title of the CMD window?
A. By default the title display name is the location of CMD.EXE, however this can be changed using two methods depending on the...
Read more >
How To Find Your Computer Name from the Command ...
Type “cmd” in the search bar. Hit Enter, and a small black window will appear. That is your Command Prompt app.
Read more >
The Poetics of CLI Command Names
Naming a CLI command requires deep and careful deliberation. Yet most commands seem to have been named with playful insouciance at best, and ......
Read more >
How to find the computer name
Answer: · Click Start, Run · In the Run box, type "CMD" and press enter · In the Command prompt that opens, type...
Read more >
How To Change Name Of The Title Bar In Command Prompt
Launch Command Prompt and type the following command title [name]. This will change your title name instantly, but you will have to type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found