-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 09/22/2012 09:55 AM, Michał Górny wrote: > Hello, > > The current dependency syntax: > > [VERSION-OP] PACKAGE-NAME ["-" PACKAGE-VERSION] > > suffers a few problems: > > > 1. It is not really human-friendly. > > People don't say things like: > > I need newer than monkey-1.2. > > They say instead: > > I need monkey, newer than version 1.2. > > > 2. With long package names and versions, it becomes hard-to-read. > > Consider the following: > >> =dev-foo/bar-very-long-my-name-is-4-beta-17 > > Where does the version number start? And yes, this is a valid > package name to our rules. > > > 3. Some potentially colliding package names are disallowed. > > A package name can't end up with something looking like version. > Thus, if upstream names package: > > frobnicator-11 > > We need to rename it in the tree, effectively losing the ability > to follow upstream naming and introducing a bunch of unnecessary > MY_P, S variables. > > > 4. Adding, removing and changing versions is not friendly at all. > > Consider the following dep: > >> =dev-foo/bar-bas-bat-11.2.4_alpha > > Now, you want to bump the dep to 11.3. You need to find the > version number, and modify it. Depending on the configuration, ^w > is going to eat the whole package name or just a single component. > > Then, you want to remove the whole version. You need to first > remove the version number, making sure it doesn't eat a bit of > package name as well. Then, you have to go back to the beginning of > the string, and remove the operator. > > Or you want to add a version. That one is simpler -- you just need > to go to one end of the dep, add the operator, then to the other, > and add the version. > > > The fore-mentioned problems could be solved through introducing a > more natural dependency syntax: > > PACKAGE-NAME [[*WSP] VERSION-OP [*WSP] PACKAGE-VERSION]] > > > This way: > > 1. It follows exactly how people are reading it: > > PACKAGE-NAME [is VERSION-OP than PACKAGE-VERSION] > > 2. It is always clear what is the version, and what is not. > Additionally, it allows you to introduce whitespace to increase > readability even more: > > dev-foo/bar-very-long-my-name-is-4-beta >= 17 > > 3. The optional (version dependency) part is at one side of the > string, so it is easy to add, change or remove. Two times ^w and > done! > > 4. It follows the syntax used by bash (for conditionals), > pkg-config -- it is more natural in the environment. >
KISS is not just about simplicity of a system, but also about simplicity of changes and how big the gain is when the changes are not simple. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJQXhRmAAoJEFpvPKfnPDWzFJoH/jzjfVtHzbv3VUPJYl4WZSkq ztNaFp8SPSeMS10sM48Pt2l3JkHnOlN8hiXS4zq9Gy9VLKT3rkP94h8g3Gmh8biP pcHxGEpZOFV5ATuI2MNBDrF7LI8S0eVoOkutEQPAUwmI8NRzrj0DpEwYlmsUDxwE aD5vtMWLl02X6dnZfdLUN/zBo/T3jNWuLUyPmKWwB7qkIH+2W0y3ZxdBJmdA4VYl ImrIM7RAhUgBb3cPtmloPt7rfYH/AGoS1O2M6eEZo1N2TmeZ4YwwciOmYfZrHWkc AZzGs9yt0ElMkZrNNdHZlblyQhdZJ8xO2WhJrvmeG+HtwUJgtxDtYbowkkunLoM= =5PkR -----END PGP SIGNATURE-----