Recent

Author Topic: Pascal origin, where does it come from  (Read 20538 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6646
Re: Pascal origin, where does it come from
« Reply #15 on: August 11, 2020, 08:55:19 am »
As we are going down memory lane and doing origins.  The Lisa Pascal Reference Manual, for which Clascal (later Object Pascal) is based on, is itself based on and references the Pascal User Manual and Report (the basis of the ISO standard), created by Kathleen Jensen and Niklaus Wirth.  Presented as viewable PDF.

Pascal User Manual and Report

There's several iterations of that, starting off with Wirth's original conference etc. papers. The quality improves substantially once Jensen is involved, I think I'd argue that she made a substantial contribution to the viability of the language.

Interestingly, a student on an MSc course I was once supporting did a spectacularly competent job "refactoring" some of the Multics documentation for her thesis. She singlemindedly adopted a uniform format: what a command did, its parameters, and- above all- if it was interactive how you backed out of it without breaking anything. It was a good illustration of how a bit of discipline can make an enormous difference, and I've tried to learn from it whenever I've been doing technical writing.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Pascal origin, where does it come from
« Reply #16 on: August 11, 2020, 09:59:03 am »
It's interesting that later on he appeared to be very hostile to OO, arguing that everything could be done adequately using records.
https://people.inf.ethz.ch/wirth/Articles/GoodIdeas_origFig.pdf
Are you referring to ending of chapter 6.3 in this paper?

Quote
the careful observer may wonder, where the core of the new paradigm would hide, what was the essential difference to the traditional view of programming. After all, the old cornerstones of procedural programming reappear, albeit embedded in a new terminology: Objects are records, classes are types, methods are procedures, and sending a method is equivalent to calling a procedure. True, records now consist of data fields and, in addition, methods; and true, the feature called inheritance allows the construction of heterogeneous data structures, useful also without object-orientation. Was this change of terminology expressing an essential paradigm shift, or was it a vehicle for gaining attention, a “sales trick”?
I find chapter 6.3 sounding more as a critique to OOP terminology then being hostile to OOP in general. If you were referring to some other paper then I would appreciate a pointer as I would really like to read it. Thanks!
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

MarkMLl

  • Hero Member
  • *****
  • Posts: 6646
Re: Pascal origin, where does it come from
« Reply #17 on: August 11, 2020, 11:07:14 am »
No, it was much older... something like 1986 and I saw in it the mid/late-90s. It came across as reactionary in the extreme: OO didn't (in his opinion) have anything to offer since everything could be done with records and so on.

I'll see if I can track it down but I don't hold out very much hope. Certainly won't be immediate, I'm trying to do some power electronics faultfinding for somebody.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

440bx

  • Hero Member
  • *****
  • Posts: 3921
Re: Pascal origin, where does it come from
« Reply #18 on: August 11, 2020, 11:51:10 am »
https://people.inf.ethz.ch/wirth/Articles/GoodIdeas_origFig.pdf
Are you referring to ending of chapter 6.3 in this paper?
Like most everything N. Wirth has done/written, I thoroughly enjoyed reading that paper.  Thank you for posting it.

I find chapter 6.3 sounding more as a critique to OOP terminology then being hostile to OOP in general. If you were referring to some other paper then I would appreciate a pointer as I would really like to read it. Thanks!
I agree.  Actually, I am surprised he didn't mention any of the rather significant downsides of OOP.
« Last Edit: August 11, 2020, 08:36:02 pm by 440bx »
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6646
Re: Pascal origin, where does it come from
« Reply #19 on: August 11, 2020, 04:47:04 pm »
It's certainly a wide-ranging paper, but once one starts considering the details one has to have conclude that he's being selective with his recollections.

For example, he criticises ALGOL's dangling-else, without mentioning that it was fixed in ALGOL-68 but still present in his (slightly later) Pascal. He talks about := being ALGOL's assignment, which is wrong (it used a left arrow). He states that memory protection is unnecessary since compilers should be trusted, which has been proven false multiple times both before and after his date of writing. Finally, he talks about "loopholes" in programs, rather than the industry-standard "cast" or his own term "type transfer".

I agree with his point about excessive research into parsers such that absolutely any kind of syntax could be processed efficiently. I think I'm a bit more positive about extensible languages than he is, and I'm disappointed that he ignored Modula-3's  capability for declaring that a module has a questionable implementation: there's a whole lot of things that are essential but should only be in specially "blessed" modules implemented by a skilled programmer and these could usefully include type transfers and extensible syntax. And so on.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Blade

  • Full Member
  • ***
  • Posts: 177
Re: Pascal origin, where does it come from
« Reply #20 on: August 11, 2020, 09:00:48 pm »
I never took it as Nicklaus Wirth being anti-OOP, but rather he didn't buy into the hype or "only OOP, all the time".  The procedural programming paradigm can be just as viable, and as to which to use was a matter of the situation, studied choice, and/or preference.  Though I do think he was making it clear, that it would be advantageous to fully grasp what can be done with procedural programming. Again, things such as: records, nested functions, default/optional parameters, variants, using units, etc... In this way, one can be more well informed about when one should or should not use OOP.

Nicklaus Wirth from a 1997 interview with Carlo Pescio

"Many people tend to look at programming styles and languages like religions: if you belong to one, you cannot belong to others. But this analogy is another fallacy. It is maintained for commercial reasons only. Object-oriented programming (OOP) solidly rests on the principles and concepts of traditional procedural programming (PP). OOP has not added a single novel concept, but it emphasizes two concepts much more strongly that was done with procedural programming. The fist such concept is that of the procedure bound to a composite variable called object. (The binding of the procedure is the justification for it being called a method). The means for this binding is the procedure variable (or record field), available in languages since the mid 1970s. The second concept is that of constructing a new data type (called subclass) by extending a given type (the superclass).

It is worthwhile to note that along with the OOP paradigm came an entirely new terminology with the purpose of mystifying the roots of OOP. Thus, whereas you used to be able to activate a procedure by calling it, one now sends a message to the method. A new type is no longer built by extending a given type, but by defining a subclass which inherits its superclass. An interesting phenomenon is that many people learned for the first time about the important notions of data type, of encapsulation, and (perhaps) of information hiding when introduced to OOP. This alone would have made the introduction to OOP worthwhile, even if one didn't actually make use of its essence later on.

Nevertheless, I consider OOP as an aspect of programming in the large; that is, as an aspect that logically follows programming in the small and requires sound knowledge of procedural programming. Static modularization is the first step towards OOP. It is much easier to understand and master than full OOP, it's sufficient in most cases for writing good software, and is sadly neglected in most common languages (with the exception of Ada).

In a way, OOP falls short of its promises. Our ultimate goal is extensible programming (EP). By this, we mean the construction of hierarchies of modules, each module adding new functionality to the system. EP implies that the addition of a module is possible without any change in the existing modules. They need not even be recompiled. New modules not only add new procedures, but - more importantly - also new (extended) data types. We have demonstrated the practicality and economy of this approach with the design of the Oberon System"

Full interview link- http://www.eptacom.net/pubblicazioni/pub_eng/wirth.html

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Pascal origin, where does it come from
« Reply #21 on: August 11, 2020, 09:25:38 pm »
I'll see if I can track it down but I don't hold out very much hope.
It is not of much importance and was just my curiosity, so no need to put much effort in it. I thought you could remember out of your head, so never mind. Thanks anyway!

... he criticises ALGOL's dangling-else, without mentioning that it was fixed in ALGOL-68 but still present in his (slightly later) Pascal.
In his self critique of GOTO he also regrets not fixing dangling else in Pascal:
Quote
The designer of Pascal retained the goto statement (as well as the if statement without closing end symbol). Apparently he lacked the courage to break with convention and made wrong concessions to traditionalists. But that was in 1968. By now, almost everybody has understood the problem, but apparently not the designers of the latest commercial programming languages, such as C#.
Pascal was officially out in 1969. He and his team were coding it for more then a year, and if you also count the effort needed before coding you can more or less safely guess that ALGOL 68 was not out when they started. There also was no internet at the time, so news were travelling slow. Besides, I do not think that they wanted to throw away thousands of punch cards just to change dangling else that ALGOL 68 fixed in the middle of their work.  ;) Unfortunately Pascal was too late for that, but Modula-2 wasn't.  :D

He talks about := being ALGOL's assignment, which is wrong (it used a left arrow).
Are you sure? Wikipedia is not always right but it quotes use of := in this ALGOL 60 code example:
https://en.wikipedia.org/wiki/ALGOL#ALGOL_60

It is worthwhile to note that along with the OOP paradigm came an entirely new terminology with the purpose of mystifying the roots of OOP. Thus, whereas you used to be able to activate a procedure by calling it, one now sends a message to the method. A new type is no longer built by extending a given type, but by defining a subclass which inherits its superclass.
This is so true. I remember my early OOP days when I didn't have problems in embracing methodology, but have been struggling with terminology.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

440bx

  • Hero Member
  • *****
  • Posts: 3921
Re: Pascal origin, where does it come from
« Reply #22 on: August 11, 2020, 10:48:07 pm »
This is so true. I remember my early OOP days when I didn't have problems in embracing methodology, but have been struggling with terminology.
Terminology is important in programming.  For instance, a significant percentage of programmers would frown at any extensive use of the "goto" statement, yet those very same programmers don't seem to have any problem with an equally extensive use of exceptions (which are a lot worse than a run of the mill "goto".)

Somewhere along the line some advertising folks starting participating in programming language design.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

dtoffe

  • Jr. Member
  • **
  • Posts: 55
Re: Pascal origin, where does it come from
« Reply #23 on: August 11, 2020, 11:00:33 pm »
Nicklaus Wirth from a 1997 interview with Carlo Pescio

Full interview link- http://www.eptacom.net/pubblicazioni/pub_eng/wirth.html

    Thanks for the link, a very pleasant reading.
    Is there any new language that follows the tradition of Pascal and Modula ?

Daniel

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Pascal origin, where does it come from
« Reply #24 on: August 11, 2020, 11:14:32 pm »
    Is there any new language that follows the tradition of Pascal and Modula ?

Tongue-in-cheek I would say almost all the "new" features introduced in C/C++/C# and their ilk are attempts to introduce Pascal-ish constructions and concepts into them by the back door :P
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Pascal origin, where does it come from
« Reply #25 on: August 11, 2020, 11:20:56 pm »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Pascal origin, where does it come from
« Reply #26 on: August 12, 2020, 12:08:49 am »
This is so true. I remember my early OOP days when I didn't have problems in embracing methodology, but have been struggling with terminology.
Terminology is important in programming.
I agree that embracing terminology matters a lot. But I was more referring to Wirth mentioning giving new names to existing terms that only had some make up. There were new concepts, but quite a bit was old but renamed. There was no need for that.

    Is there any new language that follows the tradition of Pascal and Modula ?
Oberon and Oberon-2?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

440bx

  • Hero Member
  • *****
  • Posts: 3921
Re: Pascal origin, where does it come from
« Reply #27 on: August 12, 2020, 12:29:15 am »
There were new concepts, but quite a bit was old but renamed. There was no need for that.
I agree with that.  I suspect that without the renaming, it wouldn't have attracted as much attention.  The renaming made it look like a new concept even though in many ways it was not.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Blade

  • Full Member
  • ***
  • Posts: 177
Re: Pascal origin, where does it come from
« Reply #28 on: August 12, 2020, 01:47:46 am »
    Is there any new language that follows the tradition of Pascal and Modula ?
Oberon and Oberon-2?

I think we should add Component Pascal into the mix, which is a superset of Oberon-2.  Part of the issue is that with the various Object Pascal flavors (including Delphi) being so prominent and also evolving/updating, I think the other Wirthian languages can't get traction.

dtoffe

  • Jr. Member
  • **
  • Posts: 55
Re: Pascal origin, where does it come from
« Reply #29 on: August 12, 2020, 02:06:02 am »
    Is there any new language that follows the tradition of Pascal and Modula ?

Tongue-in-cheek I would say almost all the "new" features introduced in C/C++/C# and their ilk are attempts to introduce Pascal-ish constructions and concepts into them by the back door :P

    Well yes, C++ keeps introducing features at a steady pace, the problem with older languages is that they can't deprecate features without breaking backwards compatibility, and its complexity is daunting. That's why I specified "new" language.

    Is there any new language that follows the tradition of Pascal and Modula ?
Oberon and Oberon-2?

    Kinda, Oberon is '87, Oberon 2 is '93, then you have Oberon 07. I tried BlackBox Component Builder some time ago and was underwhelmed, but I'm likely conflating the language and the tool here.
    I was meaning newish like Nim, Zig or Pony, for example. This is just out of curiosity, anyway. I wonder how Object Pascal, Modula or Ada would look if they where designed in, say, 2015, from scratch.

Thanks,

Daniel

 

TinyPortal © 2005-2018