Comments (2)
@picatz Any benefits from using trollop instead of GetoptLong?
from catphish.
Maybe
@ring0lab I think there is a certain when clarity using trollop in some cases. In general, I believe it reads pretty decently. Perhaps I'd call it a bit more "ruby-like" in some ways, but that's just some opinion stuff that might be best to be ignored in favor of the clarity argument. But, that's also a bit subjective.
There's also some stuff you get for free while using trollop that I think is pretty handy. A usage menu, a pretty smart and easy to use API to describe the ( command-line ) interface. Other rubyists are generally pretty used to trollop. I think it simplifies a lot of stuff and is really easy to lean on to do some of the boring stuff for command-line parsers while doing it more than half-way decently with a few minor edge cases that are hardly a problem.
Granted, as I've hinted, it's far from perfect. It's just very simple to implement.
Speaking of Stuff
Also. One could argue that a better solution could be to just follow suite with many applications such as bettercap and just use require 'optparse'
which is "much more advanced, yet also easier to use, than GetoptLong, and is a more Ruby-oriented solution."[*]
Honestly, while writing this. That might just be the best solution. I'd give it a quick looksie.
Make it Easy
If using trollop
or optparse
make it more annoying for you to work on the code base ( or anyone else that would want to chime in for or against ), then I don't really mind using the longest of opts that I have to get to get the job done to make things go as smooth as possible. 👍
from catphish.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from catphish.