Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!sun.arpa!nagler%orb From: nagler%orb@SUN.ARPA (Rob Nagler) Newsgroups: net.lang.mod2 Subject: Re: IO (Re: Overloading) Message-ID: <8603091851.AA07620@orb.sun.uucp> Date: Sun, 9-Mar-86 13:51:06 EST Article-I.D.: orb.8603091851.AA07620 Posted: Sun Mar 9 13:51:06 1986 Date-Received: Wed, 12-Mar-86 05:45:25 EST Sender: usenet@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 49 1) VARARGS (variable number of parameters) and 2) variable type of parameter One should keep in mind that features add complexity and with complexity cems size. Personally, I think there are far too many unnecessary features in M2 already. For example, the CAP function. It is nice, but is it necessary? Local modules are cute, but do they really serve a purpose, that is, if it is a module, why not slap a definition on it and make it a separate compilation unit? The DEC and INC operators don't need to be in the language, they should be optimized by the compiler or provided by a Assembly language module So what does this have to do with over-loading? Well, I like M2 because it runs on anything that has a processor and a little memory. Ada on the other hand is obese with features ane of them overloading. Granted, for certain applications it is much more convenient and comfortable (like a Cadillac limo), but you have to consider what it is like to use in environments which aren't ammenable to large support systems (try driving in rural Italy sometime). Everything is a tradeoff, but I can run a full implementation of M2 on an Apple //, can't say the same for Ada. A word about IO. You have to compare frequency with which a shorthand notation is used, in order to justify its inclusion. The arithmetic operators are an obvious example of a useful abbreviation. Var args is a pretty serious feature to add and to add it for only one purpose, condensed IO statements, is (I think) a weak argument. The number of lines of IO statements in a module is usually much lower than, say, uses of arithmetic operators. In general, most programs don't use complicated IO features, e.g: Enter a filename: farkle.mod I haven't done a survey, but I bet the number of IO statements that use more than argument is less than 5% of a program. I also find that my IO statements which are very complicated end up being on multiple lines, anyway. Therefore, it seems kind of wasteful to include a feature which doesn't enhance the functionality and is probably not used all that much. Is it too late in the game to tack it on? It's never too late, but I think it would be unwise. Rob PS. I hope those people who do not wish to hear my diatribes will not be too greatly offended by my endless musings. I am VERY interested in seeing M2 standardized and it is exactly these types of issues which need to be resolved before standardization of the language and library can occur.