5 ms·
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 c
by yiyus 5y ago
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.
- projektfu 5y agoFortran-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.
- blacktriangle 5y agoHaving 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.
- yiyus 5y agoYou 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.
- pjmlp 5y agoThe 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.
- agent327 5y ago>Fortran and C started trying to do everything and they failed You have an interesting definition of failure.
- yiyus 5y agoFortran 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.
- jecel 5y agoThere was at least one operating system programmed in Fortran: https://en.wikipedia.org/wiki/PRIMOS https://en.wikipedia.org/wiki/PRIMOS
- yiyus 5y agoThanks 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.
- theodorethomas 5y agoFortran 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.