What's missing from Phobos for Orbit (package manager)
Jacob Carlborg
doob at me.com
Tue Feb 12 04:38:53 PST 2013
In the thread "Expanding Phobos from a flat hierarchy" there started a
discussion about package managers. Of course I mentioned the package
manager I'm working on, Orbit. Unfortunately people weren't very happy
with the third party dependencies. So I compiled a list of what's
missing from Phobos, but I never got an answer to that post in the
thread. I have now repeated the list below of what Orbit needs that
don't exist in Phobos. I hope I have better luck here.
Repeated message:
I've compiled a list below of things used in Orbit (directly or
indirectly) that Phobos is lacking in. Please tell me if I'm wrong:
* DStack - Is a library for helping structuring applications. It includes:
* Handling of command line arguments
* Components
* Commands
* Starting and initializing of the application
* Configuration
I plan to add more stuff here when needed
* Serialization - Does not exist
* ConfigMap - Does not exist. An associative array with opDispatch
added to it. Allows to do things like:
auto config = ConfigMap();
config.foo = "asd";
config.bar.foo.baz = "foobar";
assert(config.foo == "asd");
* XML - The XML module is slow and has a cumbersome API
* Zip - I don't exactly remember what was wrong here. It either didn't
work or I had to reimplement a lot of functionality already available in
Tango.
* Net - std.curl is probably a good module but it wasn't available when
I started. I also adds another dependency.
* std.process - I have not used it myself but I've heard it's not optimal
* std.getopt - Doesn't support the following:
* Required arguments
* Restricting the values of a given argument
* No way to automatically create a help/usage list out of the arguments
* Handling positional arguments
* No support for commands/action. That is "git commit", "commit"
would be the command/action
* Handle multiple command lines
* Validation of the arguments
Various convince functions:
* any - Opposite of empty
* last - Returns the last element of an array
* map, find and any for associative arrays
* Utility functions for handling UDA's
* isBlank - Check if a value if blank. If it's a string it's blank if
it's only contains whitespace. If it you can call .empty return that. If
it's a value type it's not empty. If it's a reference type and it's null
it's empty
* isPresent - The opposite of isBlank
* pluralize - Takes a string and a count. If the count is greater than 1
it converts the word in the string to plural
CTFE:
* format - A simple formatting function
* indexOf
* contains
* hasField - Returns true if the given type has the given field
* fieldsOf - Returns all the fields of the given type
* TypeOfField - Returns the type of a field
* nameOfFieldAt - Returns the name of the field at the given position
* set/getValueOfField - Sets/gets the value of a field
* newInstance - Returns a new instance based on the class name or
ClassInfo. Can handle any class regardless of constructors
* A couple of traits
In the end it's all about what's working.
Original message:
http://forum.dlang.org/thread/ugmacrokqghrrwpfovam@forum.dlang.org?page=6#post-kf15td:24v63:241:40digitalmars.com
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list