From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,99222a5bd46ef3c9 X-Google-Attributes: gid103376,public From: Karel Th�nissen Subject: Featuritis not always bad (was re: GOTO considered necessary) Date: 1997/06/25 Message-ID: <33B0673C.6C76@hello.nl>#1/1 X-Deja-AN: 252347619 References: <5nn2fm$11dk$1@prime.imagin.net> <199706121410.QAA05823@basement.replay.com> <33A0840B.1B41@sprintmail.com> <33A58C79.1C7A@sprintmail.com> <33A8DB59.776F@hello.nl> <33AE29D6.7258@sprintmail.com> Organization: Hello Technologies, Netherlands Newsgroups: comp.lang.ada Date: 1997-06-25T00:00:00+00:00 List-Id: Robert Dewar wrote: > Right, I often state a rule that says that adding ANY feature AT ALL to > a language damages the language by increasing size and complexity. Yes, but leaving it out may lead to increased size and complexity of programs written in the language. If the feature is difficult to get right, maybe it is an even better idea to have it incorporated in the language and not in the programs. Then tens of thousands of programmers can all save hours of trying to make it themselves in their numerous programs (Ada-case) or millions of programmers can all save weeks trying to make it themselves (C/C++-case 8-) in their numerous programs. In general, I object to the use of the term complexity as a measurment in language design. Complexity of the compiler? complexity of the tutorial? complexity of the programs written in it, complexity of the design, complexity of the design and programming proces, complexity of verification, validation and testing? Usually one comes at the expense of the other. The most serious effect is often the consumption of precious name space by reserved words. > The trick is to ensure that the positive contributions of the new > feature outweigh this damage. As for many things in life 8-) > I think this is an important language design principle. Otherwise you > end up saying "oh sure, stick this in, people do not have to use it > if they do not want it." Which is no problem if the feature: 1) is well designed and well behaved, so no tail biting 2) comes as a independant feature, so that people can work with the rest of the language without ever knowing that the feature existed. This ensures that people can write in the language safely if they have not finished the full language course: avoid steep learning curve and memory load. 3) comes as a clearly recognisable syntactic entity in the language. So if one reads the code and is not familiar with the feature one at least knows that there is a cognitive problem, and knows where to look in the reference manual (and find there many useful informations on the feature that would find no place if the feature was to be simulated with lower level constructs) This is one of the great benefits of design patterns: they allow us an understanding of the system at a higher level of understanding and provide an easier to grasp repetoir of solutions and a vocabulary. I leave it as an exercise to the reader to determine whether the FSM is such a feature. Groeten, Karel