Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Use dash.el #103

Merged
merged 1 commit into from Nov 26, 2015
Merged

Use dash.el #103

merged 1 commit into from Nov 26, 2015

Conversation

cocreature
Copy link
Collaborator

This is a bit controversial, in particular @gracjan doesn’t seem to like it a lot, but let me explain my reasoning and then see where the disucssion goes

  • It makes the code cleaner and simpler by providing combinators for commonly used patterns. That’s the same reason why haskellers love their Data.List.
  • It gives us a form of pattern matching which is amazing when working with alists which is what json is represented as in emacs.

Now to the counter arguments and why I don’t fully buy them:

  • It introduces an external dependency.

elpa gives us dependency management and given that this seems to be how most people install packages these days it’s not a burden for users. People who use git submodules or whatever for managing their packages are expert enough to figure out how to get dash.el. Also a lot of packages already depend on it, so most likely everybody has it anyway.

  • It makes it harder for newcomers to contribute.

Our target audience is haskell programmers. Even if they are fairly new to haskell they know what mapcat means and understand the basics of pattern matching. If someone understands those combinators I think it makes the code actually easier to read and so it’s in fact easier to contribute instead of harder.

@gracjan
Copy link
Contributor

gracjan commented Nov 26, 2015

It removes the ugly (cdr (assq 'xxx lst)) so I think I'm convinced.

Please do not overuse this. Seems that dash has the power to seriously obfuscate code.

gracjan added a commit that referenced this pull request Nov 26, 2015
@gracjan gracjan merged commit f92a7ed into haskell:master Nov 26, 2015
@cocreature
Copy link
Collaborator Author

👍 I'll try not to overuse it :)

@alanz alanz added this to the prehistory milestone Feb 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants