| PLEX86 | ||
Where should the type information be 156Considering that PL-I was designed by a committee with a short time limit 40 years ago, they did a remarkably good job. Part of its problem is cultural, it's perceived as overcomplex (the VDL goop in the standard didn't help) with too many IBM-ish things like LOCATE and ON KEY. I agree these are not compelling, particularly in the era of monstrosities like C++. The practical problems are that the the type system is out of control, and the flow of control is stultified. For the latter, all it offers is IF, CALL, and the condition system which is so confusing that it's rare for anyone to use it other than in stylized ways like catching an EOF on a file. For the type system, consider this snippet. (It's been a while since I wrote any PL-I, so the syntax may be a little off.) DCL (A, B, C) CHAR(3); A = '111'; B = '222'; C = A + B; What does C contain? The correct answer is three spaces, since the values of A and B are coerced to integers, added, and coerced back to a default size string ' 333' which is then truncated to fit. Oops. Even though the type system has defaults all over the place, nearly all of which make sense in isolation, they combine in wacky ways, programmers don't trust them, and they tend to overspecify their data by making everything FIXED BINARY(15) or FIXED BINARY(31). In theory a diligent programmer should figure out how many bits each datum needs, in reality nobody bothered. PL-I also suffered (probably still suffers) from being a language where they intended that most programmers only know and use a subset. I learned PL-I from the reference manual and people complained that my code was unreadable because I wrote mostly Fortran-ish code, but I used structures and pictures to make my printouts look nice. Where should the type information be 157 John R. Levine What flow of control do you want? besides IF, CALL and ON-SIGNAL, you have SELECT (like C's 'switch' without the 'break' problem) and various flavors... Regards, "I dropped the toothpaste", said Tom, crestfallenly.
|
||||
Where should the type information be 157 Alt Folklore Computers from Newsgroups The #1 Usenet Provider on the Internet
|
||||