Fork me on GitHub
#clojure-india
<
2017-03-08
>
udit09:03:03

Coming from a Java background to Clojure the very first thing I googled was how to implement classes and interfaces in clojure to get things done. But that’s not idiomatic clojure (tbh what I ended up with was a disaster in retrospect). My advice would be to ramp up on the basic data structures - map, lists, vectors and their operations. And then write clojure which does what your Java code does. Also take off your OO hat 🙂

udit09:03:07

@niten.sagar also if you want to use some java libraries use what @kumarshantanu said.

bg09:03:33

It's important to learn how to think functionally and not to translate code written in X to Clojure.

niten.sagar09:03:50

@kumarshantanu @udit @bg Thanks for your suggestion. Basically my current work requires me to extract data from ads API like Adword, Bing etc and all this brand have java library. Therefore i need to integrate this library in clojure project.

pastafari09:03:03

@niten.sagar niten.sagar here’s a simple library that might help you write interop code: https://github.com/codonnell/uri/blob/master/src/uri/core.clj

pastafari09:03:54

it creates clojure fns that delegate down to the underlying java lib.

aleksanders14:03:53

@niten.sagar for accessing Adwords/Bing reports you can take a look at: https://github.com/uswitch/adworj https://github.com/uswitch/binj they might be enough for your needs