3 ms·
F# is very much a general purpose language. The tooling and infrastructure allows one to do nearly everything that can be done in C# in F# as well, and if one n
by fsloth 9y ago
F# is very much a general purpose language. The tooling and infrastructure allows one to do nearly everything that can be done in C# in F# as well, and if one needs to use C# for something that is not really an issue because the languages are fully compatible.
True, there are some things that are best done in C# like WPF, but that is not a sufficient handicap to truncate F# from the population of general purpose languages.
- gaius 9y agoDon’t get me wrong, coming from an OCaml background I am a fan of F#. But I don’t see it going mainstream anytime soon, and I don’t think that that matters at all to anyone who uses it.
- uryga 9y agoThat's okay, but that's not what DSL means as far as I'm aware. Which is why you got the comments about F# being general purpose.
- carlmr 9y agoI agree with uryga here. F# is not a DSL. There might be confusion, because a lot of F# people like to write DSLs in F#. But it's a full on language like any other. Except for the syntax it's not even that different from C#. Just a little better in terms of little extras it offers. The only thing vs. C# which I think it lacks is support of unsafe pointer arithmetic. Which I've never really used in C# either.
- hollerith 9y agoI think you got downvoted because although your comment is plausible enough in isolation, it does not have anything to do with the thread it is attached to (even though you yourself are the originator of the thread). ADDED. You don't seem to share my preference for conversations that stay focused on one topic. Over and out.
- gaius 9y agoThere’s nothing to say a DSL can’t be a full language. Just that it is designed for and generally used in a specific domain. I don’t think MS ever intended or claimed F# would be the new C# - it is very clearly aimed at a particular niche. And there’s nothing wrong with that! Nor would any F# user see their language as a rival or competitor to C# or Python or Java or anything else.
- steego 9y agoIf F# is a domain specific language, which domain is it specific to? Hint: Functional programming isn't a domain.
- juststeve 9y agoF# to me would be a nice upgrade from powershell for ops/infrastructure code, due to terseness, a strong type system, and some similar syntactic concepts between both languages. many times i want to go 100% F# but due to the issues integrating f# i end up either having to write a lot of powershell, or shoe-horning C# classes and end up with two languages.. dont know what the fix is..
- phillipcarter 9y agoWhat are some of the issues you encounter in integrating F# with your ops/infra processes?
- juststeve 9y agoThanks Phillip for responding, I actually don't see any issues with F#, it's more: - The ubiquity of powershell and the ISE. powershell is installed on every server, and to step outside that means deploying a new compiler/runtime and its dependencies to production servers. - Doing operational tasks is easier with powershell (in the short term) because the existing cmdlets for managing servers are provided with the language. An example would be bulk updating 500k users in AD (with complicated logic that compares data between 4 or 5 other systems) - Using the Add-Type cmdlet to include F# libraries into Powershell requires a few manual steps that might break over time: https://tahirhassan.blogspot.com.au/2014/06/embedding-f-in-powershell.html https://tahirhassan.blogspot.com.au/2014/06/embedding-f-in-p... - Awareness/ecosystem - powershell feels like its being used to solve all 'server related' operational problems at the moment, and that F# is used for apps. i dont think my team mates would appreciate me solving a problem in F# unless everyone was happy about the choice of language beforehand.. Same goes for them if they wanted use python, rust, prolog. etc.