5 ms·
I wish more programmers would take an intense course on functional programming. I learnt so much in my OCaml classes and really enjoyed programming with it.
by roflmaostc 3y ago
I wish more programmers would take an intense course on functional programming.
I learnt so much in my OCaml classes and really enjoyed programming with it.
- qwerty456127 3y agoWhy use OCaml when we have F#?
- roflmaostc 3y agoIt doesn't matter which functional language you use, any will do its educational purpose. But as for other languages, there is pros and cons for each of them. I never tried F#, only Haskell and OCaml.
- qwerty456127 3y agoSure. I'm just curious what do people who are into functional programming actually think. I've taken a look at F# and other MLs and F# seemed the best althoigh not this simply - another ML (I can't easily recall which one) had some interesting features F# lacked. So I hunt for curious thoughts people may have on this when they MLs are discussed. I personally have little interest in academic computer science but do have strong interest in using cool programming languages to write concise reliable code. Functional languages really shine at saving a solo developer's time as most of the bugs are caught during compile time, verbosity generally is lower and readability generally is higher.
- pjmlp 3y agoIts owner doesn't really know where to drive it to. However in general, any would do.
- qwerty456127 3y agoDo you mean the F# Software Foundation consisting of 1831 members?
- pjmlp 3y agoI mean Microsoft. Quite curious what those 1831 members would do, if Microsoft decides to play a VB6/VB.NET (both now in maintenance) on F#.
- qwerty456127 3y agoDoes Microsoft care about F# at all? Wasn't it a short-lived experiment of the 2000th creative era which just happened to attract enough persistent community interest to avoid being archived?
- pjmlp 3y agoIt cares enough to ship it on VS, and still pay salaries that keep it going. I expect it to fade into oblivion the day Microsoft decides to drop it. Those foundation members will hardly keep it relevant, once it becomes yet another third party language on .NET ecosystem.
- Verdex 3y agoPerhaps they want to have access to some features that ocaml has that F# does not. Like: * gadts * first class anonymous modules * functors (module level functors) * polymorphic variants * row polymorphism * effect handlers Although, I must confess, I haven't exactly kept up to speed on F# development. Perhaps F# has added some of these features recently?
- qwerty456127 3y agoSincere thanks! This is exactly what I meant to ask!
- bunderbunder 3y agoI haven't used F# in a couple years now, but the longtime position of the maintainers has been that F# will not and should not adopt many features along those lines because they interact poorly with the .NET type system. It's not a perfect comparison, but, having spent some time dealing with all the unusual and surprising ways that some Scala language features interact with Java's type system, I tend to agree with the F# community on that point.
- qwerty456127 3y agoWhy won't OCaml steal F# features then?
- bunderbunder 3y agoI think the first questions to ask would be, which ones would it steal and why?
- bunderbunder 3y agoAs others have hinted at, F# and OCaml are really not interchangeable languages. They handle lots of things in very, very different ways. Even the difference in runtime makes a big difference. You could very similarly have asked, "Why use Objective-C when we have Java?"
- qwerty456127 3y agoI would rather ask why use Java (for reasons other than the large legacy code base and the job market) when we have Scala (which doesn't even force you to program functionally and can be used as "a better Java" if you want, it can be used to write really weird code but doesn't have to).
- bunderbunder 3y agoHaving spent some time using both in a professional context, I would actually choose Java over Scala. And I say that as someone who cut their teeth on functional programming and still tends to prefer it over OOP. The problem with Scala is that good, maintainable code is defined more by how many language features you have the discipline to avoid using than it is by how many you do. And that makes it more difficult to keep a large Scala codebase maintainable on a team with varying levels of experience. Freely mixing ad-hoc and subtype polymorphism (that is, type classes and subclasses), for example, is a very short, very slippery slope to a situation where the best way to figure out how the code works is to already know how the code works.
- weatherlight 3y agoScala, The Walmart of language paradigms.
- jojohohanon 3y agoI never could wrap my head around the context variables or whatever they were called, where the language would pick a random variable from your local environment and pass that as an argument to the function call.
- 3y ago
- toastal 3y agoRelying on Microsoft’s .NET is not what a lot of us would want to do, especially when it comes to libre software.
- qwerty456127 3y agoTo me .Net seems the most powerful thing to make a relatively esoteric language practically useful in the real life. Compiling to .Net gives a really solid ground for free. Compiling to JavaScript is a great option but the JavaScript landscape seems way less stable and this way harder to support.
- toastal 3y agoBut you have to rely on Mono or .NET Core for Linux which isn’t something many want to put on their servers or desktops.
- qwerty456127 3y agoIs there any legitimate reason to avoid having it?
- 8589934591 3y agoCan you suggest some course(s) and/or language(s)?