Explain Fortran to me.
All I know is:
- it's old
- people hate it
- my laptop now has a Fortran compiler because of some random dependency.
Explain Fortran to me.
All I know is:
- it's old
- people hate it
- my laptop now has a Fortran compiler because of some random dependency.
Other urls found in this thread:
>it's good for numerics
>it's good with shit involving ton of loops
>people hate a lot
>even people
oh and same could be said for perl and ruby
i mean cmon.
unless you are on a windows machine, having a fortran compiler is no bigy, besides whats one more package among 100000 ricer packages
Used almost exclusively for numeric simulations involving loops and matrix algebra. Updates mean it's not that horrible any more (even got OOP kek). Its still the only choice when it comes to solving things like physical simulation problems. You would then use something more friendly to do post-processing (shit ton of python libs etc)
t. Fluids researcher
FORTRAN was written for engineers.
It works the way engineers think.
There are literally limitless known-good working subroutines for FORTRAN.
You can do almost anything in FORTRAN. If you can't do it in FORTRAN, do it in Assembler.
If you can't do it in Assembler, why bother?
FORTRAN is considered harmful
It's very close to c with some weirdness.
>1 indexed arrays
>Always pass by reference
>Output is misery until you get used to it, and then it's merely unreadable.
>Row major 2d arrays.
>comparing is weird ( .gt. )
That being said it's s popular language to test super computers and there's a lot of old code written by genius (non computer) engineers that's in FORTRANso you may come across it some day
Why FORTRAN though, why not C or any other language? Is it a library issue? You could use literally any other language that is newer and more though out than FORTRAN with shit hacked on.
I once went to the Bureau of Labor Statistics for an informational interview and one of the economists there showed me around. He introduced me to a computational economist and that guy was so smart.
>hey user, how are you?
>fine, I hear you do some cool stuff doctor
>yeah we do
>not too many people here
>yeah we have a few spots open, you can have a job if you want
>do you know fortran?
I did not so I could not take that job in good faith. :(
I don't event think about it because its name is very similar to another word and I REALLY don't want to use that word in any context in public
just werks
Has cool syntax for arrays. The rest is pain. Procedures and functions are different things and are called differently. Recursion should be explicitly stated in function's definition. Outputting something is pure insanity. Made a typo when using a variable? Have a new variable, with type that depends on the variable's name's first letter(!!!) - look up "in FORTRAN God is real." Passing a dynamically allocated array into a function needs special snowflake syntax as well. And other legacy stuff.
Fagtron?
>Recursion should be explicitly stated in function's definition
are you literally retarded
its a language FOR TRANsexuals
>1 indexed arrays
This is the biggest thing holding me off from Julia.
Jesus rollerblading Christ
It's Fortran, not FORTRAN. I bet you fucks think it still uses punchcards, don't you?
And for the record, you wouldn't have to ask such basic fucking questions if you ever actually programmed anything of worth.
Nobler weapons for nobler times.
I dabbled with it like ten years ago, I should spend a couple of weeks with it again so at least I can put it on my CV. Maybe I'll get lucky and someone will let me maintain age-old Fortran garbage for a handsome salary. A man can dream.
If you simply call function inside of itself you get compilation error. You have to define the function as recursive to do that.
In FORTRAN you can actually define how an array is indexed. Arrays are one of the few of its redeeming features.
What if you have a pair of mutually recursive functions?
Define both recursive.
Yes, but I meant how would the compiler react to such a pair of functions if they weren't declared such? Would it be able to detect the error, or would it cause something akin to C's undefined behavior at runtime?