|
At my work we're using it pretty heavily for the various services surrounding our big, traditional, J2EE applications. To a lesser extent the J2EE apps are using it a bit too but the real adoption has been in backend web services. People do tend to either like it a lot more than Java or hate it utterly, but one interesting pattern that's happened is that teams that have used Scala and decide it doesn't work for them don't go back to Java; they either explore other FP-on-the-JVM things like Clojure or in a couple of cases have just switched to Haskell. There are a couple of people I've talked to that are using it for big dataish stuff and seem to like it in that role. It does quite remind me of C++ in regards to all the pointless minutiae that you have to learn to massage what you actually wanted to write into something that the compiler won't vomit back into your face. A lot of this isn't language complexity per se, though, so much as it is the compiler not being very good.
|
# ¿ Jan 16, 2015 03:37 |
|
|
# ¿ May 10, 2024 18:33 |
|
Rather than using foldLeft and reverse I'd be inclined to use foldRight as that'll be doing the same under the hood (for lists). It permits a slightly simpler version (which also has the benefit of not blowing up on empty input strings):code:
|
# ¿ Jan 31, 2015 22:59 |
|
I guess the other point of note with foldRight is that if you were to switch from List to Stream or some other non strict data structure then you can run the computation lazily which on big data sets doesn't mean you have to have the whole thing in memory at the same time.
|
# ¿ Feb 1, 2015 05:06 |
|
Ah, you're quite right – I was thinking of something like the following, which seems well behaved re: the stack and is lazy but, after further thought, doesn't seem to be representable as a right fold.code:
|
# ¿ Feb 2, 2015 05:03 |
|
I guess Hystrix might be another option for making blocking calls less blocky. You'd also get circuit breaking. On that subject has anyone had any experience with Hystrix/Akka circuit breaker/other things of that ilk?
|
# ¿ Feb 18, 2015 07:30 |
|
good jovi posted:scalaz stuff is so cool, but man, gently caress operators. Why did they have to port Haskell's worst parts along with its best? Just name your goddamn methods with letters. There's a whole bunch of them right under your fingers! And they mean stuff! I guess they're imagining people who want non-symbolic names would use the IMap alias and move on with their lives?
|
# ¿ Mar 31, 2015 03:13 |
|
KernelSlanders posted:Cake pattern is terrible. I don't understand why anyone would chose it over constructor injection. The rationale in Odersky's talk is that interfaces (well, traits) simply can't express the type constraints he required without casting, and he (unsurprisingly) preferred type safety. Although IIRC, Dotty's gone with a different abstraction. It is quite useful in those situations but some people decided it should be used for everything.
|
# ¿ May 8, 2015 07:09 |
|
|
# ¿ May 10, 2024 18:33 |
|
Most of the stuff I've seen uses Seq or F[_]: Whatever depending on whether it's functional or not. I wouldn't be enormously surprised though to discover that requiring lists had be come an idiom somewhere.
|
# ¿ Dec 20, 2015 05:40 |