[HN Gopher] Typelevel Scala and the future of the Scala ecosyste...
       ___________________________________________________________________
        
       Typelevel Scala and the future of the Scala ecosystem (2014)
        
       Author : luu
       Score  : 34 points
       Date   : 2021-07-25 06:07 UTC (1 days ago)
        
 (HTM) web link (typelevel.org)
 (TXT) w3m dump (typelevel.org)
        
       | lf-non wrote:
       | The scala fork that the article talks about has since been
       | discontinued: https://github.com/typelevel/scala#what-is-was-
       | this-reposito...
        
         | kag0 wrote:
         | > In July 2019, after the release of version 2.13.0 of the
         | Scala 2 compiler, and with Dotty (Scala 3) already in advanced
         | state of development, the authors concluded that the TypeLevel
         | fork had served its purpose. New contributions are best
         | forwarded to the Lightbend's compiler fork.
         | 
         | >> The way I see it, the TypeLevel compiler was very useful for
         | trying out and refining features that have found their way into
         | the mainline compiler afterwards. (by Martin Odersky
         | 
         | As a Scala user (with not much awareness of the big players in
         | the community), I think the fork worked out nicely. I enjoy the
         | features in Scala 2.13 that were stimulated by the fork. With
         | the impending release of Scala 3 it probably made even more
         | sense to discontinue the fork rather than use it to seed more
         | new features.
        
       | AheadOfTime295 wrote:
       | Please note: the official site of Scala 3 is scala-lang.org
       | 
       | For Pure FP there's scala3.com
        
         | beerbajay wrote:
         | ... you mean for consulting services ... you can do pure FP in
         | normal scala and without the cryptofascists
        
       | uDontKnowMe wrote:
       | This is way old ancient irrelevant news as the project never
       | really took off and was quickly abandoned/contributors refocussed
       | on Scala proper. That was also many major versions of Scala ago
       | (2.11, which has since been succeeded by 2.12, 2.13, and now
       | 3.0). No idea why this would be submitted in 2021.
        
       | gavinray wrote:
       | I think some of the features from this were absorbed into Dotty
       | (Scala 3) right?
       | 
       | One example I can think of is the Typelevel "Kind Projector"
       | which had a syntax for lambda types. This became an integrated
       | feature of Scala 3
       | 
       | https://github.com/typelevel/kind-projector
       | 
       | ---
       | 
       | While we're on the frontpage, might as well use this as a small
       | promotion for Scala 3:
       | 
       | I'm predominantly a Typescript developer, though have written
       | (either for money, or for personal projects) a good number of
       | languages.
       | 
       | I passed up Scala 2 several years ago because it seemed overly
       | complicated. And the (perceived/community-driven) emphasis on
       | purely functional programming. I believe in immutability, and
       | love higher-order functions as much as the next fellow -- but
       | only insomuch as they make writing programs easier, and the code
       | simpler/more understandable.
       | 
       | When Scala 3 was announced I went and had a look through the
       | documentation and entry book/guide again.
       | 
       | What I saw was a language that was (for the most part) very
       | intuitive. It has all the features you could ask for, and the
       | language is flexible enough to get out of your way.
       | 
       | You can just as easily write OO or FP code, in a
       | clear/concise/simple manner. I was able to take code that I would
       | have written in Typescript, and transcribe it mostly 1-to-1 to
       | Scala 3, with the bonus of having pattern matching and proper
       | "Maybe" types built in.
       | 
       | Then come some other things that you DON'T get in languages
       | outside of Scala. Contextual values ("given"/"using") blew my
       | mind and are so fantastic + useful.
       | 
       | If you're someone who generally just wants to write pragmatic
       | code and had previously passed on Scala due to reputation, I
       | would encourage checking out the docs and playing with it for an
       | hour to see if it meshes with you.
       | 
       | (Fair warning: most pure Scala libraries have heavy FP patterns,
       | but I've mostly stuck to popular Java libraries and experience
       | has been solid doing this so far)
        
         | Zababa wrote:
         | I would love to give Scala a solid try if I ever work with
         | Java. Right now I'm investigating OCaml for personal stuff and
         | will try a bit of F# since my next job is C#.
        
           | gavinray wrote:
           | That was what sparked it for me -- I have a project that
           | requires GraalVM for polyglot scripting stuff, and I wrote a
           | proof-of-concept in Java, Scala 3, and Kotlin.
           | 
           | Had never really used the JVM prior to this. I enjoyed Scala
           | 3 the most out of all of them. Though of course the tooling
           | is not up to par with Java (not much is), that's kind of the
           | tradeoff you make.
           | 
           | Also, F# is really nice I think. Though again same sort of
           | tooling situation when comparing Scala to Java.
        
         | dkarl wrote:
         | > (Fair warning: most pure Scala libraries have heavy FP
         | patterns, but I've mostly stuck to popular Java libraries and
         | experience has been solid doing this so far)
         | 
         | This is because it's so easy and natural to use Java libraries
         | from Scala, if you aren't trying to write in a pure FP style.
         | Sharing libraries with the larger Java ecosystem means you get
         | APIs that don't take advantage of Scala features, but it has a
         | lot of advantages, too, and this is what most Scala programmers
         | do if they aren't fully committed to functional programming.
         | 
         | Doing pure FP and managing side effects through effects
         | requires wrapping or replacing Java libraries with pure,
         | effectful APIs, and that is the raison d'etre of a lot of Scala
         | libraries. On one hand, the smaller community means you miss
         | out on the maturity and battle-testing that adoption in the
         | larger Java ecosystem brings, but on the other hand, you get to
         | write in pure, effectful FP style, if that's your thing.
        
         | ubertaco wrote:
         | Does Scala still have "the Scala problem" where learning a new
         | Scala codebase is roughly equivalent to learning an entirely
         | new programming language?
        
           | gavinray wrote:
           | As in, do people have entirely different ideas of how to
           | write code so that what code looks like from one project to
           | the next is not guaranteed any sort of regularity?
           | 
           | Yeah, pretty much. Though it falls mostly into two
           | categories:
           | 
           | 1) "Haskell on the JVM". Pure functional, algebraic effects,
           | monads, custom operators/DSL's the whole nine yards. This
           | would be the Typelevel ecosystem stuff, and
           | ZIO/Scalaz/FS2/Cats/etc.                 (Actually, some of
           | the ZIO stuff is not so wild. I think it's fairly
           | digestible/easy compared to some of the more "hardcore" scala
           | FP libraries)
           | 
           | 2) "Better Java"/Pythonic etc. Doesn't tend to be heavily OO
           | or FP but just sort of a mishmash of features of both to get
           | stuff done. Li Haoyi's libraries are a great example of this.
           | 
           | I can imagine this being an issue if you were working with it
           | in a professional context, or on a team that had differing
           | ideas about what Scala ought to look like.
           | 
           | Being a personal project, I've done a bunch of stuff that you
           | probably wouldn't find recommended online. I am using
           | Quarkus/Vertx Java libs, and a lot of Enterprise Java
           | (javax/jakarta) stuff.
           | 
           | (Note: I actually wrote a Quarkus extension to add support
           | for compiling Scala 3 so that it could be used with Quarkus'
           | ecosystem)
           | https://github.com/quarkusio/quarkus/pull/18431
           | 
           | ---------
           | 
           | That being said, the online Scala community is helpful, even
           | if FP-oriented. On the Discord you'll find deep expertise and
           | answers to most anything you ask.
           | 
           | And believe it or not they won't burn you alive if you say
           | "Hey I'm not really interested in hardcore FP".
           | 
           | I owe a lot of what (little) I know to a handful of members
           | on there (tpolecat, Balmung, Aly, Ethan) who always seem to
           | have time to answer my dumb questions.
        
       ___________________________________________________________________
       (page generated 2021-07-26 23:02 UTC)