{"id":562,"date":"2011-02-21T11:04:44","date_gmt":"2011-02-21T16:04:44","guid":{"rendered":"http:\/\/alarmingdevelopment.org\/?p=562"},"modified":"2011-02-21T11:11:44","modified_gmt":"2011-02-21T16:11:44","slug":"switching-to-plan-j","status":"publish","type":"post","link":"https:\/\/alarmingdevelopment.org\/?p=562","title":{"rendered":"Switching to Plan J"},"content":{"rendered":"<p>My experiment with Scala is not working out. It&#8217;s just not ready for prime time, and is overkill for my needs. Reluctantly, I am falling back to Java. <!--more--><\/p>\n<p>Scala is a tour de force of language design. In my mind, it is two languages in one. First, it is a clever fusion of OO and strict functional programming (ala ML). For those coming from OO, I think it is a more natural fusion than that of OCaml &#038; F#. Secondly, it is the ultimate language to date for writing libraries and embedded DSL&#8217;s with static types. Many things that are specialized syntax in other languages are just library code in Scala. You can warp the syntax to many uses, all within a static type system. Libraries can be modularly extended and composed without modifying their sources. These abilities go way beyond any prior statically typed language. <\/p>\n<p>The problem is that these abilities come at a high cost in complexity. The syntax has so many ways of doing things that it can be bewildering. As with Macro-based languages, you are always a little uncertain about what your code is really doing underneath. The type system is just too complicated for me. The docs include &#8220;use cases&#8221; that approximate the real types to make them simpler and more understandable. That pretty much says it all.<\/p>\n<p>If you need to build big complex libraries for a large group of application programmers, this might be a good tradeoff. But I don&#8217;t need to do that. All I really want is the nice simple part of the language that cleans up Java and gives me first class functions and algebraic data types and pattern matching. For me, that part of the language is 80% of the benefits and 20% of the complexity. I predict someone will do a &#8220;ScalaScript&#8221; that hits that sweet spot, but which compiles to JavaScript instead of Java. <\/p>\n<p>I mostly wanted functional programming because it is a powerful way to do parsing and compiling. But I have decided to try <a href=\"http:\/\/strategoxt.org\/\">Stratego\/XT<\/a> for my parsing and compiling instead. <\/p>\n<p>Actually I could live with all of the above problems. The killer problem with Scala is that the tools are just not ready for prime time. The Eclipse plugin is a total fiasco. They have been working on it for years, with not much progress to show for it. They are screwed because Eclipse won&#8217;t add hooks into the JDT for them. IntelliJ is way ahead, but still has a long way to go to be production quality. The scala compiler is agonizingly slow. They have a &#8220;fast&#8221; compiler that runs preloaded in a daemon, but it mysteriously dies every 30 minutes or so. I hit my final breaking point when I wanted to debug one of my unit tests. Intellij doesn&#8217;t let you set breakpoints in tests. So I arrange to catch the assertion exception and I am warped into a bizarro world where everything has been mangled and boxed and thunked and I can&#8217;t find any of my variables.<\/p>\n<p>I wish Scala the best of luck, but I have work to do.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My experiment with Scala is not working out. It&#8217;s just not ready for prime time, and is overkill for my needs. Reluctantly, I am falling back to Java.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-562","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pfEnU-94","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=562"}],"version-history":[{"count":7,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/562\/revisions"}],"predecessor-version":[{"id":569,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/562\/revisions\/569"}],"wp:attachment":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}