home.social

#picocli — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #picocli, aggregated by home.social.

  1. For example: I wanna write a easy-to-write & read #commandline / #cli option-parser for #cpp where you dont need to know how exactly #getopt works and what global variables & states it has.

    One of the best other libraries out there for such stuff is #picocli ( picocli.info/ ). So naturally I wanna build something similar in #cpp .

    But theres soooo many problems: bc c++ dosnt has real generics, only templates, there is ofc no typeerasure, meaning that I constantly need to pass around all template params. Wich means that theres no easy way having a type `Option<Cmd>` (options for a specific command), inside a list like `std::vector`! Even tho the storage space of a pointer is the same: 8 bytes, and thanks to virtual methods calling the right methods isnt a problem either!