4 ms·
> What place does Scala now have in the world? serious answer: chisel3 other serious answer (at least to me): the ability to write incredibly terse code. For
by _nhynes 7y ago
> What place does Scala now have in the world?
serious answer: chisel3
other serious answer (at least to me): the ability to write incredibly terse code. For instance Rust, as great as it is, doesn’t have partial application.
iter.map(|x, y| f(x.as_ref(), y))?
is so much less satisfying than
iter.map(f(_, _))
I’m pretty sure you could recover that behavior using a compiler plugin, though.
Also, don’t get me started on implicit conversions... I’m an avid golfer.
Other than not having (usable) macros, the language itself has very nice amenities. SBT was like an early Cargo, even.
- _ZeD_ 7y agoI lost so many weeks trying to decode the fk of the code written in scala with so much "magic" in it. And I'm working with a colleague to "unmagic" it in our source base.
- realusername 7y agoYeah that's exactly my feeling on Scala after debugging some "magic" code, it feels like a functional perl where you write whatever you want and good luck if someone else will need to read it later.
- serpix 7y agoSpoken from true experience, I've also been staring down at some Scala magic and wondering how in the earth did we end up in this hole.
- anon9001 7y agoI personally believe that people who bring functional programming into commercial settings are wrong to do so. There's a real trend lately to go "big" and "functional", but know that it causes actual business problems. If I have to inherit code, I'd take (JavaScript|Rails|PHP|Python)+(MySQL|PostgreSQL) over (Scala|Haskell|F#|Lisp)+(MongoDB|Cassandra|Kafka) any day. I understand that all of these tools have their uses, but the most important thing is ease of finding decent developers. Lots of people can do JavaScript well, but few can do Scala, so you're going to have a smaller pool of talent. More popular languages are also going to have more developed patterns, more native libraries, and better tooling options. If you need Scala, please just write Java. You'll always be able to hire a Java dev. Everyone hates writing Java, but everyone can write Java. And related, if you're using any kind of NoSQL for your business data, you're wrong. I understand NoSQL for caching and document storage, but not everything is a document. Most things are actually best in SQL tables. Especially if you're a startup.
- coldtea 7y ago>I understand that all of these tools have their uses, but the most important thing is ease of finding decent developers. Lots of people can do JavaScript well, but few can do Scala, so you're going to have a smaller pool of talent. Isn't that a side benefit? It keeps out the riffraff.
- pitkali 7y agoI don't think it's fair to include F# in that list, what with its emphasis on explicitness. After all, it's not like functional programming requires writing obscure code any more than complex object hierarchies pushing events and callbacks all over the place until you have no idea how you got where you are. What actually causes trouble in an enterprise setting is not any particular paradigm itself, but "magic." All that flexibility of Scala or Lisp is great in the small, but it doesn't scale easily. You are effectively building new DSLs in them, and then everyone that comes to the project has to first learn the specific variation that you ended up with. The problem is that people usually neither acknowledge they are building a language, nor think about design of that language to make it easy to learn and use, including documentation. So new people come and are completely lost. If they are experienced in the given base language, it is only easier for them to find the starting point to reverse engineer what was done, but that work still has to be done. This actually happens in Java and other less "magic" languages as well, but then nobody blames the language: they blame frameworks and development practices in a particular shop. Additionally, the whole mindset of "easier to hire a Java dev" only makes sense for juniors, if at all. Developers are meant to be problem solvers, and any particular language or framework is but a small part of the overall toolset they should have. Sure, if they are experienced in a particular language that you are using, they will have easier time starting up, but that is only a short term benefit.
- 6thaccount2 7y agoAs a non developer, but someone who codes, the hire for Java mindset always confused me. If I can pickup an entirely new language (with the exception of Haskell) in a few days, so should a professional. Then, I noticed how low the bar is for an average developer when it comes to understanding their tooling, basic commandline knowledge, and problem solving. Sure, the best developers can solve a business problem with pretty much anything if they have to, but the average one chooses a major language and framework and hacks things together with stack overflow. We've all done that before, but then again good problem solvers are also capable of picking up a book and learning something new like Lisp and a lot of developers simply aren't going to do that ever.
- cmrdporcupine 7y agoFrom my recollection working with Scala many years ago... Scala is in some ways like C++, it gives a grab bag of cleverness. You can shoot yourself in the foot going wild with template metaprogramming and excessive abstraction and cleverness in C++, or go wild with FP abstraction in Scala. Or you can define a sane coding standard and subset that your team agrees is readable, and stick with it, and enforce it through code review.