4 ms·
The post dismisses Julia quite quickly, especially since it is a language essentially purpose built to teach numerical linear algebra. Numerical methods is taug
by patagurbon 1y ago
The post dismisses Julia quite quickly, especially since it is a language essentially purpose built to teach numerical linear algebra. Numerical methods is taught in Julia in at least a dozen universities I'm aware of, including MIT.
Unicode support and a few other syntax niceties make translation from the blackboard to the editor nice and clean. Fortran is great but legibility and easy tooling like (reproducible) package managers are paramount in teaching
- noobermin 1y agoSaying fortran is not legible is not an argument that holds water against fortran 90. I don't want to be uncharitable but I don't know how anyone can have this opinion unless they just don't have much familiarity with it.
- jcranmer 1y agoA large share of the illegibility of Fortran code is actually just the aversion of numerics code to having meaningful variable names.
- atrettel 1y agoI second this. When I worked on some older Fortran codes, I had to keep a cheat sheet for the variable names and what they meant or controlled. It definitely made the code hard to read.
- noobermin 1y agoYeah, this isn't the case for any codes written since may be the 00s or even the late 90s, although I admit I haven't worked on a code that old recently.
- pjmlp 1y agoSomething that also happens in languages like C and Go, while C has the same reason as Fortran, given the limitations of their early compilers, Go has no reason for single letter receivers.
- patagurbon 1y agoI didn’t say it was illegible. I said legibility is paramount, and I don’t think it makes the right trade offs in that regard to be a great teaching language It’s far more legible for numerics than a lot of languages, maybe except Julia and Chapel. Julia was just driven in large part by teaching mathematics at mit and I think that shows
- mastermage 1y agoI would go and say Fortran is pretty legible because it only has a handful of builtin keywords and none of the fancy stuff alot of other languages have. Julia has the fancy stuff aswell as being very legible and also having a nice REPL for instant feedback which is usefull for people learning (as well as multiple notebook implementations Pluto.jl or Jupyter) Chapel has even more of the fancy stuff like multiple loop types for different kinds of parallelism which is just wildly cool.
- kjs3 1y agoRegrettably, any discussion of Fortran will be quickly filled with people who once had to write a couple of F77 programs in college and never got over it, never used a really nice Fortran compiler, and of the very few who actually knew the language has evolved in the last 50 years the vast majority of that minority couldn't name a single significant thing that changed in F90/F95 through Fortran 2018. But they all have Opinions, which they are compelled to share.
- adastra22 1y agoC++ has evolved immensely in that same time. I still would NEVER use C++ for anything new, now that Rust exists. Why should I use Fortran, for anything that isn't maintaining legacy code?
- atemerev 1y agoI like modern C++ much better than Rust. I am 3 times more productive in it and don't have to fight the compiler for hours. And RAII is a simple idiom that prevents 95% of actual problems.
- noobermin 1y agoFortran is nowadays a DSL for computational codes. If you don't know why you would or could use it, you're not the target audience for it. Calling it a DSL is a bit rich given the history of computing but at least that way at least CS and developer types will know how to regard it.
- pjmlp 1y agoOr Fortran 2023, the current standard.
- zevets 1y agoJulia's choice to encourage people naming their variables greek letters is bad though. There's a whole group of students who struggle with the symbols, but understand the concepts (a residual). Julia, when used to its full capabilities, gains an enormous amount of its power from a huge amount of clever abstractions. But in the 1st-course-in-numerical-methods class context, this can be more offputting than the "why np?" stuff this article mentions. For teaching linear algebra, MATLAB is unironically the best choice - as the language was originally designed for that exact purpose. The problem is that outside of a numerical methods class, MATLAB is a profound step backwards.
- int_19h 1y agoIf students struggle with the use of Greek letters as symbols, it'll be difficult for them to deal with lots of math and physics where this is the standard notation. Intuitively it feels that the best thing that the language can do here is to enable notation that is the closest to the underlying math.
- hulitu 1y ago> If students struggle with the use of Greek letters as symbols After using Character map or other "user friendly" methods to enter Greek letters as symbols on a computer, i would say, yes, people struggle with the use of Greek letters. Unless, of course, one has a Greek keyboard.
- syockit 1y agoI always install WinCompose specifically for this. Then a Greek letter is as simple as pressing Compose with *, followed by the related Roman letter. Though I still struggle to remember which key maps to which for the letters with no real 1-to-1 mapping (like theta).
- pavon 1y agoWhatever language you choose, you are only going to be teaching a subset of it anyway, so just ignore the Unicode identifier support. I code in Julia professionally, and never use it.
- loiseaujc 1y agoOP here. I actually love Julia and acknowledge its ecosystem can be fantastic for learning purposes. Just see the Computational Thinking course at MIT. I'm not dismissing Julia. Actually, the first lines of my conclusions are > In the end, when it comes to teaching the basics of numerical linear algebra, Python and Fortran are not that different. And in that regard, neither is Julia which I really like as well. I feel like people got the impression that I'm saying they *should* use Fortran for teaching. That ain't the point, but maybe I did not convey it as clearly as I would have like. The point is : a programming language with strong typing, clear begin/end constructs, ensuring inputs to a function cannot be accidentally modified (otherwise it has to be a subroutine), etc actually makes it easier for the students to effectively *learn* computational thinking rather than having to battle with syntax errors and strange intricacies of a general-purpose language. Fortran is just an example which turns out to be historically related to number crunching. Unicode support and greek letters sure can be useful when presenting code snippets in your slides, but it essentially is syntactic sugar coating. And, unfortunately, many students have no idea how to spell greek letters (e.g. \to for \tau, \fi for \phi, etc) and just end-up loosing time on aesthetic details rather than focusing on the learning objective. Finally, you may not know it but Fortran does have a package manager. Check out fpm (https://github.com/fortran-lang/fpm https://github.com/fortran-lang/fpm). It basically is just like Pkg for Julia, also using a toml manifest, can be installed via conda, makes sure things are reproducible across compilers and platforms, etc.