Important poll, please boost (unless it's already completed).

In Go, the standard library "flag" module has single-dash flags.
Like so:
-flag=value -otherflag othervalue -bool -otherbool=false

Do you prefer that to GNU-style --flag=value and shorthands -f value?
Or do you prefer GNU-style?
If you had the FREE CHOICE (both implementations are simple and easy to understand, and had no real advantages or disadvantages besides this ux), which would you choose?
Follow

@toast neither, I prefer POSIX getopt because it is standardized and succinct

@sir yeah that's a fair preference
I use POSIX getopt regularly for "smaller" things (small by my definition, my "big" projects are usually still under 1000 LOC)
not relevant to what I'm making here, but I'll note it mentally :blobsmile:

@tuxcrafting @toast note that you don't have to give POSIX getopt argv[0]. <cmd> <subcmd> [options...] args... is a valid approach

@tuxcrafting @toast also, any program with >5 options has too many options

@sir @tuxcrafting @toast Same, ended up sending the whole thing to the trash once it started messing with formats and got a CVE about it.

@lanodan @tuxcrafting @toast this is part of why I like the BDFL approach, it means there's someone who can say "no" and that's the end of it

@sir @lanodan @tuxcrafting this, but with the caveat that the thing should be easy to understand (and thus fork) (so someone can just say "actually yes" and fork)
@toast @sir @tuxcrafting Or replaceable, I'm pretty sure you can't really remove less on many distros/systems. (gentoo here so I do whatever I feel like)

@lanodan @tuxcrafting @toast by fork, I mean rewrite from scratch, that is. With libtickit

@sir @tuxcrafting @toast Meh, I moved to https://www.jedsoft.org/most/ and used it's example less-like configuration to keep the same keybindings.
I'd rather fork this one.
@sir @tuxcrafting @toast slang? It's a library.

But yeah using libtickit as a base might be interesting, didn't use it yet but I can quite trust the author.

@lanodan @tuxcrafting @toast my impression of LeoNerd is that he's literally the only person on the planet with a complete understanding of terminal emulators whose software is engineered to consider every detail

@sir @tuxcrafting @toast Not sure he's the only one but haven't really got anyone else either…

@lanodan @tuxcrafting @toast an easy litmus test: his library is the only library I know of which is (1) not ncurses and is (2) possible to use without clearing the screen and using a secondary buffer

@sir @tuxcrafting @toast Well, would be interested in doing a pager with it. Do I start it or you already have some base code that could be used for it?

@lanodan @tuxcrafting @toast I don't have any code for it, no. Give it a shot :)

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!