Fork me on GitHub
Denis G22:12:22

Guys what do you say about generics/templates vs interfaces


Other than "they're orthogonal"?


@denisgrebennicov Can you refine your question by providing some context?

Denis G23:12:05

@seancorfield the question is more directed to which of one should be preferred to be used. When should one use templates/generics and when interfaces


templates & generics solve copy + paste problems. Interfaces solve “everyone must implement the same API” problems


for anyone interested, I’m going to be trying to do Advent of Code in both CLJ and Rust:


Nice, I try rust and RxJava, you might want to give a try for rust, makes it really easy to focus on the solution. Didn't found the cycle input, gonna check if it will perform better.


Very cool. I think I'll stick with just using plain cargo for now; I'm using this to learn how to use and setup cargo as much as for learning the language


I'm sure at some point between now and the 25th I'll get sick of it and use the fancy plugin:stuck_out_tongue_winking_eye:


They are planning on having a kind of leaderboard based on performance. That could be nice. I also added some timer to JavaRx, but it's about 10 times as slow as rust


yeah my Clojure solution took 300ms on my dinky VPS I’m sshed into. My rust solution built with —release took 20ms


I now also set the JavaRx up to properly test with jmh, warming up the JVM and such.