8 ms·
The biggest for me is needing to understand the .NET ecosystem without knowing C#. Then there's the lack of beginner information. I own several F# books and non
by 7thaccount 5y ago
The biggest for me is needing to understand the .NET ecosystem without knowing C#. Then there's the lack of beginner information. I own several F# books and none of them assume you're coming from a scripting language background. I eventually gave up for good. OCaml doesn't have the .NET problem, but I found it to be unergonomic in a lot of ways.
Make no mistake, it's a cool language that I'd love to be good at. The code always looks elegant, I'm just terrible at writing it.
- orra 5y agoAh, that's interesting. I'm a huge fan of F#, but I had the advantage of knowing .NET first.
- Decabytes 5y agoThis was my issue when trying to learn clojure as well
- billfruit 5y agoYes, my experience as well. Clojure is more "lisp for java programmers" than "java for lisp programmers". Most of introductory material I found was good in explaining functional concepts, lisp approach to solving problems etc, but I thought assumed a working knowledge of the JVM ecosystem. For someone utterly unfamiliar to Java/JVM world would find clojure extremely baffling, cryptic error messages, needing to be familiar with the rather large java standard library, etc.
- 7thaccount 5y agoSame. F#, Clojure, Scala, & Kotlin have all been the same for me. Python's VM is written in C, but I have no reason to know C. In Clojure they have you call out to Java libraries a ton. Someone always tells me that this isn't true on here, but it was my experience as well. Having to learn so many tools like emacs or CIDRE or Leinegen was also a turn off.
- gorjusborg 5y agoI really love Clojure, but I have a lot of experience on the JVM so I didn't have to climb multiple learning curves simultaneously. While the clojure ecosystem has a lot of wonderful, bright and helpful people in it, and clojure itself is technically impressive (esp. its collections implementation), the new user experience isn't great. I'm not an experienced emacs user, so that makes it doubly difficult, as the ironed-out workflows seem to assume that you are (which is fair, as emacs and lisp are like peanut butter and jelly). However, these days it's fair to assume that a new clojure user is probably learning 'clojure', 'lispy ways', 'java/jvm', and 'emacs' simultaneously. I think that calva/vscode has a lot of potential to drop emacs off that list, which is welcome, as its learning curve alone is legendary. If you look at that list, it should not be surprising that the community is small. There's so much to learn that I it seems too much to even start.
- barrenko 5y agoClojure is pretty cool, but I've come to understanding that as a beginner I would have been better off just learning good old Lisp.
- gorjusborg 5y agoYeah, even as a veteran java programmer, I could really only get clojure after mastering a scheme (racket). I highly recommend 'The Little Schemer' if someone wanted to tread the same ground. Such a strange and fun little book.
- kaliszad 5y agoThere are multiple options to approach the Clojure* ecosystem. But yes, it is more focused towards dedicated and experienced developers overall. I use IntelliJ Idea + Cursive for development and that seems quite comfortable. I have a very rough sketch of the environment setup for a real app here: https://www.orgpad.com/s/hfxYQYkcLYV https://www.orgpad.com/s/hfxYQYkcLYV We use a similar setup to develop OrgPad itself. You can use Babashka https://github.com/babashka/babashka https://github.com/babashka/babashka for a quick and dirty setup to get you up and running quickly. That is also useful for scripting some things. You might also try shadow-cljs + ClojureScript, if you are more at home in the Node.js/ Browser JavaScript ecosystem and want to do something with it. There is a new "(Not)Babashka" but built on ClojureScript: https://github.com/borkdude/nbb https://github.com/borkdude/nbb that might be interesting as well. I have found this video by James Trunk: https://youtu.be/C-kF25fWTO8?t=848 https://youtu.be/C-kF25fWTO8?t=848 to have a very nice live coding example.
- pjmlp 5y agoThat is the issue with any guest language, because it is impossible to hide the platform, unless the language is so constrainted that is practically useless. It is a hard to swallow truth, but guest languages really require understanding of the underlying platform. Another example, no matter one's opinion on C or JavaScript, mastering them is a much more confortable life on UNIX/POSIX platforms and browsers than trying to pretend they aren't there.
- 7thaccount 5y agoAgreed. I think you say it more succinctly. It can also be frustrating if you know a little OO (but not how Java does everything) and then try to learn a functional language that sits on top of one of these OO tar pits of an ecosystem. I can write Python classes, but seeing the complicated mess of Java is frustrating as that has to be learned as well. Nothing against Java btw (it has its place), but it does seem to require a lot of boilerplate.
- mumblemumble 5y agoFirst off -- I don't really want to get into bickering about Java is OO or not. That said: I think that Java is best understood as an enterprise programming language, not as an object-oriented one. There's a very peculiar class of programming languages that are a product of a specific period of history. At the time, companies were looking for ways to scale beyond the limits of the then-dominant procedural programming paradigm. But they had a lot of existing investment in it, and so teams were naturally hesitant to abandon it entirely. This situation created an ecological niche that allowed a very peculiar class of programming language to take root. Java and C++ are the best-known examples, but there were others such as Objective-C. C# and Visual Basic.NET are probably the last notable examples. These were multi-paradigm languages that layered object-oriented features on top of procedural bones. Earlier examples such as C++ and Objective-C made this quite explicit, and were likely to even have their atomic types not be objects. Later examples eliminate some features such as non-object types and global functions and variables, but still retain much of their procedural heritage if you know what you're looking for. Probably the most notable one here is a tendency to favor explicitly state-oriented idioms over properly encapsulating state. Java falls somewhere in the middle. It has later features like full-fledged garbage collection, but lacks others such as a consistently object-oriented type system. I think that its tendency toward boilerplate directly reflects its stage in this evolution. Basically, what we perceive as boilerplate is really a hold-over from how procedural languages tended to be generally less declarative - it was up to the programmer to handle a lot more stuff for themselves.
- rixkys 5y agoI'm surprised, I found clojure even while I was a pretty much total beginner programmer fairly easy to get into, via clojure for the brave and true at least was very good for getting the basics.
- 7thaccount 5y agoEven that involves downloading and installing a fair amount of build tool stuff which may be necessary, but just drove me away.
- WillPostForFood 5y agoClojure for the brave and true shows the exact problem. Chapter 1: install and learn the JVM Chapter 2: Emacs Chapter 3, finally start learning Clojure if you made through the first two chapters. Those first two chapters are going to filter out quite a few potential Clojure learners.
- DeathArrow 5y agoThere are several good books like: https://www.amazon.com/Stylish-Crafting-Elegant-Functional-Code/dp/1484239997/ https://www.amazon.com/Stylish-Crafting-Elegant-Functional-C... and https://www.amazon.com/Get-Programming-guide-NET-developers/dp/1617293997 https://www.amazon.com/Get-Programming-guide-NET-developers/... and also some courses on Udemy like: https://www.udemy.com/course/fsharp-from-the-ground-up/ https://www.udemy.com/course/fsharp-from-the-ground-up/ and https://www.udemy.com/course/hands-on-f-application-development/ https://www.udemy.com/course/hands-on-f-application-developm... Also there are lots of learning resources here: https://fsharp.org/learn/ https://fsharp.org/learn/ some for guys coming from scripting languages like Python. As a matter of fact, F# can be used for scripting, too.
- 7thaccount 5y agoI'm not saying that you can't write an F# script, but that the path to getting one written is not obvious to those coming from scripting languages that are much simpler than the VAST .NET & JVM ecosystems. There is always some bizarre .NET arcana that gets in the way.
- akra 5y agoSometimes that's true but I've found as soon as I need packages things get complex. I don't find F# that hard scripting wise; at times found it easier than some other languages especially when I need to import libraries into my script. Instead of needing to install a system wide pip package, set up a project with Maven/Gradle, etc around the script, etc. With F# and the like you just do something like: #r "nuget: FSharp.Data" And it pulls that third party package into your script context. Its kind of empowering when I can just copy and paste script text to my colleague (e.g. email/slack) and all they need to do is copy/paste the text into a single text file and it just works third party packages included with a vanilla .NET 5+ installation. Just run 'dotnet fsi scriptFile.fsx`. Auto-complete picks up all the new types as well. Documentation seems pretty straightforward to me: https://docs.microsoft.com/en-us/dotnet/fsharp/tools/fsharp-interactive/ https://docs.microsoft.com/en-us/dotnet/fsharp/tools/fsharp-...
- barrenko 5y agoKinda agree, but F# works much better for me with my knowledge of .NET than e.g. Clojure with my understanding of Java. It's a cliche saying, but for me F# just works! (tm)
- phillipcarter 5y agoThere's definitely room for a book or blog series along the lines of "F# for python programmers" or something. Unfortunately there's some level of .NET tooling you need to understand before you can do much today, and several .NET concepts creep in with that. The good news is that .NET Interactive is shaping up to be a great way to avoid most of that. At least so far all you need to do is install the .NET SDK, then install a VSCode plugin and you're good to go - just write code like you would in a python notebook, and acquiring packages is even easier than in Python: https://github.com/dotnet/interactive#notebooks-with-net https://github.com/dotnet/interactive#notebooks-with-net
- dharmaturtle 5y agoLinking your demo of VS Code Notebooks cause it was great: https://youtu.be/_QnbV6CAWXc?t=1298 https://youtu.be/_QnbV6CAWXc?t=1298
- devmunchies 5y agoI had the exact same problem. Even all the http servers had a lot of .net boilerplate to get started. A lot of that should be abstracted. I built an http server library that abstracts the .net parts. https://wiz.run/ https://wiz.run/ The hello world server: open Wiz.Server open Wiz.Context open Wiz.Route let myHandler ctx = ctx |> sendText "Abra Kadabra Kalamazoo!" let myRoutes = [ get "/" myHandler ] genServer() |> setRoutes myRoutes |> run
- devmunchies 5y agothinking more about it, F# needs to appeal to non-dotnet developers and other developers looking for a functional language for real workloads. F# currently seems easiest for c# dev to get started, but c# devs have almost no incentive to do so.
- SBArbeit 5y agoI could say the same thing about any language. For instance: "Python needs to appeal to C# developers and other developers... Python seems easiest for PHP devs to get started, but C# devs..." And, the truth is, no, Python doesn't need to do that at all. It just has to be the best Python it can be.
- xhevahir 5y agoUsing Python doesn't require you to learn a (big) second language before you can do anything useful, though. F# arguably does. Maybe that is the best F# that F# can be. Which, for a lot of people, is not good enough.
- devmunchies 5y agoI was thinking as a conscious strategy that would impact the way all libraries are built. In my example I posted above, there are no dotnet APIs showing. Its all abstracted. Libraries should create new APIs that are just wrappers around the dotnet library. Whereas, if you look at the examples in the Giraffe framework, you need to do a bunch of dotnet boilerplate. https://github.com/giraffe-fsharp/Giraffe#doing-it-manually https://github.com/giraffe-fsharp/Giraffe#doing-it-manually open System open Microsoft.AspNetCore.Builder open Microsoft.AspNetCore.Hosting open Microsoft.Extensions.Hosting open Microsoft.Extensions.Logging open Microsoft.Extensions.DependencyInjection open Giraffe let webApp = choose [ route "/ping" >=> text "pong" route "/" >=> htmlFile "/pages/index.html" ] type Startup() = member __.ConfigureServices (services : IServiceCollection) = // Register default Giraffe dependencies services.AddGiraffe() |> ignore member __.Configure (app : IApplicationBuilder) (env : IHostEnvironment) (loggerFactory : ILoggerFactory) = // Add Giraffe to the ASP.NET Core pipeline app.UseGiraffe webApp [<EntryPoint>] let main _ = Host.CreateDefaultBuilder() .ConfigureWebHostDefaults( fun webHostBuilder -> webHostBuilder .UseStartup<Startup>() |> ignore) .Build() .Run() 0