4 ms·
F’23 doesn’t have much in it that’s new over F’18, which itself was also a pretty minor update to F’08. One thing to watch out for: in a departure from former
by pklausler 3y ago
F’23 doesn’t have much in it that’s new over F’18, which itself was also a pretty minor update to F’08.
One thing to watch out for: in a departure from former commitments to compatibility, F’23 changes some semantics of working conforming code, specifically allocatable characters being used for internal writes, iomsg=, &c.
- imachine1980_ 3y ago> allocatable characters being used for internal writes can you explain this ?
- pklausler 3y agoIf you allocate a character object, then write to it with an internal write statement, F’23 now requires that the variable be reallocated to the actual length of the formatted record, instead of retaining its former length and being padded out with blanks (or truncated). The LLVM Fortran compiler (Flang) has warnings for various usages whose semantics would change if F'23 semantics were adopted by default, which I'm not sure I want to do.
- EE84M3i 3y agoI've never used fortran so I'm not sure what a character object or an internal write is, but in C would this be something like allocating a character array and sprintf-ing to it?
- pklausler 3y agoThat's a good analogy, with the change being that sprintf is now somehow required to reallocate your buffer on every call if the length ever changes.
- bee_rider 3y agoIt must be hard to update a language that was already perfect in 1990.
- nolist_policy 3y agoFortran first appeared in 1957... It's probably older than most people here on HN.
- fuzztester 3y ago"The first significantly widespread high-level language was Fortran." https://en.m.wikipedia.org/wiki/High-level_programming_language https://en.m.wikipedia.org/wiki/High-level_programming_langu...
- bee_rider 3y agoAs the other comment pointed out, F90 is surprisingly good considering it is also probably older than most people on this site, haha.
- EVa5I7bHFq9mnYK 3y agoIt's just 34 more yeats until F'57 becomes ambigous ..
- bee_rider 3y agoI think you’ve made a typo, > yeats It is yeets, two e’s no a.
- pmcjones 3y agoLots of information here: https://www.softwarepreservation.org/projects/FORTRAN/ https://www.softwarepreservation.org/projects/FORTRAN/
- pklausler 3y agoF'90 lacked allocatable derived type components, but was otherwise very well thought out, and its major contributions (modules, free form, internal procedures, generic interfaces, ELEMENTAL, array syntax, POINTER/TARGET...) have held up well. Kind of a mixed bag since then, frankly (FORALL, LEN type parameters, FINAL, ENUM, DO CONCURRENT...)
- 3y ago