evancz/elm-html and the philosophy of not getting blocked

150 views
Skip to first unread message

Josh Adams

unread,
Aug 25, 2016, 3:47:51 PM8/25/16
to Elm Discuss
This is not an important thread :)

But...

One of the philosophies that comes up often in Elm is to just not be blocked by stuff.  I found an excellent example from Evan himself and wanted to share it.

Backstory: apparently he wanted to republish the evancz/elm-html package so that existing inbound links could lead people to the right location.  But he didn't want to have any functions in the modules because you shouldn't try to use them.  Of course, you can't do that and publish the modules.  This could be considered a blocker or cause consternation.  He came up with a fantastic solution that brought me joy when I happened on it, so I wanted to point it out :)

https://github.com/evancz/elm-html/blob/master/src/Html/Events.elm#L13 <-- this is the best example but all of the modules are pretty great :)
Here it is on the package site, not quite as great but close: http://package.elm-lang.org/packages/evancz/elm-html/5.0.0/Html-Events

Cheers!

Josh

Richard Feldman

unread,
Aug 25, 2016, 7:25:30 PM8/25/16
to Elm Discuss
Related: I once did something similar when I wanted to do a MAJOR release where I changed functionality in a breaking way, but where I didn't change any public APIs. (elm-package calls this a PATCH change and doesn't have a "bump to MAJOR even though it appears unnecessary" override flag.)

So I added a publicly-exposed value called deleteMeToBumpMajorVersion : () and published it (a MINOR version bump), then deleted it and published again (the MAJOR version bump I wanted).

Good times! :D
Reply all
Reply to author
Forward
0 new messages