tag:blogger.com,1999:blog-8980149464912824496.post7806974973466370393..comments2022-03-24T15:29:37.388-07:00Comments on TechNeilogy: F# vs. Scala, My Take at Year TwoTechNeilogyhttp://www.blogger.com/profile/06377881138289568562noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-8980149464912824496.post-68195746941221195442014-02-05T06:57:39.467-08:002014-02-05T06:57:39.467-08:00> porting ... a C# version of our software to J...> porting ... a C# version of our software to Java<br /><br />Wow, I can only imagine how painful this would be without any functional constructs in Java, especially if you make heavy use of the Linq Enumerable extensions.<br /><br />I also agree with your comment that JetBrains are making the Cadillacs of IDEs. My brief foray back into the Java world using Eclipse felt like walking on hot coals: with missing language features and missing IDE features it's <i>possible</i> to get there, but every step is unnecessarily painful. IntelliJ at least made me step back from the proverbial ledge. I shall have to try out its Scala support.Anonymoushttps://www.blogger.com/profile/01796294026683849625noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-85723282496906701112014-02-04T12:15:25.116-08:002014-02-04T12:15:25.116-08:00Thanks Chris. That mirrors my own experience. I ...Thanks Chris. That mirrors my own experience. I faced a choice of porting either a C# version of our software to Java, or of porting an experimental F# version to Scala. I choose the latter, and have never regretted it.TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-43779954066774086152014-02-04T12:08:22.787-08:002014-02-04T12:08:22.787-08:00Great post. I'm a .NET veteran myself, just l...Great post. I'm a .NET veteran myself, just learning F# and learning to embrace its functional style. I now face a possible career change over to the Java ecosystem with trepidation; the existence of Scala definitely makes the move more palatable.Anonymoushttps://www.blogger.com/profile/01796294026683849625noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-61549100516741718152013-05-21T16:17:48.882-07:002013-05-21T16:17:48.882-07:00Very nice comparison.
Could you comment on how we...Very nice comparison.<br /><br />Could you comment on how well each integrates with the "lingua franca" in their respective runtimes? (how well F# integrates with existing C# code/libraries, vs. how well Scala integrates with existing Java code/libraries)<br /><br />About Nemerle: what's its status? I thought it was no longer being actively developed. I might be wrong though.Sebhttps://www.blogger.com/profile/14073139700396634688noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-52124541409776056382012-12-14T07:00:07.625-08:002012-12-14T07:00:07.625-08:00Play nice, you all!Play nice, you all!TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-74578659582073266432012-12-14T06:54:51.531-08:002012-12-14T06:54:51.531-08:00I used to be an "editor and make" type, ...I used to be an "editor and make" type, but a decade+ of good IDEs is making me soft. And the JetBrains guys are (IMHO) building the Cadillacs of IDE world.<br /><br />I'm always in favor of more language options. Nemerle and Kotlin have been on my radar screen, but so far, I've only read about them and not actually used them.<br /><br />Scala is a wonderful language, and I love it – I've spent much of the last year since the original post using it professionally. I just finished some analytics work in Scala. <br /><br />But I do think the lack of turn-key tooling is killing Scala a bit in the Java world. Most Scala enthusiasts are willing to tinker; busy Java programmers need as simple a way to try Scala as VS provides for F#. Scala needs to be right there, ready to go, ready to fill up that awkward ten minutes before lunch.TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-43780124610433293522012-12-14T06:35:22.913-08:002012-12-14T06:35:22.913-08:00Anonymous, don't be a dick (referring to your ...Anonymous, don't be a dick (referring to your remarks - enthusiast in quotes and angry). The rest of your comment was informative though. So thanks.Zimbabwe vgtjbkjkijhttps://www.blogger.com/profile/10950240139175717925noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-78827451505856078252012-12-13T18:01:05.179-08:002012-12-13T18:01:05.179-08:00Since JetBrains brought aboard some of the Nemerle...Since JetBrains brought aboard some of the Nemerle developers, I'm hoping that VS will get a killer Nemerle addin.<br /><br />Nemerle has macros, so in theory it doesn't need so much stuff baked into the language like F#.<br /><br />As the angry Scala "enthusiast" pointed out, there are some constructs that Scala has that are impossible in F#. <br /><br />It really doesn't matter though. I'd bet on Kotlin "winning out" in the long run over Scala for various reasons.<br /><br />There's just too many problems with tooling and compilation speed in the Scala world that never get worked out. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-7629054904834784302012-02-05T08:46:30.869-08:002012-02-05T08:46:30.869-08:00@missingfaktor re: higher-order functions
In this...@missingfaktor re: higher-order functions<br /><br />In this last, I think we are arguing from the same premise: that a larger collection of higher order functions is available in Scala, and more are defined as operators. The F# collection is more pared-down and austere. This may make it easier for a beginner to find things, even if a few expert tools are lacking that could shorten the code. Not a major sticking point in the usability of either language, just a subjective opinion from someone who relies a lot on code completion (relies too heavily, I sometimes fear).<br /><br />And thanks again for commenting.TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-81426914767584982822012-02-05T08:42:59.871-08:002012-02-05T08:42:59.871-08:00@missingfaktor re: OOP vs. FP
As I mentioned in a...@missingfaktor re: OOP vs. FP<br /><br />As I mentioned in an earlier reply, my comment about OOP vs. FP was not directed at the technical capabilities. These are roughly equivalent, or even – as you point out – stacked slightly in favor of Scala. <br />It was just an opinion about how the two languages “feel” to me as I’m using them, not an absolute value judgment. <br /><br />This feeling is as much about syntax and expected use of the language as it is about capabilities. F# feels like what I would expect if you locked three Haskell programmers and two Java programmers in a room and asked them to sketch out a language. Scala feels like what I would expect from three Java programmers and two Haskell programmers. Even for me, it’s a 60/40 thing, it’s perfectly reasonable that others may see things differently.<br /><br />I’m no mind reader, but this desire to create an OOP “feeling” seems deliberate on the part of the designers of Scala. It’s a perfectly reasonable tactic given the target audience of Java shops. Get them hooked by showing them familiar OOP code, then show them how much farther they can go using FP.TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-27081048766551050102012-02-05T08:42:04.850-08:002012-02-05T08:42:04.850-08:00@missingfaktor
First off, thanks for all your com...@missingfaktor<br /><br />First off, thanks for all your comments! We may disagree in places, but you make your case well. If I seem slightly biased in favor of F#, it’s probably a product of my longer experience with F# and .NET than with Scala and the Java ecosystem. <br /><br />I want to reiterate that my purpose was not to pit F# against Scala. Generally, the decision of ecosystem is made first, and then the programming language is chosen. What I wanted to do was to explain to F# programmers who find a need to work in the Java ecosystem that Scala is an excellent and natural choice. And vice versa for Scala programmers who find a need to work in .NET. I wanted to explain my experience of that process in the F# to Scala direction.<br /><br />But it was inevitable in the process that I would end up comparing the two languages, and your points are well taken.TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-33252140134425631092012-02-05T07:31:00.244-08:002012-02-05T07:31:00.244-08:00"F#’s higher-order libraries feel a little mo..."F#’s higher-order libraries feel a little more pragmatic than do Scala’s. It’s not that you can do something in F# that you can’t do in Scala, it’s just that I’m often able to find a more precise higher-ordered function quicker in the F# documentation than in the Scala documentation."<br /><br />Can you give a few examples to support your point? I have an exact opposite opinion on this one. Especially in case of collections. F#'s lacks most common higher order functions (common in Haskell and Scala I mean), and so one ends up writing more code, and has to resort to recursion more often than one might like. In Scala, like Haskell, higher order functions get job done most of the time.<br /><br />Please do not misunderstand me. This was a good post, but seemed a bit biased on F#'s side, and appears to have some technical inaccuracies, and so I thought I should point them out.Zimbabwe vgtjbkjkijhttps://www.blogger.com/profile/10950240139175717925noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-86331995236656936382012-02-05T07:22:30.826-08:002012-02-05T07:22:30.826-08:00"Both languages are multi-paradigm, but F# fa..."Both languages are multi-paradigm, but F# favors functional programming whereas Scala favors object-oriented programming."<br /><br />I am tired of hearing this one. Can you elaborate on why you think so? Can you name a functional feature that Scala does not have and F# does? On the contrary, Scala does support a few functional features that F# doesn't. It's not possible to write even a monad interface in F#. So I find the claim that F# is somehow more amenable to functional programming as compared to Scala laughable.<br /><br />I have been using Scala for more than 2 years, 7 months professionally, and my code is mostly purely functional, and makes use of abstractions which are not expressible in F#.Zimbabwe vgtjbkjkijhttps://www.blogger.com/profile/10950240139175717925noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-54847340097414409302012-02-05T07:14:13.217-08:002012-02-05T07:14:13.217-08:00"F# code is a more succinct if you’re used to..."F# code is a more succinct if you’re used to reading it, but Scala is a little friendlier for newcomers."<br /><br />F# code if anything is usually way more verbose than Scala code. Scala code has more type annotations than corresponding F# code, and declaring things like ADTs is more verbose. But at the same time, Scala has got much more powerful type system, and that facilitates design of better, more general abstractions, reducing code duplication to a great extent, and making user code very terse. I am talking about features like type classes and type constructor polymorphism, both unavailable in F#.Zimbabwe vgtjbkjkijhttps://www.blogger.com/profile/10950240139175717925noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-44530873921497281282012-01-30T13:44:08.189-08:002012-01-30T13:44:08.189-08:00IMO if you search a more simalar language to F# th...IMO if you search a more simalar language to F# than scala for the JVM than you should take a look at yeti ( http://mth.github.com/yeti/).<br /><br />It is a statically typed ML style functional programming language, with full HM typeinference. While functional is also more prominent like in F# OO can be done using structs.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-75999986441171739512012-01-30T08:16:04.104-08:002012-01-30T08:16:04.104-08:00> Nemerle is better than both
care to substant...> Nemerle is better than both<br /><br />care to substantiate? I'm interested to know what features are missing from F# in particular.<br /><br />AndrewUnknownhttps://www.blogger.com/profile/13469158397493435501noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-33002179555389392882012-01-30T06:16:15.217-08:002012-01-30T06:16:15.217-08:00"Nemerle is better than both..."
I'..."Nemerle is better than both..."<br /><br />I'm working my way around to it, lol.TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-30905165318603789622012-01-30T06:13:51.620-08:002012-01-30T06:13:51.620-08:00"I'm interested in your comment that OO i..."I'm interested in your comment that OO isn't supported well in F#. What parts do you feel are missing?"<br /><br />I was thinking more in terms of "flavor" than of capabilities. F# and Scala are both multiparadigm languages, and both support OOP very well, but in F# the functional aspects show through more clearly to the surface and syntax of the language, whereas in Scala, it's the other way around. But it's a 60/40 thing; squint at each language one way and it looks FP, look a few degrees to the other side and it looks OOP.TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-39563302808887333382012-01-30T05:14:47.931-08:002012-01-30T05:14:47.931-08:00> In fact, I'd like to throw that stone bac...> In fact, I'd like to throw that stone back by asking if<br />> it's not way more time consuming and more hassles to get Visual Studio installed<br />> (as well as all the rest that comes with it) <br /><br />Nah, it's easy. I'm an eclipse fan, but the visual studio install is scarily simple.<br /><br />You can get a fully featured F# IDE for free - download the VS2010 shell, install it, and then install the F# community release. Full integration just like that. Took me 10 minutes. And it has no C#/VB baggage.<br /><br />Plus the free VS shell has the WPF designer built in.Unknownhttps://www.blogger.com/profile/13469158397493435501noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-82813061404328302792012-01-30T05:11:03.134-08:002012-01-30T05:11:03.134-08:00Interesting comparison. I chose F# over scala beca...Interesting comparison. I chose F# over scala because it hides, or supresses, much of what I consider complex about Scala. The syntax feels far simpler and extension methods feel far easier (and less dangerous) than Scala implicits.<br /><br />Then there are F# builders - very nice. I enjoy the async stuff, and you can easily build actors out of it.<br /><br />I'm interested in your comment that OO isn't supported well in F#. What parts do you feel are missing? I've found F# to be a nicer OO language than C# (despite missing support for partial classes). The only thing it is potentially missing is Scala traits/mixins and even then I'm not sure it's such a big deal...<br /><br />AndrewUnknownhttps://www.blogger.com/profile/13469158397493435501noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-78265573897688377922012-01-30T04:53:35.917-08:002012-01-30T04:53:35.917-08:00Nemerle is better than bothNemerle is better than bothAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-51767155158274074382012-01-28T06:17:32.271-08:002012-01-28T06:17:32.271-08:00p.s. That comment also reminds me: I should have g...p.s. That comment also reminds me: I should have given a shout out to the folks at JetBrains; choosing between Eclipse and IntelliJ is like picking the first among equals. (.NET programmers will be familiar with JetBrains through their ReSharper product.)TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-75461176843943247582012-01-28T06:04:46.147-08:002012-01-28T06:04:46.147-08:00Thanks! That's a fair comment; I should have ...Thanks! That's a fair comment; I should have been more clear. My point was that getting started with open source tools was a challenge for me specifically because it was a different way of doing things than I was used to. I "grew up" with Visual Studio, and so it feels like second nature to me. For a person used to open source tools and coming to Visual Studio, the shoe would, of course, be on the other foot.TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-12465683896907010592012-01-28T01:34:33.841-08:002012-01-28T01:34:33.841-08:00Neat article and I tend to agree with most of what...Neat article and I tend to agree with most of what you said. On the downside, I don't see the point in the comparison of getting started with F# vs. getting started with Scala. In fact, I'd like to throw that stone back by asking if it's not way more time consuming and more hassles to get Visual Studio installed (as well as all the rest that comes with it) than just downloading the "default" Scala stack from typesafe? Also, the Scala plugins for IntelliJ or even more the one for Eclipse are just delightful. That being said, the rest was a nice read.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8980149464912824496.post-48055416947835422432012-01-27T18:49:21.855-08:002012-01-27T18:49:21.855-08:00Thanks! I wanted to emphasize that F# and Scala ar...Thanks! I wanted to emphasize that F# and Scala are not so much competitors as they are cousins. In many cases, the choice of .NET vs. Scala is out of the hands of the programmer. However, F# and Scala complement each other so well, that programmers can gain leverage by learning and applying both as the premier mixed paradigm languages in each realm.TechNeilogyhttps://www.blogger.com/profile/06377881138289568562noreply@blogger.com