2 ms·
There are conventions in scala to talk to the culture as well. Ya I agree that it can be hard to see effects occasionally. I just worked out a bug where some el
by ninjakeyboard 11y ago
There are conventions in scala to talk to the culture as well. Ya I agree that it can be hard to see effects occasionally. I just worked out a bug where some element was cached despite the fact that the function I wrote appeared to be pure. But still, in scala's culture braces at the end of a function are, by convention, representative of an effect.
Eg doSomething is pure and doSomething() has an effect. It's shades of grey. Scala ultimately may not be Haskell, but it's useful and a much better alternative to using Java. To lean on the JVM and be able to sell Scala is better than using Java just because it's what's already there. To transition away from java toward something better is a win. It's definitely a win. I'd love to work on haskell or introduce haskell in places that i work but no way in hell would I ever succeed. Only at a startup with the smartest of smart people. You can take interested ruby developers and chop them into decent scala devs and that's good for the pitch. How the hell do you take a team of mediocre devs and get them to write your next production system in haskell?
- lomnakkus 11y ago> Ya I agree that it can be hard to see effects occasionally. Nono. The point is that they should be codified and forbidden in places they shouldn't be used. I cannot describe how much this matters to anyone who hasn't "absorbed" the Haskell mindset. (That's not your fault, it's mine. "More research/explanation needed" on my part.) > ... and a much better alternative to using Java. Yes, but it only if you use it as a "better Java". It fails _hugely_ if you try to do anything "advanced"... as in actual FP like lenses and things. > I'd love to work on haskell or introduce haskell in places that i work but no way in hell would I ever succeed. This is also a cultural problem. Migrate towards microservices and... there you go! Nobody actually cares what it's implemented in. (I think this is a somewhat sneaky/underhanded way to introduce it, but it... works.) EDIT: If you want to see first-hand what I'm talking about try "monocle" or "shapeless", which -- while both being fantastically named and engineered -- fail on actual usage.