9

So i've been working with OOP and now that i have some free time i decided to learn Golang.... Great language but at the beginning was really hard to go back to the non OOP.

Comments
  • 0
    Is golang a functional language and would you recommend it? I've been meaning to learn a functional language since all of my experience is with OOP/imperative, the small amount of functional experience I have comes from JS which I don't think really counts for much
  • 1
    @-Neo yes it is. And i would recommend it for sure. But be prepare to deal with a language based in C. Monsters like Facebook, Yahoo, Twitter and some others are migrating to Golang. That must mean something. You should give it a try ;)
  • 0
    @julymarval Thanks, I'll definitely give it a shot then
  • 0
    @theScientist It's not a strictly functional language so it doesn't force me to learn functional paradigms as strongly as I'd like, when I say it doesn't count as a functional language I'm comparing it to a language like haskel, JavaScript CAN be written and used functionally, but it's not a purely functional language by design
  • 0
    @demiko What do you mean? JS can be written either procedurally or functionally, I know that it's not a functional language, but it can be written like one to some degree, I'm just used to using it procedurally and so I want to learn a purely functional language, really just to gain the additional mindset, I'm sure there's some problems out there that are better solved using a functional language so I think understanding the basic concepts could be useful at some point
  • 0
    @theScientist Would calling functions as an argument and callbacks be considered functional? And that sounds awesome I'll definitely check it out, thanks a lot
  • 0
    @theScientist Oh wow, I guess I do use JS somewhat functionally then, I have to really look into all of this more. Is the nature of javascript's prototypal inheritance functional at all?
  • 0
    @theScientist I actually follow Elliot on Medium, he's one of the main reasons that I've become interested in functional programming
  • 1
    @-Neo one of the most important concepts in fp is referential transparency (or pure functions). Every time you call a method with some parameters, it should return the same values and have no side effects. If you're not taking this into account in js (not always, but in much of the code), it's not quite fp ;)

    If you ask me, I'd check a do language like Haskell, Erlang or Clojure (or Elm if you prefer frontend) to understand the concepts and then translate them into js if you like. If you go through a language that doesn't constraint you into fp you might continue resolving problems imperatively or half-assed for concepts.

    Good luck!
Add Comment