Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

20% Positive

Analyzed from 730 words in the discussion.

Trending Topics

#fortran#python#languages#bit#language#scientific#performance#used#programming#twiddling

Discussion (8 Comments)Read Original on HackerNews

Jtsummers•30 minutes ago
I feel like the author is just wasting the reader's time. This thing is 88 printed pages (probably 50 if he had used a reasonable font size) of somewhat dubious history of programming languages, a section of options, and then a long section on his fantasy ideal language to replace Fortran. Finally, in the conclusion, he does a rug pull. The conclusion is that he wants is something like this:

https://martinfowler.com/bliki/IntentionalSoftware.html

Quoting the overlong piece:

> subversion and sedition—Right so, I now divulge my most subversive idea regarding programming language syntax: every programmer on every project ought to be free to choose the syntax he favours. [emphasis in original]

Only he doesn't mention the prior art at all, I'm not sure if he's even aware of it.

minetest2048•about 1 hour ago
> remove bit twiddling — System programming languages like C, C++, Odin, and Zig need to manipulate bits, but a scientific DSL like Fortran does not need bit twiddling operators like &, |, ~, and so on. Bits are, after all, hardware-level concepts.

Yeah no, your language will be DOA if you don't have bit twiddling, because you can't write arbitrary binary file parser / writer without some sort of bit manipulation.

Even matlab have bit twiddling function

bombcar•43 minutes ago
Those who don't have bit twiddling instructions are doomed to rebuild them badly via heavier actions and compiler optimizations.
antonvs•about 1 hour ago
> FORTRAN stands for “formula translator”, which hints at its mathematical lineage.

A choice of name doesn’t provide a “mathematical lineage”, and there’s no sense in which Fortran is any more “mathematical” than other programming languages - if anything, it’s less mathematical than the functional languages.

Articles like this are written by the kind of people Max Planck referred to. Like the physical sciences, computer science advances one funeral at a time.

jleyank•4 days ago
Ctran and Fortran look similar if you ignore much of the flexibility of C and help the optimizer out re memory overlap. Wave the checkbook and you’ll have programmers. Way easier than COBOL.
sfpotter•about 2 hours ago
"At present, no language can rival, let alone surpass, Fortran when it comes to implementing long-lived, large-scale, massively-parallel scientific and engineering applications; not even C and C++."

Huh??? A tremendous amount of scientific computing happens in C, C++, and many other languages. I have worked with Fortran, worked with Fortran-heavy labs in academia, and this is just a nonsensical thing to say.

leephillips•about 2 hours ago
But he didn’t say “scientific computing”. There are not “many other languages” that are used for the stuff that he did describe. Nevertheless, his claim is incorrect. C, C++, Julia, and Fortran are all routinely used for these purposes, sometimes with parts written in assembly. Nothing else, really. The “scientific computing” that people do with Python, Matlab, etc. is not this.

And of these four languages that are successful in this arena, only Fortran and Julia are enjoyable to program in. Between those two, Julia is far more fun and flexible (but brings other drawbacks, of course).

jdw64•about 2 hours ago
I think the OP's thoughts are really deep, but I disagree on some points.Personally, I think the suggestion in the OP about switching Fortran to row-major is a separate issue. I have doubts about whether scientific languages should make such a switch. Rather, I consider it Fortran's competitive advantage. You can directly bring mathematical thinking into it. There are also cache related concerns.

Because it's an array oriented language, I think the need for a tracing GC is relatively low. The advantage of GC comes into play when object graphs are complex, but looking at old Fortran code, arrays mostly operate outside that domain.

In reality, the biggest problem is that Python has become too mainstream, and hardware performance has improved too much. Old numerical computation books were mostly in Fortran, but now they're in Python. The reason is simpler than you might think. Python has a strong ecosystem for visualization packages. Beyond just interfacing with Fortran, Python is more powerful as a working environment. And most scientists, who prioritize building their careers around papers with smaller scale computations rather than large scale Fortran dominated calculations requiring massive equipment, have gravitated toward Python, which lets them quickly sketch ideas.

And realistically, Python's greatest strength is that while it's inadequate in almost every area, it can do almost everything. I think that's the most important factor in language choice. Once you learn Python, you can do EDA, ETL, numerical computation, build websites, create apps with Qt, and much more. There are performance bottlenecks due to the GIL, but most tasks don't actually require that level of performance.

Fortran can push hardware to its limits when used well, but as such hardware intensive tasks increasingly shift toward large scale collaborative work, I think it's been losing its competitive edge.

It's not that Fortran is bad, but realistically, being able to do many things matters more. Before Python became widely used, programming books had too many languages for each domain. Math had Maple, and so on. But Python, honestly, just works because you can do a lot with it if you're willing to sacrifice a bit of performance. Many people say 'performance is important,' but I question whether there are really that many tasks where performance matters that much

p.s This is my post about the difference between row-major and column-major order.(https://www.makonea.com/en-US/blog/why-c-family-nested-for-l...)