Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3233114
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:14:23+00:00 2026-05-17T17:14:23+00:00

Like most ppl, I started with and still do a lot of imperative code(mostly

  • 0

Like most ppl, I started with and still do a lot of imperative code(mostly Java, Ruby, Javascript).

I’ve never been a big fan of OO, either because I never understood it properly or because I don’t think OO.

Got my first glimpse of FP via javascript, passing functions around, closures, etc. Have been in love with FP since then.

Recently, I’ve developed interest in Clojure (and may be Scala) and someday might even have a go at Haskell. I like what I see in the functional approach, but how do I think functional? I’ve been doing imperative stuff for the past 3-4 yrs and my brain tends to think imperative while approaching a problem.

How can I unlearn the imperative style(do I need to?) and think more functionally ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:14:24+00:00Added an answer on May 17, 2026 at 5:14 pm

    No. Don’t unlearn imperative style as you’ll still need it. Even many well-done FP libraries look somewhat imperative under the covers. It’s better to think in terms of adding FP to your list of tools and techniques rather going full-metal with one technique or the other.

    Now, as to how you go about learning the FP style? Toy projects – or utility project you write for your own use. Or hell, write yourself yet another blog – but with a twist! The key thing, as was stated above, is practice. When doing so, avoid shared state. Strive for purity (that is, avoid side effects) in as many places as you can. Use closures, pattern matching (if the language supports it) and lambda functions. Think in terms of functions being first-class data types in your program – take them as input and return them as output. The list goes on, but you’ll see the same concepts repeated time and again if you’re watching for them.

    If you feel you need a gentle nudge in this regard, use a tool (language) that encourages the FP style such as F# or Scala.

    If you feel you need more of a “tough love” kind of help, reach for Haskell 🙂

    Otherwise use the tool of your choice and just keep FP concepts (above) in mind. If you decide go this route there’s a pretty good book called Real-World Functional Programming that uses F# and C# to illustrate techniques that apply in both a “mostly” FP language (F#) and a “mostly” OO language C#.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Like most developers here and in the entire world, I have been developing software
I (like most tech admins I guess) have quite a lot of status infos
Like most *nix people, I tend to play with my tools and get them
Like most developers, I'm a business developer, which in essence consists of slapping a
Like most people, I learnt C++ after C. I learnt C++ because it was
So like most new .NET developers you start of passing DataSets everywhere and although
It seems like most examples of JPA/Hibernate entity bean classes I've seen do no
It appear that SQL Server like most other products Random Function really is not
It seems like in most mainstream programming languages, returning multiple values from a function
What web based interface for browsing Subversion repositories do you like the most? We

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.