• Relearning Fortran

    From Liam Proven@21:1/5 to All on Tue Apr 5 16:51:29 2022
    I am delighted to discover what seems to be a relatively lively newsgroup!

    I used to program Fortran at Uni in the late 1980s. F77 on VAX/VMS,
    mainly. I was fairly _au fait_ with it.

    I haven't really coded in decades and I keep pondering trying to get
    back into it.

    I have looked at various modern languages but find all the OOPS and so
    on confusing and unnecessary for small, hobbyist stuff.

    For a non-professional, is modern Fortran so very different from F77
    that it would be akin to learning a new language, or do folks think it
    might be relatively easy to update my knowledge and pick it up again?

    Is there much in the way of supporting libraries, or is Fortran only
    used for numerical stuff these days?

    --
    Liam P. ~ Prague, Czechia ~ liamproven on yahoo UK and AOL

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bruno@21:1/5 to All on Tue Apr 5 18:10:23 2022
    Le 05/04/2022 à 16:51, Liam Proven a écrit :
    I am delighted to discover what seems to be a relatively lively newsgroup!

    I used to program Fortran at Uni in the late 1980s. F77 on VAX/VMS,
    mainly. I was fairly _au fait_ with it.

    I haven't really coded in decades and I keep pondering trying to get
    back into it.

    I have looked at various modern languages but find all the OOPS and so
    on confusing and unnecessary for small, hobbyist stuff.

    For a non-professional, is modern Fortran so very different from F77
    that it would be akin to learning a new language, or do folks think it
    might be relatively easy to update my knowledge and pick it up again?

    Is there much in the way of supporting libraries, or is Fortran only
    used for numerical stuff these days?

    I was using FORTRAN 77 as I was a student. Now, I am retired : in my professional life, I have used, the version 90, 95, and 2003. And the
    list is not complete.
    The rigidity of version 77 is forgotten now.

    bruno M.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From FortranFan@21:1/5 to Liam Proven on Tue Apr 5 08:54:52 2022
    On Tuesday, April 5, 2022 at 10:51:33 AM UTC-4, Liam Proven wrote:

    I am delighted to discover what seems to be a relatively lively newsgroup! ..

    @Liam Proven,

    Welcome! Please also try Fortran Discourse where you might value in engagement with other readers using Fortran syntax-highlighted posting and reading for code snippets, file attachments, URL links that highlight headlines (and summary), etc.
    https://fortran-lang.discourse.group/

    And at Fortran Discourse, you will find regular visitors who are now starting to working on Fortran "standard' libraries:
    https://github.com/fortran-lang/stdlib

    and those developing Fortran course material like a 25 year-old scientist: https://fortran-lang.discourse.group/t/literature-for-modern-fortran-lectures/3084/38

    And so forth.

    As to whether "modern Fortran so very different from F77 that it would be akin to learning a new language," the answer will really depend on what you are trying to! If the sequential procedural approach suits well for the applications you have in mind,
    you will mind modern Fortran is FORTRAN 77 but without the limitations i.e., modern Fortran supports free-form source, you can have longer variable names and lines, and so forth. But you should explore for yourself and post your discoveries online!

    Cheers,

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Beliavsky@21:1/5 to Liam Proven on Tue Apr 5 09:45:31 2022
    On Tuesday, April 5, 2022 at 10:51:33 AM UTC-4, Liam Proven wrote:
    I am delighted to discover what seems to be a relatively lively newsgroup!

    I used to program Fortran at Uni in the late 1980s. F77 on VAX/VMS,
    mainly. I was fairly _au fait_ with it.

    I haven't really coded in decades and I keep pondering trying to get
    back into it.

    I have looked at various modern languages but find all the OOPS and so
    on confusing and unnecessary for small, hobbyist stuff.

    For a non-professional, is modern Fortran so very different from F77
    that it would be akin to learning a new language, or do folks think it
    might be relatively easy to update my knowledge and pick it up again?

    Is there much in the way of supporting libraries, or is Fortran only
    used for numerical stuff these days?

    --
    Liam P. ~ Prague, Czechia ~ liamproven on yahoo UK and AOL

    I second the advice of FortranFan. At the Fortran Wiki https://fortranwiki.org/fortran/show/Tutorials
    you can search "77" to find several tutorials on Fortran 90 or 95 aimed at Fortran 77 programmers.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Koenig@21:1/5 to Liam Proven on Wed Apr 6 10:44:18 2022
    Liam Proven <lproven+un@hotmail.com> schrieb:
    I am delighted to discover what seems to be a relatively lively newsgroup!

    I used to program Fortran at Uni in the late 1980s. F77 on VAX/VMS,
    mainly. I was fairly _au fait_ with it.

    I haven't really coded in decades and I keep pondering trying to get
    back into it.

    I have looked at various modern languages but find all the OOPS and so
    on confusing and unnecessary for small, hobbyist stuff.

    I agree :-)


    For a non-professional, is modern Fortran so very different from F77
    that it would be akin to learning a new language, or do folks think it
    might be relatively easy to update my knowledge and pick it up again?

    A nice thing is that old F77 codes still work, so you do not
    really have to change anything. However, you would miss out on
    some really conventient features: Interface checking via modules,
    array bounds that are passed with the arguments, array expressions,
    dynamic memory via arrays that are deallocated when they go out
    of scope, and array expressions. Plus, if your code uses global
    variables, you can put them type-safely into modules instead of
    COMMON blocks.

    https://en.wikipedia.org/wiki/Fortran_95_language_features has a
    very nice feature list of Fortran 95 written by Michael Metcalf.
    The only thing it misses of the list above are allocatable arrays,
    which came later than Fortran 95.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Beliavsky@21:1/5 to Thomas Koenig on Wed Apr 6 06:11:58 2022
    On Wednesday, April 6, 2022 at 6:44:21 AM UTC-4, Thomas Koenig wrote:
    https://en.wikipedia.org/wiki/Fortran_95_language_features has a
    very nice feature list of Fortran 95 written by Michael Metcalf.
    The only thing it misses of the list above are allocatable arrays,
    which came later than Fortran 95.

    Fortran 90 and 95 had allocatable arrays, but in Fortran 2003 it became possible
    to use them in more contexts, such as function and subroutine arguments, function results, and components of derived types.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Van Buskirk@21:1/5 to Liam Proven on Wed Apr 6 08:55:40 2022
    "Liam Proven" wrote in message news:t2hl1h$e7g$1@dont-email.me...

    I am delighted to discover what seems to be a relatively lively newsgroup!

    I used to program Fortran at Uni in the late 1980s. F77 on VAX/VMS,
    mainly. I was fairly _au fait_ with it.

    I haven't really coded in decades and I keep pondering trying to get back into it.

    I have looked at various modern languages but find all the OOPS and so on confusing and unnecessary for small, hobbyist stuff.

    For a non-professional, is modern Fortran so very different from F77 that
    it would be akin to learning a new language, or do folks think it might be relatively easy to update my knowledge and pick it up again?

    Is there much in the way of supporting libraries, or is Fortran only used
    for numerical stuff these days?

    Standard F77 should pretty much work in F2003 and even more recent.
    One big attraction to modern Fortran as I see it is that it provides
    standard solutions to some of the big problems that F77 programs
    would have to jump through major hoops to work around, like
    dynamic memory and interfacing with other languages or even
    other Fortran compilers.

    Fortran 2003 more or less stole support from many libraries when
    it provided the capability to write out an interface for a C function
    in Fortran. Lacks some interoperability features such as varargs
    (MAC OS) or unions (Windows) but a lot of stuff is there.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Shepard@21:1/5 to Beliavsky on Wed Apr 6 10:18:44 2022
    On 4/6/22 8:11 AM, Beliavsky wrote:
    On Wednesday, April 6, 2022 at 6:44:21 AM UTC-4, Thomas Koenig wrote:
    https://en.wikipedia.org/wiki/Fortran_95_language_features has a
    very nice feature list of Fortran 95 written by Michael Metcalf.
    The only thing it misses of the list above are allocatable arrays,
    which came later than Fortran 95.

    Fortran 90 and 95 had allocatable arrays, but in Fortran 2003 it became possible
    to use them in more contexts, such as function and subroutine arguments, function results, and components of derived types.

    The timing of those features was unfortunate. The Allocatable Technical
    Report that defined them was published at the same time that f95 was
    released (about 1998). But because those features were not in the ISO
    language, they were not included in several of the popular f95 compilers
    for several years. Finally in f2003 they were all incorporated into the standard. So for those of us who were attempting to write portable code,
    we could not use those features during that approximately eight year
    period. It was frustrating because they are some very nice features to
    have available.

    $.02 -Ron Shepard

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gah4@21:1/5 to Liam Proven on Wed Apr 6 17:14:16 2022
    On Tuesday, April 5, 2022 at 7:51:33 AM UTC-7, Liam Proven wrote:
    I am delighted to discover what seems to be a relatively lively newsgroup!

    I used to program Fortran at Uni in the late 1980s. F77 on VAX/VMS,
    mainly. I was fairly _au fait_ with it.

    I haven't really coded in decades and I keep pondering trying to get
    back into it.

    I have looked at various modern languages but find all the OOPS and so
    on confusing and unnecessary for small, hobbyist stuff.

    For a non-professional, is modern Fortran so very different from F77
    that it would be akin to learning a new language, or do folks think it
    might be relatively easy to update my knowledge and pick it up again?

    Modern Fortran is pretty different, but just about all the features
    in Fortran 77 are still there. So, you can start with what you knew
    before, and slowly learn and add newer features to your programs.

    One of the new features is free-form, which removes the need to
    start in column 7 (or more), and also changes the way continuation
    lines work. Maybe surprising to some, all the new features work
    in the old fixed-form.

    A year or so ago, I had running both IBM's ECAP, from the
    early to mid 1960's, and SPICE 2g6 from about 1983.

    Both took a little work to get running, where they use non-standard
    features, or otherwise need fixing.

    You can learn about new features as slow or fast as you like.

    And with free compilers easily available, it is a nice time to learn!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Liam Proven@21:1/5 to FortranFan on Fri Apr 29 15:39:55 2022
    On 05/04/2022 17:54, FortranFan wrote:

    Welcome!

    :-)

    Please also try Fortran Discourse where you might value in engagement
    with other readers using Fortran syntax-highlighted posting and reading
    for code snippets, file attachments, URL links that highlight headlines
    (and summary), etc.
    https://fortran-lang.discourse.group/

    I have a Discourse account, but to be honest, I do not like web fora
    much. That's why I have returned to Usenet again. It and mailing lists
    are comfortable like an old slipper.


    As to whether "modern Fortran so very different from F77 that it would be akin to learning a new language," the answer will really depend on what you are trying to! If the sequential procedural approach suits well for the applications you have in mind,
    you will mind modern Fortran is FORTRAN 77 but without the limitations i.e., modern Fortran supports free-form source, you can have longer variable names and lines, and so forth. But you should explore for yourself and post your discoveries online!

    Interesting... fair enough...


    --
    Liam Proven ~ Prague, Czechia
    lproven+es@hotmail.com
    (or liamproven on either AOL or Yahoo UK)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Liam Proven@21:1/5 to Thomas Koenig on Fri Apr 29 15:40:37 2022
    On 06/04/2022 12:44, Thomas Koenig wrote:

    I have looked at various modern languages but find all the OOPS and so
    on confusing and unnecessary for small, hobbyist stuff.

    I agree :-)

    Oh good. Glad to hear it's not just me.

    A nice thing is that old F77 codes still work, so you do not
    really have to change anything. However, you would miss out on
    some really conventient features: Interface checking via modules,
    array bounds that are passed with the arguments, array expressions,
    dynamic memory via arrays that are deallocated when they go out
    of scope, and array expressions. Plus, if your code uses global
    variables, you can put them type-safely into modules instead of
    COMMON blocks.

    https://en.wikipedia.org/wiki/Fortran_95_language_features has a
    very nice feature list of Fortran 95 written by Michael Metcalf.
    The only thing it misses of the list above are allocatable arrays,
    which came later than Fortran 95.

    Interesting info... thank you.

    --
    Liam Proven ~ Prague, Czechia
    lproven+es@hotmail.com
    (or liamproven on either AOL or Yahoo UK)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John McCue@21:1/5 to Liam Proven on Tue May 3 20:59:03 2022
    Liam Proven <lproven+un@hotmail.com> wrote:
    I am delighted to discover what seems to be a relatively
    lively newsgroup!

    Same here

    <snip>

    I have looked at various modern languages but find all the OOPS and
    so on confusing and unnecessary for small, hobbyist stuff.

    Same here, very confusing and in fact I do not see the point
    of OO. Luckily I never had to deal with it professionally.

    For a non-professional, is modern Fortran so very different from F77
    that it would be akin to learning a new language, or do folks think it
    might be relatively easy to update my knowledge and pick it up again?

    I also have been playing around with Fortran (gfortran) with
    an eye to relearn it, hope to be retiring soon and this is
    one thing that will keep me occupied. Like you, I last used
    F77 and ended up moving on to other languages in the 80s.

    <snip>

    John

    --
    [t]csh(1) - "An elegant shell, for a more... civilized age."
    - Paraphrasing Star Wars

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bruno@21:1/5 to All on Wed May 4 15:24:43 2022
    Le 03/05/2022 à 22:59, John McCue a écrit :
    Liam Proven <lproven+un@hotmail.com> wrote:
    I am delighted to discover what seems to be a relatively
    lively newsgroup!

    Same here

    <snip>

    I have looked at various modern languages but find all the OOPS and
    so on confusing and unnecessary for small, hobbyist stuff.

    Same here, very confusing and in fact I do not see the point
    of OO. Luckily I never had to deal with it professionally.

    For a non-professional, is modern Fortran so very different from F77
    that it would be akin to learning a new language, or do folks think it
    might be relatively easy to update my knowledge and pick it up again?

    I also have been playing around with Fortran (gfortran) with
    an eye to relearn it, hope to be retiring soon and this is
    one thing that will keep me occupied. Like you, I last used
    F77 and ended up moving on to other languages in the 80s.

    <snip>

    John

    No more need to use gfortran, the onePAI of Intel works on all platforms
    ( compilers and many tools are free to use)


    My lenovo T430 with Linux works fine

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Shepard@21:1/5 to bruno on Wed May 4 10:33:07 2022
    On 5/4/22 8:24 AM, bruno wrote:
    [...]
    No more need to use gfortran, the onePAI of Intel works on all platforms
    ( compilers and many tools are free to use)

    I think it only works on intel and AMD hardware and on linux and windows software. Their classic compiler works also on intel+MacOS. At least the
    last I checked, it did not work on IBM PowerPC hardware or on Apple ARM hardware, and of course there is a lot of legacy hardware and software
    where it does not run. Gfortran does work on many of these other
    combinations of hardware and software.

    $.02 -Ron Shepard

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to John McCue on Wed May 4 16:34:06 2022
    John McCue <jmccue@magnetar.hsd1.ma.comcast.net> writes:
    Same here, very confusing and in fact I do not see the point
    of OO.

    The point of OOP is to be able to easily add new data types
    without having to modify existing code.

    For example, in Python, there is a "print" procedure that
    can print objects of many built-in data types like "string"
    and "int".

    OOP allows one to add a new data type, for example, "matrix",
    and then "print" will be able to print matrices after only
    code for "matrix" was written (added) - /without/ a need to
    actually modify "print".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gary Scott@21:1/5 to Stefan Ram on Wed May 4 17:29:17 2022
    On 5/4/2022 11:34 AM, Stefan Ram wrote:
    John McCue <jmccue@magnetar.hsd1.ma.comcast.net> writes:
    Same here, very confusing and in fact I do not see the point
    of OO.

    The point of OOP is to be able to easily add new data types
    without having to modify existing code.

    For example, in Python, there is a "print" procedure that
    can print objects of many built-in data types like "string"
    and "int".

    OOP allows one to add a new data type, for example, "matrix",
    and then "print" will be able to print matrices after only
    code for "matrix" was written (added) - /without/ a need to
    actually modify "print".


    Ah, terminology. To me a "type" is an intrinsic thing. When you define
    a "derived type", you're creating a "container" (structure) of intrinsic
    types. Is that "container" then a type? To me, no, it's a container,
    for convenience. (so I would not have used the terminology derived
    type, but "structure" or "container" or ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Liam Proven@21:1/5 to Stefan Ram on Thu May 5 11:28:53 2022
    On 04/05/2022 18:34, Stefan Ram wrote:

    The point of OOP is to be able to easily add new data types
    without having to modify existing code.

    That seems a little sweeping.

    It seems to me that OOP has nearly as many different purposes as there
    are people using it.

    My cynical suspicion is that Rob Pike (of Plan 9 and Go fame) nailed it
    with his line:

    "Object-oriented design is the Roman numerals of computing."

    I suspect (but do not know, and cannot prove) that it is immensely
    powerful in languages originally built around it, such as Smalltalk and
    Self.

    When it was subsequently bolted on to pre-existing languages, from BASIC
    to Fortran to Pascal, it is rather less so.

    --
    Liam Proven ~ Prague, Czechia
    lproven+es@hotmail.com
    (or liamproven on either AOL or Yahoo UK)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Jones@21:1/5 to Liam Proven on Thu May 5 11:25:19 2022
    Liam Proven wrote:

    On 04/05/2022 18:34, Stefan Ram wrote:

    The point of OOP is to be able to easily add new data types
    without having to modify existing code.

    That seems a little sweeping.

    It seems to me that OOP has nearly as many different purposes as
    there are people using it.

    My cynical suspicion is that Rob Pike (of Plan 9 and Go fame) nailed
    it with his line:

    "Object-oriented design is the Roman numerals of computing."

    I suspect (but do not know, and cannot prove) that it is immensely
    powerful in languages originally built around it, such as Smalltalk
    and Self.

    When it was subsequently bolted on to pre-existing languages, from
    BASIC to Fortran to Pascal, it is rather less so.

    I partly agree with this, except that to me OOP has little to do with
    the programming language being used but is rather abut doing
    pre-programming thinking ... thinking about what parts of a system of sub-programs will need access to what subsets of information. When
    employed, I once used OOP principles as a pre+cursor to developing a complicated program written in Fortran 77.

    Basically, OOP provides help with the initial step when faced with a
    new task of: "where do I begin?"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Beliavsky@21:1/5 to Liam Proven on Thu May 5 05:49:36 2022
    On Thursday, May 5, 2022 at 5:28:58 AM UTC-4, Liam Proven wrote:
    On 04/05/2022 18:34, Stefan Ram wrote:

    The point of OOP is to be able to easily add new data types
    without having to modify existing code.
    That seems a little sweeping.

    It seems to me that OOP has nearly as many different purposes as there
    are people using it.

    My cynical suspicion is that Rob Pike (of Plan 9 and Go fame) nailed it
    with his line:

    "Object-oriented design is the Roman numerals of computing."

    I suspect (but do not know, and cannot prove) that it is immensely
    powerful in languages originally built around it, such as Smalltalk and
    Self.

    When it was subsequently bolted on to pre-existing languages, from BASIC
    to Fortran to Pascal, it is rather less so.
    --
    Liam Proven ~ Prague, Czechia
    lprov...@hotmail.com
    (or liamproven on either AOL or Yahoo UK)

    Not every Fortran program needs to use inheritance, and it's not clear to me that
    type-bound procedures have a better syntax than procedures with derived type arguments.
    But I think OOP can reduce duplication when the same procedures are applicable to
    multiple related derived types, having created such duplicates when sticking to Fortran 95
    derived types.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From FortranFan@21:1/5 to Liam Proven on Thu May 5 06:47:22 2022
    On Thursday, May 5, 2022 at 5:28:58 AM UTC-4, Liam Proven wrote:

    On 04/05/2022 18:34, Stefan Ram wrote:

    The point of OOP is to be able to easily add new data types
    without having to modify existing code.
    That seems a little sweeping.

    It seems to me that OOP has nearly as many different purposes as there
    are people using it.

    My cynical suspicion is that Rob Pike (of Plan 9 and Go fame) nailed it
    with his line:

    "Object-oriented design is the Roman numerals of computing."

    I suspect (but do not know, and cannot prove) that it is immensely
    powerful in languages originally built around it, such as Smalltalk and
    Self.

    When it was subsequently bolted on to pre-existing languages, from BASIC
    to Fortran to Pascal, it is rather less so.
    --
    Liam Proven ~ Prague, Czechia
    lprov...@hotmail.com
    (or liamproven on either AOL or Yahoo UK)

    @Liam Proven,

    Please - if you are coming to Fortran from the days of FORTRAN 77 and related earlier dialects - there is no need to get hung up on OOP.

    There is a lot in the current standard other than OOP to work with if you so choose, or you can even stick to your FORTRAN style of coding if you so wish.

    Move on, and please just know most of what you suspect about OOP is WRONG.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to FortranFan on Thu May 5 15:22:54 2022
    FortranFan <parekhvs@gmail.com> writes:
    On Thursday, May 5, 2022 at 5:28:58 AM UTC-4, Liam Proven wrote:
    ...
    I suspect (but do not know, and cannot prove) that it is immensely
    powerful in languages originally built around it, such as Smalltalk and >>Self.
    ...
    Move on, and please just know most of what you suspect about OOP is WRONG.

    There might be some truth in at least one thing Liam wrote!

    In 2003, I became aware of the fact that Alan Kay, the man
    who coined the term "object-oriented programming" in 1967
    (or in the temporal proximity of this year), never has given
    a definition for it. I asked him via e-mail, and he kindly
    responded. In that e-mail he also wrote something to the effect
    that for him only Smalltalk allows object-oriented programming.
    (On another occasion, he also said, "I invented the term Object-
    Oriented and I can tell you I did not have C++ in mind.".) So,
    I think that this point of view by Alan Kay is similar to what
    Liam wrote about Smalltalk!

    So, what did Alan Kay write to me in 2003? Here's the crucial excerpt:

    |OOP to me means only messaging, local retention and protection and
    |hiding of state-process, and extreme late-binding of all things. It
    |can be done in Smalltalk and in LISP. There are possibly other
    |systems in which this is possible, but I'm not aware of them.
    Alan Kay, 2003

    . I should add that the deepest insight I gained into what is the
    actual point of OOP (as I wrote in my previous post in this thread)
    I got from the writings of Robert C. Martin who clarified that
    OOP makes it easy to add new types but hard to add new operations,
    while procedural programming makes it easy to add new operations,
    but hard to add new types.

    |Procedural code (code using data structures) makes it easy to
    |add new functions without changing the existing data
    |structures. OO code, on the other hand, makes it easy to add
    |new classes without changing existing functions.
    Robert Cecil Martin

    |Procedural code makes it hard to add new data structures
    |because all the functions must change. OO code makes it hard
    |to add new functions because all the classes must change.
    Robert Cecil Martin

    When one first reads this, it might not be obvious why this
    is so spot on, but one can find this quotation in the book
    "Clean Code" by Robert C. Martin and read more explanations
    about it there.

    Objects with data abstraction can already be found in CLU by
    Barbara Liskov. But this is not yet OOP. The crucial feature
    OOP adds to this is polymorphism ("late binding").

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Liam Proven@21:1/5 to Stefan Ram on Fri May 6 17:58:52 2022
    On 05/05/2022 17:22, Stefan Ram wrote:

    There might be some truth in at least one thing Liam wrote!

    I do try. :-D

    So, what did Alan Kay write to me in 2003? Here's the crucial excerpt:

    |OOP to me means only messaging, local retention and protection and
    |hiding of state-process, and extreme late-binding of all things. It
    |can be done in Smalltalk and in LISP. There are possibly other
    |systems in which this is possible, but I'm not aware of them.
    Alan Kay, 2003

    Aha! So your email is the origin of this Quora thread?

    https://www.quora.com/What-does-Alan-Kay-mean-when-he-said-OOP-to-me-means-only-messaging-local-retention-and-protection-and-hiding-of-state-process-and-extreme-late-binding-of-all-things-It-can-be-done-in-Smalltalk-and-in-LISP

    How wonderful. Small world. Thank you for that!


    --
    Liam Proven ~ Prague, Czechia
    lproven+es@hotmail.com
    (or liamproven on either AOL or Yahoo UK)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Liam Proven@21:1/5 to FortranFan on Fri May 6 18:00:43 2022
    On 05/05/2022 15:47, FortranFan wrote:

    Please - if you are coming to Fortran from the days of FORTRAN 77 and related earlier dialects - there is no need to get hung up on OOP.

    There is a lot in the current standard other than OOP to work with if you so choose, or you can even stick to your FORTRAN style of coding if you so wish.

    Move on, and please just know most of what you suspect about OOP is WRONG.

    That is good to hear. Thanks for the reassurance.


    --
    Liam Proven ~ Prague, Czechia
    lproven+es@hotmail.com
    (or liamproven on either AOL or Yahoo UK)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lynn McGuire@21:1/5 to Stefan Ram on Fri May 6 21:04:58 2022
    On 5/5/2022 10:22 AM, Stefan Ram wrote:
    FortranFan <parekhvs@gmail.com> writes:
    On Thursday, May 5, 2022 at 5:28:58 AM UTC-4, Liam Proven wrote:
    ...
    I suspect (but do not know, and cannot prove) that it is immensely
    powerful in languages originally built around it, such as Smalltalk and
    Self.
    ...
    Move on, and please just know most of what you suspect about OOP is WRONG.

    There might be some truth in at least one thing Liam wrote!

    In 2003, I became aware of the fact that Alan Kay, the man
    who coined the term "object-oriented programming" in 1967
    (or in the temporal proximity of this year), never has given
    a definition for it. I asked him via e-mail, and he kindly
    responded. In that e-mail he also wrote something to the effect
    that for him only Smalltalk allows object-oriented programming.
    (On another occasion, he also said, "I invented the term Object-
    Oriented and I can tell you I did not have C++ in mind.".) So,
    I think that this point of view by Alan Kay is similar to what
    Liam wrote about Smalltalk!

    So, what did Alan Kay write to me in 2003? Here's the crucial excerpt:

    |OOP to me means only messaging, local retention and protection and
    |hiding of state-process, and extreme late-binding of all things. It
    |can be done in Smalltalk and in LISP. There are possibly other
    |systems in which this is possible, but I'm not aware of them.
    Alan Kay, 2003

    . I should add that the deepest insight I gained into what is the
    actual point of OOP (as I wrote in my previous post in this thread)
    I got from the writings of Robert C. Martin who clarified that
    OOP makes it easy to add new types but hard to add new operations,
    while procedural programming makes it easy to add new operations,
    but hard to add new types.

    |Procedural code (code using data structures) makes it easy to
    |add new functions without changing the existing data
    |structures. OO code, on the other hand, makes it easy to add
    |new classes without changing existing functions.
    Robert Cecil Martin

    |Procedural code makes it hard to add new data structures
    |because all the functions must change. OO code makes it hard
    |to add new functions because all the classes must change.
    Robert Cecil Martin

    When one first reads this, it might not be obvious why this
    is so spot on, but one can find this quotation in the book
    "Clean Code" by Robert C. Martin and read more explanations
    about it there.

    Objects with data abstraction can already be found in CLU by
    Barbara Liskov. But this is not yet OOP. The crucial feature
    OOP adds to this is polymorphism ("late binding").

    I converted my 240,000 line Win16 Smalltalk app to a 350,000 line Win32
    C++ app in 2002. The problem with Smalltalk is that it is 100X slower
    than C++ (I timed it !) and the late binding. Plus my Smalltalk
    compiler and linker did not make the transition from Win16 to Win32.
    The author gave me the Smalltalk compiler and runtime assembly language
    but I could not port it to Win32 in a reasonable amount of time so I
    ported my app.

    If you passed an object to a method and that object did not have a
    method for inverting it (or something like that) that was called in the
    method, the app crashed. You had to make sure that every object
    potentially being used in a method had every method that was called in
    the method. Very painful in the long run. C++ ensures that late bound
    method calls in a method always have a corresponding method in their
    object inheritance, very nice. I use late binding all over my C++ code,
    works well.

    I do miss the heterogeneous collections in Smalltalk. That was an
    incredibly cool feature. That was the hardest part of the conversion to
    C++ as we converted all those to homogeneous collections so we had to
    rework some of the object classes.

    Lynn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)