4 ms·
Functional programming is admittedly fun, at least for those who are mathematically inclined. The problem is that it's hard, at least at this stage, to justify
by acangiano 15y ago
Functional programming is admittedly fun, at least for those who are mathematically inclined. The problem is that it's hard, at least at this stage, to justify using a functional programming language as your main tool.
Want to develop web applications? Nothing from the functional programming camp comes even close to the polished experience of using Ruby on Rails. Yes, I know about Play and other web frameworks for Scala, Clojure, and Haskell, but - and I repeat - they aren't even remotely close to the level of support, libraries, plugins, and documentation that you can get from the Rails world.
Want to develop mobile apps for iOS or Android? That's typically Objective-C or Java territory. Yes, you can develop Android in Scala, but you are a pioneer then (and you are virtually on your own if you encounter any issues with the stack, as very little documentation and community support is available for it).
Want to develop desktop applications? Again, functional programming languages are rarely the best supported option. C#, Objective-C, C++, or even Object Pascal (Delphi) are all fine choices. Opt for Scala, Clojure, or Haskell and you'll find little documentation and support, and in the case of the first two, you'll have GUIs that look anything but native.
So what are these functional programming languages good for? So far I've only found them to be good at doing heavy lifting in the back-end or in GUI-less scripts. An important spot for sure, but not the most prominent one to justify adopting either as my main tool.
I love functional programming languages and I wish I could drop everything and write web apps in Clojure or Haskell. But the hustler in me wants to get stuff done and cannot justify the world of pain and waste of time I'd experience, especially when there are already tools that are simply better suited for the task at hand.
Should a project of mine scale to the point of needing a fast functional programming language for core functionality in the back-end, I'll be happy to employ it there.
- haliax 15y agoCompletely disagree about Ruby on Rails, the experience of using happstack ( http://happstack.com/index.html http://happstack.com/index.html ) blows it out of the water. The RAM Cloud database is really natural to use; it eliminates problems like object-relational mismatch and SQL injection by letting you do everything in idiomatic Haskell. Plus, the type-system, monads, and algebraic datatypes make it much easier to write clean, correct code. Albeit, only once you've passed the learning curve.
- mobileman 15y agoThat learning curve is the problem. Building a business ultimately requires people to be cogs at some level.
- cconroy 15y agoWhy functional programming? Functional programming maybe hard in the beginning but it's much simpler to program in once you wrap your head around it. Backend web dev? There are lots of nice simple frameworks or you could build your own. Do you really need everything rails / django offers -- I find minimal and lightweight is best. You are essentially building an service that can interpret http. Devices? If you want to do iOS or Android you can use javascript, css, and html instead of the native approach (see phonegap et al.). Javascript is a functional language -- in that it supports higher-order functions like scheme. (See http://yuilibrary.com/theater/douglas-crockford/crockonjs-3 http://yuilibrary.com/theater/douglas-crockford/crockonjs-3) "...world of pain and waste of time experience..." or getting shit done in what I know how to do is not a good approach for a programmer.
- pessimizer 15y agoI really adore using Erlang with Webmachine, jQuery Taconite, and erlydtl for web projects. It's usually not a morally safe option for other people's projects (because what are the odds of them finding an Erlang programmer to work on it after I'm gone?), but it's a joy for my own projects. Easy, and as functional as you want to be:) edit to add links: https://github.com/basho/webmachine https://github.com/basho/webmachine http://www.malsup.com/jquery/taconite/ http://www.malsup.com/jquery/taconite/ https://github.com/evanmiller/erlydtl https://github.com/evanmiller/erlydtl
- Dn_Ab 15y agoI disagree in terms of Desktop. writing F# apps targetting .NET, mono or monomac is equivalent to C#. The only cost is some initial time with t < 2 hours to write a dsl to wrap your interface xaml to F# or for forms create a dsl for your interface.