comparison ch03.roff @ 97:29a7454fcded

Added references to commits.
author markus schnalke <meillo@marmaro.de>
date Sat, 16 Jun 2012 17:28:11 +0200
parents 12348d620245
children d894191d7a33
comparison
equal deleted inserted replaced
96:12348d620245 97:29a7454fcded
949 to tell what version of mmh the program belongs to. 949 to tell what version of mmh the program belongs to.
950 .P 950 .P
951 Switches change the behavior of programs. 951 Switches change the behavior of programs.
952 Programs that do one thing in one way require no switches. 952 Programs that do one thing in one way require no switches.
953 In most cases, doing something in exactly one way is too limiting. 953 In most cases, doing something in exactly one way is too limiting.
954 If it is basically the same task to accomplish, but it should be done 954 If there is basically one task to accomplish, but it should be done
955 in various ways, switches are a good approach to alter the behavior 955 in various ways, switches are a good approach to alter the behavior
956 of a program. 956 of a program.
957 Changing the behavior of programs provides flexibility and customization 957 Changing the behavior of programs provides flexibility and customization
958 to users, but in the same way it complicates the code, documentation and 958 to users, but at the same time it complicates the code, documentation and
959 usage of the program. 959 usage of the program.
960 .\" XXX: Ref
960 Therefore, the number of switches should be kept small. 961 Therefore, the number of switches should be kept small.
961 A small set of well-chosen switches does no harm. 962 A small set of well-chosen switches does no harm.
962 But usually, the number of switches increases over time. 963 But usually, the number of switches increases over time.
963 Already in 1985, Rose and Romine have identified this as a major 964 Already in 1985, Rose and Romine have identified this as a major
964 problem of MH: 965 problem of MH:
976 Unfortunately MH, having undergone six years of off-and-on development by 977 Unfortunately MH, having undergone six years of off-and-on development by
977 ten or so well-meaning programmers (the present authors included), 978 ten or so well-meaning programmers (the present authors included),
978 suffers mightily from this. 979 suffers mightily from this.
979 .sp 980 .sp
980 .P 981 .P
981 Adding new switches only reluctantly is one part of the counter-action, 982 Being reluctant to adding new switches \(en or `options',
982 the other is removing hardly used switches. 983 as Rose and Romine call them \(en is one part of a counter-action,
983 Now that there are lots of switches already implemented, 984 the other part is removing hardly used switches.
984 removing some of them is more important. 985 Nmh's tools had lots of switches already implemented,
986 hence, cleaning up by removing some of them was the more important part
987 of the counter-action.
985 Removing existing functionality is always difficult because it 988 Removing existing functionality is always difficult because it
986 breaks programs that use these functions. 989 breaks programs that use these functions.
987 Also, for every obsolete feature, there'll always be someone who still 990 Also, for every obsolete feature, there'll always be someone who still
988 uses it and thus opposes its removal. 991 uses it and thus opposes its removal.
989 This puts the developer into the position, 992 This puts the developer into the position,
990 where sensible improvements to style are regarded as destructive acts. 993 where sensible improvements to style are regarded as destructive acts.
991 Yet, living with the featurism is far worse, in my eyes. 994 Yet, living with the featurism is far worse, in my eyes, because
992 Future needs will demand adding new features, 995 future needs will demand adding further features,
993 worsening the situation more and more. 996 worsening the situation more and more.
994 Rose and Romine added in a footnote, 997 Rose and Romine added in a footnote,
995 ``[...] 998 ``[...]
996 .Pn send 999 .Pn send
997 will no doubt acquire an endless number of switches in the years to come.'' 1000 will no doubt acquire an endless number of switches in the years to come.''
998 Although clearly humorous, the comment displays the nature of 1001 Although clearly humorous, the comment points to the nature of the problem.
999 the problem. 1002 Refusing to add any new switches would encounter the problem at its root,
1000 Though refusing to add any new switches would encounter the problem 1003 but this is not practical.
1001 at its root, it is not practical. 1004 New needs will require new switches and it would be unwise to block
1002 But removing obsolete switches is an effective approach to deal with the 1005 them strictly.
1003 problem. 1006 Nevertheless, removing obsolete switches still is an effective approach
1004 Working on an experimental branch, 1007 to deal with the problem.
1005 eased this work because I had not to offend users. 1008 Working on an experimental branch without an established user base,
1009 eased my work because I did not offend users when I removed existing
1010 funtions.
1006 .P 1011 .P
1007 Rose and Romine counted 24 visible and 9 more hidden switches for 1012 Rose and Romine counted 24 visible and 9 more hidden switches for
1008 .Pn send . 1013 .Pn send .
1009 At the beginning of mmh, it were 32 visible and 12 hidden ones. 1014 In nmh, they increased up to 32 visible and 12 hidden ones.
1010 At the time of writing, mmh's 1015 At the time of writing, no more than 7 visible switches and 1 hidden switch
1011 .Pn send 1016 have remained in mmh's
1012 has 7 visible switches and 1 hidden switch. 1017 .Pn send .
1013 (In each of the examples, the two generic help and version switches 1018 (These numbers include two generic switches, help and version.)
1014 are included.) 1019 .P
1015 .P 1020 Fig. XXX
1016 Figure XXX
1017 .\" XXX Ref 1021 .\" XXX Ref
1018 displays the number of switches for each of the tools that was not 1022 displays the number of switches for each of the tools that is available
1019 removed from or newly added to mmh. 1023 in both, nmh and mmh.
1020 Both, visible and hidden switches, were counted, but 1024 Visible as well as hidden switches were counted,
1021 not the generic help and version switches. 1025 but not the generic help and version switches.
1022 Whereas in the beginning of the project, the average tool had 11 switches, 1026 Whereas in the beginning of the project, the average tool had 11 switches,
1023 now it has no more than 5 \(en only half as many. 1027 now it has no more than 5 \(en only half as many.
1024 If the `no' switches and similar inverse variant are folded onto 1028 If the `no' switches and similar inverse variant are folded onto
1025 their counter-parts, the numbers are 8 in pre-mmh to 4 now. 1029 their counter-parts, the average tool has 8 switches in pre-mmh to 4 now.
1026 The total number of functional switches in mmh dropped from 465 1030 The total number of functional switches in mmh dropped from 465
1027 to 234. 1031 to 234.
1028 1032
1029 .KS 1033 .KS
1030 .in 1c 1034 .in 1c
1032 .KE 1036 .KE
1033 1037
1034 .P 1038 .P
1035 A part of the switches vanished after functions were removed. 1039 A part of the switches vanished after functions were removed.
1036 This was the case for network mail transfer, for instance. 1040 This was the case for network mail transfer, for instance.
1037 Sometimes the work flow was the other way: 1041 Sometimes, however, the work flow was the other way:
1038 The trying to reduce the number of switches suggested the removal of 1042 I looked through the
1039 functions. 1043 .Mp mh-chart (7)
1044 man page to identify the tools with apparently too many switches.
1045 Then considering the value of each of the switches by examining
1046 the tool's man page and source code, aided by recherche and testing.
1047 This way, the removal of functions was suggested by the aim to reduce
1048 the number of switches per command.
1049
1040 1050
1041 .U3 "Draft Folder Facility 1051 .U3 "Draft Folder Facility
1042 .P 1052 .P
1043 A change early in the project was the completely transition from 1053 A change early in the project was the completely transition from
1044 the single draft message to the draft folder facility. 1054 the single draft message to the draft folder facility.
1055 .Ci 337338b404931f06f0db2119c9e145e8ca5a9860
1045 The draft folder facility was introduced in the mid-Eighties. 1056 The draft folder facility was introduced in the mid-Eighties.
1046 (Rose and Romine called it a ``relatively new feature'' 1057 (Rose and Romine called it a ``relatively new feature''
1047 .[ 1058 .[
1048 rose romine real work 1059 rose romine real work
1049 .] 1060 .]
1050 in 1985.) 1061 in 1985.)
1051 Since then, the facility had existed but had remained deactivated 1062 Since then, the facility had existed but was deactivated by default.
1052 by default.
1053 The default activation and the related rework of the tools made it 1063 The default activation and the related rework of the tools made it
1054 possible to remove the 1064 possible to remove the
1055 .Sw -[no]draftfolder , 1065 .Sw -[no]draftfolder ,
1056 and 1066 and
1057 .Sw -draftmessage 1067 .Sw -draftmessage
1061 .Pn forw , 1071 .Pn forw ,
1062 .Pn dist , 1072 .Pn dist ,
1063 .Pn whatnow , 1073 .Pn whatnow ,
1064 and 1074 and
1065 .Pn send . 1075 .Pn send .
1066 The only flexibility removed is having multiple draft folders 1076 .Ci 337338b404931f06f0db2119c9e145e8ca5a9860
1067 within one profile. 1077 The only flexibility removed with this change is having multiple
1068 I consider this only a theoretical setup. 1078 draft folders within one profile.
1079 I consider this a theoretical problem only.
1069 In the same go, the 1080 In the same go, the
1070 .Sw -draft 1081 .Sw -draft
1071 switch of 1082 switch of
1072 .Pn anno , 1083 .Pn anno ,
1073 .Pn refile , 1084 .Pn refile ,
1092 .Pn anno 1103 .Pn anno
1093 had the switches 1104 had the switches
1094 .Sw -[no]inplace 1105 .Sw -[no]inplace
1095 to either annotate the message inplace and thus preserve hard links, 1106 to either annotate the message inplace and thus preserve hard links,
1096 or annotate a copy to replace the original message, breaking hard links. 1107 or annotate a copy to replace the original message, breaking hard links.
1097 Following the assumption that linked messages are the same message, 1108 Following the assumption that linked messages should truly be the
1098 and annotating it should not break the link, the 1109 same message, and annotating it should not break the link, the
1099 .Sw -[no]inplace 1110 .Sw -[no]inplace
1100 switches were removed and the previous default 1111 switches were removed and the previous default
1101 .Sw -inplace 1112 .Sw -inplace
1102 was made the only behavior. 1113 was made the only behavior.
1114 .Ci c8195849d2e366c569271abb0f5f60f4ebf0b4d0
1103 The 1115 The
1104 .Sw -[no]inplace 1116 .Sw -[no]inplace
1105 switches of 1117 switches of
1106 .Pn repl , 1118 .Pn repl ,
1107 .Pn forw , 1119 .Pn forw ,
1139 .Sw -inplace 1151 .Sw -inplace
1140 behavior was supported by the code complexity and the possible data loss 1152 behavior was supported by the code complexity and the possible data loss
1141 it caused. 1153 it caused.
1142 .Sw -noinplace 1154 .Sw -noinplace
1143 was chosen to be the definitive behavior. 1155 was chosen to be the definitive behavior.
1156 .Ci 68a686adeb39223a5e1ad35e4a24890ec053679d
1144 1157
1145 1158
1146 .U3 "Forms and Format Strings 1159 .U3 "Forms and Format Strings
1147 .P 1160 .P
1148 Historically, the tools that had 1161 Historically, the tools that had
1159 The 1172 The
1160 .Sw -format 1173 .Sw -format
1161 switches were dropped in favor for extending the 1174 switches were dropped in favor for extending the
1162 .Sw -form 1175 .Sw -form
1163 switches. 1176 switches.
1177 .Ci f51956be123db66b00138f80464d06f030dbb88d
1164 If their argument starts with an equal sign (`='), 1178 If their argument starts with an equal sign (`='),
1165 then the rest of the argument is taken as a format string, 1179 then the rest of the argument is taken as a format string,
1166 otherwise the arguments is treated as the name of a format file. 1180 otherwise the arguments is treated as the name of a format file.
1167 Thus, now the following two lines equal: 1181 Thus, now the following two lines equal:
1168 .VS 1182 .VS
1185 .Pn forw 1199 .Pn forw
1186 was removed in mmh. 1200 was removed in mmh.
1187 .Pn forw 1201 .Pn forw
1188 was completely switched to MIME-type forwarding, thus removing the 1202 was completely switched to MIME-type forwarding, thus removing the
1189 .Sw -[no]format . 1203 .Sw -[no]format .
1204 .Ci 6e271608b7b9c23771523f88d23a4d3593010cf1
1190 For 1205 For
1191 .Pn repl , 1206 .Pn repl ,
1192 the 1207 the
1193 .Sw -[no]format 1208 .Sw -[no]format
1194 switches were reworked to 1209 switches were reworked to
1195 .Sw -[no]filter 1210 .Sw -[no]filter
1196 switches. 1211 switches.
1212 .Ci 67411b1f95d6ec987b4c732459e1ba8a8ac192c6
1197 The 1213 The
1198 .Sw -format 1214 .Sw -format
1199 switches of 1215 switches of
1200 .Pn send 1216 .Pn send
1201 and 1217 and
1202 .Pn post , 1218 .Pn post ,
1203 which had a third meaning, 1219 which had a third meaning,
1204 were removed likewise. 1220 were removed likewise.
1221 .Ci f3cb7cde0e6f10451b6848678d95860d512224b9
1205 Eventually, the ambiguity of the 1222 Eventually, the ambiguity of the
1206 .Sw -format 1223 .Sw -format
1207 switches was resolved by not anymore having any such switch in mmh. 1224 switches was resolved by not anymore having any such switch in mmh.
1208 1225
1209 1226
1216 .Sw -[no]realsize 1233 .Sw -[no]realsize
1217 switches of 1234 switches of
1218 .Pn mhbuild 1235 .Pn mhbuild
1219 and 1236 and
1220 .Pn mhlist 1237 .Pn mhlist
1221 were removed, doing real size calculations always now, as 1238 were removed, doing real size calculations always now
1239 .Ci 8d8f1c3abc586c005c904e52c4adbfe694d2201c ,
1240 as
1222 ``This provides an accurate count at the expense of a small delay.'' 1241 ``This provides an accurate count at the expense of a small delay.''
1223 This small delay is not noticable on modern systems. 1242 This small delay is not noticable on modern systems.
1224 .P 1243 .P
1225 The 1244 The
1226 .Sw -[no]check 1245 .Sw -[no]check
1228 .Hd Content-MD5 1247 .Hd Content-MD5
1229 header fields. 1248 header fields.
1230 .[ 1249 .[
1231 rfc 1864 1250 rfc 1864
1232 .] 1251 .]
1252 .Ci 31dc797eb5178970d68962ca8939da3fd9a8efda
1233 (See Sec. XXX) 1253 (See Sec. XXX)
1234 .P 1254 .P
1235 The 1255 The
1236 .Sw -[no]ebcdicsafe 1256 .Sw -[no]ebcdicsafe
1237 and 1257 and
1238 .Sw -[no]rfc934mode 1258 .Sw -[no]rfc934mode
1239 switches of 1259 switches of
1240 .Pn mhbuild 1260 .Pn mhbuild
1241 were removed because they are considered obsolete. 1261 were removed because they are considered obsolete.
1262 .Ci 01a3480928da485b4d6109d36d751dfa71799d58
1263 .Ci 3363e2624dce0eb8164cf8b3f1ab385c8ff72e88
1242 .P 1264 .P
1243 Content caching of external MIME parts, activated with the 1265 Content caching of external MIME parts, activated with the
1244 .Sw -rcache 1266 .Sw -rcache
1245 and 1267 and
1246 .Sw -wcache 1268 .Sw -wcache
1247 switches was completely removed. 1269 switches was completely removed.
1248 External MIME parts are truly rare today, having a caching facility 1270 .Ci d1fefd9f614e4dc3cda16da6c69133c1b2005269
1271 External MIME parts are rare today, having a caching facility
1249 for them is appears to be unnecessary. 1272 for them is appears to be unnecessary.
1250 .P 1273 .P
1251 In pre-MIME times, 1274 In pre-MIME times,
1252 .Pn mhl 1275 .Pn mhl
1253 had covered many tasks that are part of MIME handling today. 1276 had covered many tasks that are part of MIME handling today.
1254 Therefore, 1277 Therefore,
1255 .Pn mhl 1278 .Pn mhl
1256 could be simplified to a large extend, reducing the number of its 1279 could be simplified to a large extend, reducing the number of its
1257 switches from 21 to 6. 1280 switches from 21 to 6.
1281 .Ci 350ad6d3542a07639213cf2a4fe524e829c1e7b6
1282 .Ci 0e46503be3c855bddaeae3843e1b659279c35d70
1258 1283
1259 1284
1260 .U3 "Mail Transfer Switches 1285 .U3 "Mail Transfer Switches
1261 .P 1286 .P
1262 With the removal of the mail transfer facilities, a lot of switches 1287 With the removal of the mail transfer facilities, a lot of switches
1326 and 1351 and
1327 .Sw -mmdf 1352 .Sw -mmdf
1328 switches. 1353 switches.
1329 .Sw -mbox 1354 .Sw -mbox
1330 is the sole behavior now. 1355 is the sole behavior now.
1356 .Ci 3916ab66ad5d183705ac12357621ea8661afd3c0
1331 In the same go, 1357 In the same go,
1332 .Pn packf 1358 .Pn packf
1333 was reworked (see Sec. XXX) and its 1359 and
1360 .Pn rcvpack
1361 were reworked (see Sec. XXX) and their
1334 .Sw -file 1362 .Sw -file
1335 switch became unnecessary. 1363 switch became unnecessary.
1364 .Ci ca1023716d4c2ab890696f3e41fa0d94267a940e
1336 1365
1337 1366
1338 .U3 "Terminal Magic 1367 .U3 "Terminal Magic
1339 .P 1368 .P
1340 Mmh's tools will no longer clear the screen (\c 1369 Mmh's tools will no longer clear the screen (\c
1341 .Pn scan 's 1370 .Pn scan 's
1342 and 1371 and
1343 .Pn mhl 's 1372 .Pn mhl 's
1344 .Sw -[no]clear 1373 .Sw -[no]clear
1345 switches). 1374 switches
1375 .Ci e57b17343dcb3ff373ef4dd089fbe778f0c7c270
1376 .Ci 943765e7ac5693ae177fd8d2b5a2440e53ce816e ).
1346 Neither will 1377 Neither will
1347 .Pn mhl 1378 .Pn mhl
1348 ring the bell (\c 1379 ring the bell (\c
1349 .Sw -[no]bell ) 1380 .Sw -[no]bell
1381 .Ci e11983f44e59d8de236affa5b0d0d3067c192e24 )
1350 nor page the output itself (\c 1382 nor page the output itself (\c
1351 .Sw -length ). 1383 .Sw -length
1384 .Ci 5b9d883db0318ed2b84bb82dee880d7381f99188 ).
1352 .P 1385 .P
1353 Generally, the pager to use is no longer specified with the 1386 Generally, the pager to use is no longer specified with the
1354 .Sw -[no]moreproc 1387 .Sw -[no]moreproc
1355 command line switches for 1388 command line switches for
1356 .Pn mhl 1389 .Pn mhl
1357 and 1390 and
1358 .Pn show /\c 1391 .Pn show /\c
1359 .Pn mhshow . 1392 .Pn mhshow .
1393 .Ci 39e87a75b5c2d3572ec72e717720b44af291e88a
1360 .P 1394 .P
1361 .Pn prompter 1395 .Pn prompter
1362 lost its 1396 lost its
1363 .Sw -erase 1397 .Sw -erase
1364 and 1398 and
1372 data output is self-explaining enough that 1406 data output is self-explaining enough that
1373 displaying the header line makes few sense. 1407 displaying the header line makes few sense.
1374 Hence, the 1408 Hence, the
1375 .Sw -[no]header 1409 .Sw -[no]header
1376 switch was removed and headers are never printed. 1410 switch was removed and headers are never printed.
1411 .Ci 601cc73d1fa05ce96faa728f036d6c51b91701c7
1377 .P 1412 .P
1378 In 1413 In
1379 .Pn mhlist , 1414 .Pn mhlist ,
1380 the 1415 the
1381 .Sw -[no]header 1416 .Sw -[no]header
1382 switches were removed, too. 1417 switches were removed, too.
1418 .Ci b24f96523aaf60e44e04a3ffb1d22e69a13a602f
1383 But in this case headers are always printed, 1419 But in this case headers are always printed,
1384 because the output is not self-explaining. 1420 because the output is not self-explaining.
1385 .P 1421 .P
1386 .Pn scan 1422 .Pn scan
1387 also had 1423 also had
1393 As this information can be perfectly retrieved by 1429 As this information can be perfectly retrieved by
1394 .Pn folder 1430 .Pn folder
1395 and 1431 and
1396 .Pn date , 1432 .Pn date ,
1397 consequently, the switches were removed. 1433 consequently, the switches were removed.
1434 .Ci c477dc5d1d03fa6d9a8ab3dd3508c63cbddc044e
1398 .P 1435 .P
1399 By removing all 1436 By removing all
1400 .Sw -header 1437 .Sw -header
1401 switches, the collision with 1438 switches, the collision with
1402 .Sw -help 1439 .Sw -help
1420 and 1457 and
1421 .Pn whatnow 1458 .Pn whatnow
1422 was removed, but it can now be replaced by specifying 1459 was removed, but it can now be replaced by specifying
1423 .Sw -editor 1460 .Sw -editor
1424 with an empty argument. 1461 with an empty argument.
1462 .Ci 75fca31a5b9d5c1a99c74ab14c94438d8852fba9
1425 (Specifying 1463 (Specifying
1426 .Cl "-editor true 1464 .Cl "-editor true
1427 is nearly the same, only differing by the previous editor being set.) 1465 is nearly the same, only differing by the previous editor being set.)
1428 .P 1466 .P
1429 The more important change is the removal of the 1467 The more important change is the removal of the
1430 .Sw -nowhatnowproc 1468 .Sw -nowhatnowproc
1431 switch. 1469 switch.
1470 .Ci ee4f43cf2ef0084ec698e4e87159a94c01940622
1432 This switch had introduced an awkward behavior, as explained in nmh's 1471 This switch had introduced an awkward behavior, as explained in nmh's
1433 man page for 1472 man page for
1434 .Mp comp (1): 1473 .Mp comp (1):
1435 .QP 1474 .QP
1436 The \-editor editor switch indicates the editor to use for 1475 The \-editor editor switch indicates the editor to use for
1474 was 1513 was
1475 .Sw -fast . 1514 .Sw -fast .
1476 I removed the 1515 I removed the
1477 .Sw -[no]total 1516 .Sw -[no]total
1478 legacy. 1517 legacy.
1518 .Ci ea21fe2c4bd23c639bef251398fae809875732ec
1479 .BU 1519 .BU
1480 The 1520 The
1481 .Sw -subject 1521 .Sw -subject
1482 switch of 1522 switch of
1483 .Pn sortm 1523 .Pn sortm
1484 existed for compatibility only. 1524 existed for compatibility only.
1485 It can be fully replaced by 1525 It can be fully replaced by
1486 .Cl "-textfield subject 1526 .Cl "-textfield subject
1487 thus it was removed. 1527 thus it was removed.
1528 .Ci 00140a3c86e9def69d98ba2ffd4d6e50ef6326ea
1488 1529
1489 1530
1490 .U3 "Various 1531 .U3 "Various
1491 .BU 1532 .BU
1492 In order to avoid prefix collisions among switch names, the 1533 In order to avoid prefix collisions among switch names, the
1493 .Sw -version 1534 .Sw -version
1494 switch was renamed to 1535 switch was renamed to
1495 .Sw -Version 1536 .Sw -Version
1496 (with capital `V'). 1537 (with capital `V').
1538 .Ci 32b2354dbaf4bf934936eb5b102a4a3d2fdd209a
1497 Every program has the 1539 Every program has the
1498 .Sw -version 1540 .Sw -version
1499 switch but its first three letters collided with the 1541 switch but its first three letters collided with the
1500 .Sw -verbose 1542 .Sw -verbose
1501 switch, present in many programs. 1543 switch, present in many programs.
1520 .BU 1562 .BU
1521 The removal of the 1563 The removal of the
1522 .Sw -[no]reverse 1564 .Sw -[no]reverse
1523 switches of 1565 switches of
1524 .Pn scan 1566 .Pn scan
1567 .Ci 8edc5aaf86f9f77124664f6801bc6c6cdf258173
1525 is a bug fix, supported by the comments 1568 is a bug fix, supported by the comments
1526 ``\-[no]reverse under #ifdef BERK (I really HATE this)'' 1569 ``\-[no]reverse under #ifdef BERK (I really HATE this)''
1527 by Rose and 1570 by Rose and
1528 ``Lists messages in reverse order with the `\-reverse' switch. 1571 ``Lists messages in reverse order with the `\-reverse' switch.
1529 This should be considered a bug.'' by Romine in the documentation. 1572 This should be considered a bug.'' by Romine in the documentation.
1530 The question remaining is why neither Rose and Romine had fixed this 1573 The question remains why neither Rose and Romine had fixed this
1531 bug in the Eighties when they wrote these comments nor has anyone 1574 bug in the Eighties when they wrote these comments nor has anyone
1532 thereafter. 1575 thereafter.
1533 1576
1534 1577
1535 .ig 1578 .ig