From a software engineering point of view, of course, a program must “work” according to its specifications. But this is not sufficient. The manner in which it is designed and written is as important as whether the program works. The ease with which the software can be changed to upgrade performance, meet additional specifications, or rectify errors that are later discovered is directly related to the quality of design and implementation. The “hot-shot” programmer who can quickly throw together cryptic lines of code that only he or she can understand is of questionable value. The programmer who boasts of using clever tricks to reduce the total number of lines of code has probably missed the point. Computer memory is relatively cheap, whereas the modification of software (a process greatly enhanced by program clarity) is generally expensive. Thus, given a choice between a little less economy of code or greater program clarity, the latter is often preferred.

From the ‘Software Engineering with Modula-2 and Ada’ by Wiener and Sincovec.

#programming #modula-2 #ada #wiener #sincovec #quote

բնօրինակ սփիւռքում(եւ մեկնաբանութիւննե՞ր)

Various dialects of Pascal, such as UCSD Pascal, provide the separate compilation unit, called UNIT, as a half-way measure in the right direction. Unfortunately, the Pascal UNIT facility (interface portion) does not allow a physical separation between specification and implementation, which are tied together in the same compilation unit.

Because the interface section and the implementation section of a Pascal compilation unit are required to be in the same physical unit, the data structure for any Pascal data type must be completely specified in the interface portion except when only one variable of such data type is to be allowed. In such a case the data structure can be hidden in the implementation portion of the compilation unit. This restriction is rather severe. For example, only one complex number variable, only one stack variable, only one string variable, only one list variable, could exist in a program at a given time. This is unrealistic in most cases.

In the Modula-2 dynamic string abstraction presented in section 1.3, each procedure contains a parameter of type string. This permits many string variables to coexist in a program. Each individual string variable may be manipulated independent of the others. The data structure for the type string is not specified in the interface unit (definition module) because of Modula-2’s opaque type facility and the separation between specification and implementation.

To allow each Pascal procedure in the interface portion of a string compilation unit to contain a parameter of type string, the data structure for string must be completely specified before the first parameter reference to type string is given. Thus the essential feature of data hiding is lost in Pascal, even with the limited facility of separate compilation available in some dialects of Pascal.

#pascal #modula-2 #modula #encapsulation #interface

բնօրինակ սփիւռքում(եւ մեկնաբանութիւննե՞ր)

If Only Borland Had Stuck With Turbo Modula-2 For CP/M

Like Turbo Pascal, Turbo Modula-2 was an Integrated Development Environment including a compiler and Wordstar based editor. On top of this TM-2 added a separate linker and library manager. The most obvious initial difference is the size of an installation: TM-2 takes up 142Kb, compared to TP’s tiny 34Kb. However for this you get a lot more facilities, a bigger library and an altogether more sophisticated system.

http://techtinkering.com/2013/03/12/if-only-borland-had-stuck-with-turbo-modula-2-for-cpm/

#modula-2 #borland #pascal #cpm #retro-computing #programming

բնօրինակ սփիւռքում(եւ մեկնաբանութիւննե՞ր)

I have published Vishap Oberon compiler

https://github.com/norayr/voc

#vishap #voc #oberon #oberon-2 #compiler #ofront #pascal #modula-2 #fork #github #compilers #վիշապ #օբերոն #կոմպիլյատոր #պասկալ #մոդուլա֊2 #ծրագրավորում

բնօրինակ սփիւռքում(եւ մեկնաբանութիւննե՞ր)