3 ms·
Can I request some more insights about it? If I want to be doing something else, why isn't Fortran a good fit? Lack of extensive stdlib like Python and Go?
by mapreduce 3y ago
Can I request some more insights about it? If I want to be doing something else, why isn't Fortran a good fit? Lack of extensive stdlib like Python and Go?
- medo-bear 3y agoMine was not a statement about its stdlib or if Fortran can do something else well. Great majority of people in Fortran community are focused on numerical methods.
- rnhmjoj 3y agoBasically the only "stdlib" that Fortran gives you are some mathematical functions, super basic string and file operations and that's it. There are no APIs for networking, sockets, IPC, threads, etc. that pretty much al modern languages come with. Can you write a parser in it? Sure, but it's going to be painful dealing with strings. Can you write a web server? Yes, but you'd have to link to a C library that exposes the kernel TCP/IP interface to Fortran. And so, on. So, essentially it would be like using C without a libc: it's doable, but it doesn't really make sense.
- ivanpribec 3y agoA few of these things exist already: - http: https://github.com/fortran-lang/http-client https://github.com/fortran-lang/http-client - sockets: https://github.com/modern-fortran/tcp-client-server https://github.com/modern-fortran/tcp-client-server - threads: https://github.com/interkosmos/fortran-unix https://github.com/interkosmos/fortran-unix
- omgmajk 3y agoIt's a use the right tool for the job thing. Fortran is very fast, used primarily for scientific computing in various fields - not a lot of people are writing general purpose code in Fortran. Of course you can do it, but it's not a great experience and you'd spend a lot more time doing work you'd rather already have tools for.