Modula and Modula-2 went nowhere not because they’re particularly high level languages (they’re not much higher than C!) but because they didn’t have a quasi-free operating system spreading like a virus to bolster their popularity. At the time Unix was almost unique in being a semi-capable operating system written in a portable language that wasn’t wrapped up in billions of proprietary licensing arrangements (because AT&T didn’t notice there was a potential market for it until after the cat had escaped the bag).


#modula #modula-2 #modula2 #c #programming-languages #programming_languages #unix

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

Why I use Object Pascal

#pascal #programming #article #object_pascal #design

first of all, the article does not mention the most important thing - modules. pascal has modules. modules were introduced to c++ just in 2017. modules are why you can have type checks across boundaries of modules.

and pascal units are modules. if they do those loadable on demand, that would be cooler.

Pascal is very strict, so the programmer has to differ between subroutines that return values, in Pascal called functions, and subroutines that does not return something, called procedures. Functions and procedures can also be passed to variables or other functions thanks to procedural types.

well, in pascal successors the function keyword removed, leaving just one procedure, or to be precise PROCEDURE because Wirth decided to make successor languages case sensitive and decrease the number of lexems.

It is possible to overload operators for specific types. With this feature, you have the power to define, let’s say, the result of the addition operation of two or more instances of the same class.

That’s one of the reasons why Wirth doesn’t like modern pascal implementations. The author tries to say - Pascal has all the features, while Wirth was trying to create a minimalistic language by following “less is more” principle.

Pascal is modular

okay, he said this. but did not connect to the type checks.

Pascal has good documentation

indeed, documentation is good, understandable and comprehensive.

well, for me Pascal today is like ‘better c++’, but why would i need better c++ if i have Oberon?

i will use it to write gui applications, or if i need to write something very fast and i don’t have libraries for Oboren and time to create libraries or bindings.

#pascal #oberon #modula-2 #wirth #design

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

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

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