srsudar / eg

Useful examples at the command line.
MIT License
1.8k stars 99 forks source link

Make 'examples' a submodule #34

Closed ghost closed 9 years ago

ghost commented 9 years ago

This would also ease making alternative frontends in case one doesn't like python

srsudar commented 9 years ago

This is an interesting proposition. I see where you're coming from, but I don't see it as offering enough improved functionality to make it worth it. Here is my reasoning for NOT doing this:

  1. Submodules raise the bar for the skill set required to use the repo. For pip-based installs that wouldn't be a problem, as I could manage that complexity. But for people that want to clone and run the repo using python eg_exec.py it would be more difficult. I've had nothing but difficulties managing submodules. I use them, but I avoid it when I can. There's no easy way to remove them, for instance. Maybe that is easy for you, but any time I have to manually change things in my .git/ directory I feel like I'd like to avoid that path if possible. I want to emphasize that I do use submodules, but only when I really need them.
  2. I can't think of any compelling cases for alternate front-ends. The fact that eg uses python doesn't seem like that big a problem to me. Odds are you'll have python on your machine. If you install something with pip you won't ever see that it's python. If you hate python and don't have pip configured, you can just clone the repo and make a one-shot alias alias eg='python eg_exec.py and you'll be good to go.
  3. The current set up is slightly more coupled but much simpler, in my opinion, by using the integrated approach we have currently.

Reasons FOR doing this would be:

  1. Make it more modular. The examples content is separate from the presentation/paging machinery. I agree with you there. This might end up as big long-term win, as the more you decouple things early, the happier you are later on.
  2. As you say, you could use multiple front-ends aside from python. One case where you couldn't use python to page is for a web-based interface. tldr does this and has a number of clients. This might be a neat feature, but it doesn't strike me as an important one. It's nice being able to install stuff using npm instead of pip, but I still had to set some stuff up myself when I tried it (clone the repo or something--I remember exactly). This tradeoff doesn't seem worth it to me.
  3. The examples repo would make a prettier landing page for viewing the github-rendered .md example files at the top level of the repo. Currently you have to dig down a level to get them.

Based on the above, I would say it's not worth it at this point.

What do you think?

srsudar commented 9 years ago

Feel free to weigh in! Going to close for now, though, based on my ever so compelling arguments. =)