Gentoo Archives: gentoo-portage-dev

From: Chris White <chriswhite@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [RFC] Naming Conventions
Date: Sat, 22 Jul 2006 14:48:48
Message-Id: 20060722044438.03e7def3@localhost
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Hi all you goons and minions,
5
6 While this may seem relatively simple, it's one of those "Don't judge
7 a book by the cover". While documenting, it was brough up the idea of
8 naming conventions so as not to have:
9
10 function_name()
11 functionName()
12 FunctionName()
13
14 and wondering what was going on while reading the documentation. The
15 actual recommendation to naming convetions was:
16
17 variable = foo_bar
18 function = foo_bar()
19 class = FooBar
20 class method = fooBar()
21
22 However, here's where the fun part comes in. Renaming stuff may seem
23 relatively simple (sed is your friend here), but the main fun is people
24 that are using the existing portage calls in their scripts, or in
25 official portage tools. The scripts here will simply break, and there
26 will be lots of frowning/"I'm going to kill you, start running" types.
27 This said, the following are recommendations:
28
29 1) Create aliases to the new functions, then at some
30 yet-to-be-determined point, kill the aliases and bomb on the scripts
31 (this suffers from procrastination).
32
33 2) Make an official release with the new function names and no aliases,
34 as well as the soon to come docs. I sort of like this method because
35 those with official portage tools can adjust their scripts, and simply
36 alter the depend atoms for >= (new API versions) and <= (old versions),
37 effectively forcing/preventing upgrades.
38
39 So please, throw your .02 $currencies in on this.
40
41 Chris White
42 -----BEGIN PGP SIGNATURE-----
43 Version: GnuPG v1.4.2.2 (GNU/Linux)
44
45 iD8DBQFEwS6rFdQwWVoAgN4RArHmAJ42vj4S5YizDPa1qdkNfbjICRXSGgCg0qv4
46 vEc51D5ELZyJRto8f/WD3Ho=
47 =W3fm
48 -----END PGP SIGNATURE-----
49
50 --
51 gentoo-portage-dev@g.o mailing list