News for hackers. Stuff that matters.
Re:The Programming Language B (1973) by yiyus on Monday August 09, 2021 @07:38AM (#28115446)
I like how constrained the language was:

> All arithmetic in B is integer, unless special functions are written. There is no equivalent of the Fortran IJKLMN convention, no floating point, no data types, no type conversions, and no type checking. Users of double-precision complex will have to fend for themselves. (But see ->32 for how to call Fortran subroutines.)

I wonder if it would have been beneficial to continue with this separation. Fortran and C started trying to do everything and they failed. Fortran was never a contender for C for systems programming, and C has not moved in the right direction to be better than Fortran for numerical computing.

Re:The Programming Language B (1973) by agent327 on Monday August 09, 2021 @08:53AM (#28116107)
>Fortran and C started trying to do everything and they failed

You have an interesting definition of failure.

Re:The Programming Language B (1973) by yiyus on Monday August 09, 2021 @11:16AM (#28117977)
Fortran has never been used seriously for systems programming. It got text processing capabilities and a ton of other stuff, but we do not see operating systems or web servers written in Fortran.

And C got the floating point operations B did not have, and was actually used for lots of numerical work for a while (and it still is, up to some point), but nobody was totally happy with it so we got C++, new Fortran versions, Python, now Julia... Although it always is an option due to the availability and quality of C compilers, I would not say that C succeeded in becoming the language of choice for scientific computing.

Of course, this does not mean that C or Fortran are failures.

Re:The Programming Language B (1973) by jecel on Monday August 09, 2021 @02:41PM (#28120590)
There was at least one operating system programmed in Fortran:

https://en.wikipedia.org/wiki/PRIMOS

Re:The Programming Language B (1973) by coldtea on Monday August 09, 2021 @09:15PM (#28124232)
There's probably one written in Brainfuck too, doesn't mean it matters in the grand scheme of things though.

So, "at least one operating system programmed in Fortran" doesn't counter "Fortran hasn't been really used for systems programming", if that operating system is some irrelevant research project, or (as in here) a commercial niche system, that maybe ever reached 0.00001% of the OS users space.

Re:The Programming Language B (1973) by yiyus on Monday August 09, 2021 @04:39PM (#28122067)
Thanks for the info. I did not know this, but it does not surprise me. I am sure there are similar examples.

The first section of the linked article says that Fortran "was an odd choice from a pure computer science standpoint", that they "developed hardware optimized to run FORTRAN", and that large parts of the OS (in particular, the kernel) were eventually rewritten in other languages.

This is, in my opinion, a great example of how Fortran could not compete with C as a systems programming language.

Re:The Programming Language B (1973) by theodorethomas on Monday August 09, 2021 @06:26PM (#28123084)
Fortran is not designed to be a systems programming language and you can tell because it lacks the concept of memory address (hardware has been designed to operate by flipping bits at memory addresses for longer than I can remember). Fortran is a higher level language for describing computations on data.
Re:The Programming Language B (1973) by TheRealKing on Tuesday August 10, 2021 @04:38PM (#28134132)
Fortran is NOT a systems programming language. It is a niche language for scientific computing and why it is called (mathematical) Formula Translator (a.k.a Fortran).
Re:The Programming Language B (1973) by projektfu on Monday August 09, 2021 @07:57AM (#28115635)
Fortran-90 is well constrained for numerical programming and has so much inertia in the scientific community, it’s probably not going away. But C and its derivatives are good enough at numeric work for most users outside of science. Many have tried to dislodge both C and Fortran from their positions, with varying levels of success. Maybe we’ll see it in the next decade as scientists who knew how to code before university dominate and no longer want to use Fortran.
Re:The Programming Language B (1973) by blacktriangle on Monday August 09, 2021 @09:04AM (#28116243)
Having learned to code and getting a degree before going to get a job at a shop that had a ton of Fortran floating around, I'd say I grew to appreciate how direct it was for just doing math. And after working at later jobs where the scientists were allowed to write code in more expansive expressive languages than just Fortran, I really came to appreciate how Fortran enabled scientists to do science in such a way that they did not write unholy abominations of python code.
Re:The Programming Language B (1973) by yiyus on Monday August 09, 2021 @11:08AM (#28117878)
You are absolutely right. To be honest, the current situation is not too different from this hypothetical case. Fortran is used mostly to write numeric routines and then we call them from a Python script, instead of writing text and arguments processing (for example) directly from Fortran. But I still find interesting thinking about where these languages would be if these limits had been consistently respected.
Re:The Programming Language B (1973) by pjmlp on Monday August 09, 2021 @08:23AM (#28115867)
The language it was based on (BCPL), was originally designed to Bootstrap CPL and that was it, it is an historical accident that it got other purposes.