Slashdot Mirror


F# - A New .Net language

Goalie_Ca writes "Neonerds.net has learned of an implementation of the ML programming language for the .NET Framework. F# is essentially an implementation of the core of the OCaml programming language . F#/OCaml/ML is a mixed functional-imperative programming language which is excellent for medium-advanced programmers and for teaching. In addition, you can access hundreds of .NET libraries using F#, and the F# code you write can be accessed from C# and other .NET languages. See the F# Homepage."

12 of 213 comments (clear)

  1. That's the power of .NET by frleong · · Score: 4, Insightful
    Smaller languages can really compete with popular languages, because the same library is available to everyone. This promotes fairness in the development tools domain (in contrast with what MS does in its business tactics).

    Although there are other languages that can run on JVM, the ease of getting inheritance and cooperation to this level is only possible in .NET.

    --
    ¦ ©® ±
    1. Re:That's the power of .NET by Beliskner · · Score: 3, Interesting
      So this compiler lets you access Microsoft's proprietary .Net class libraries. A native code O'Caml compiler can access the hundreds of libraries written in C, on a range of platforms. What's the big deal?
      You are correct. Micro$oft is constructing a Developers' Superstore - a familiar place where any developer of any language will go to code. Micro$oft is trying to achieve branding.

      This is a tried and tested method, 50 years ago you went to the clothes store and bought some clothes, electrical store and bought some electricals, mechanical store and bought a washing machine, tool store and bought some tools.

      Micro$oft is trying to construt a "Wal-Mart" that everybody goes to instead of all these disparate places. Not bad, appeals to beginners.

      Right now a new developer says "I want to learn how to code" and you say, "Which platform? What type of program - textprocessing=Perl, compiler=Haskell, generalhighexecspeed=C++, generalhighdevelopmentspeed=Java, webdevelopment=PHP,J2EE,..." Micro$oft is trying to make it so that instead of all these disparate RPMs that confuse the heck out of newbie developers, you just use one IDE - Micro$oft's IDE, same as Wal-mart. The only difference (apart from the obvious) to a newbie will be that C++ has a compile button and Perl doesn't, his questions will become gradually more complicated after that. The weakness is that a bug in the CLR will affect all languages that use that functionality, you lose bug compartmentalisation and damage limitation.

      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
  2. Re:Why don't they use Smalltalk and stop F#$% arou by dpbsmith · · Score: 5, Insightful

    Amen, brother.

    I wouldn't mind it so much if someone would IMPROVE on Smalltalk, but why do we have to spend twenty years devising languages that are not quite as good as Smalltalk (in the name of efficiency, or compatibility, or ease of learning for people that have never learned more than one computer language...)

    Smalltalk is the only language I've ever used that I felt truly extended my reach as a programmer and truly enabled me to do easily things that would have been difficult in other languages.

    It is also the only language in which I have truly taken big, complicated, rich pieces of code that did ALMOST what I wanted and spent very small amounts of time subclassing them and making them do EXACTLY what I wanted--and without having to spend hours reverse-engineering and understanding what the original code was doing.

  3. The power to lobotimize languages? by SuperKendall · · Score: 5, Insightful

    Take a look here, at the comparison of F# to OCaml.

    This is what I really dislike about .NET - the promise of multiple langauges, with the DELIVERY of multiple crippled langauges. If MS succeeds I can predict what will happen - the demise of almost any other interesting language, as developers are drawn in by the supposed "compatibility" of the C# libraries in thier favorite languages. But devoid of many interesting langauge features, combined with odd syntax for acccessing those wonderful Java, er, C# base libraries they wlll just drift to using C# (the ONLY language not neutered by the platform).

    I think you are really a troll, but in any case you bring to light a common ignorance about the whole .NET platform that should be corrected whenever possible.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:The power to lobotimize languages? by VP · · Score: 3, Insightful
      Maybe he called you a troll because you said:
      Although there are other languages that can run on JVM, the ease of getting inheritance and cooperation to this level is only possible in .NET.

      And if you had looked at the language description, you would have seen that F# lacks the following:
      • Substructures/Namespaces/Packages
      • Functors
      • Inheritance (authoring)
      • Structured classes
      • Variance on type parameters
      • Labels
      • Default parameters
      • "Printf" style formatting

      Therefore your claim, that somehow getting parts of a language to run on .NET could be beneficial in some way, rings hollow...
  4. Re:MSFT public-relations apocalypse. by matt_wilts · · Score: 3, Funny

    >I can't believe a language named "F#" got past
    > Microsoft's marketing department. Or are
    > they retarded enough to think it won't get
    >expanded to "F#@%"?

    You think that's bad? As a non-programmer I expanded "F#/OCaml/ML" to "f*ck em all"...

  5. To destroy languages is the power of .NET by Baki · · Score: 4, Interesting

    Just compare any .NET language with the original, (C++ versus the real thing, F# versus ML etc). What you see is that any language, in order to achive interoperability at this level (including inheritance etc) and thus get access to .NET libraries, needs to be mutated into something different.

    Only superficially all .NET languages are different, only superficially they are like their originals (syntax etc). In fact all .NET languages are structurally alike, only the syntax is somewhat different.

    Therefore, should .NET succeed in the marketplace, it would be an enormous loss. The choice (of languages) is just fake. In fact it is total assimilation and destruction of variety.

    I have nothing against the virtual machine idea (C# + CLR) which is 100% like Java + the JVM. That is a good principle which has its uses (just asking why not go with Java, C# merely adds some syntactic sugar but brings no true improvements such as templates or multiple inheritance). But this plan/strategy of so mutating all existing languages in all alike .NET variants is horrible.

  6. Comment removed by account_deleted · · Score: 3, Informative

    Comment removed based on user account deletion

  7. good job on the generic implementation, but... by g4dget · · Score: 3, Insightful
    Looks like they did a good job on the generics support in their runtime. In particular, unlike batch C++ compilers, they delay generation of specialized code until it's needed. That gives you the efficiency of C++ (no boxing, for example) without the bloat. This is what Sun should have done. Instead, Java has a half-baked and not type-safe genericity hack. Even the more complex proposals for Java genericity have been more limited in comparison.

    Let's just hope that the specification and implementation strategy for .NET genericity will be open. While there doesn't seem to be anything terribly sophisticated or novel in it, Microsoft could conceivably have applied for a bunch of patents and may try to keep efforts like the Mono project from implementing this.

    As for F# itself, it seems to be a closed-source distribution only, which makes it uninteresting except as a technology demonstration. Microsoft almost certainly has no intention of supporting it commercially, making it effectively an orphaned, single-platform, non-evolving system. Even if it were a commercial product, lack of an open source distribution would make the chances of its adoption nearly zero.

  8. Re:Pay more for a brand name of asprin by 3seas · · Score: 3, Interesting

    I should add that I'm so tired of Microsofts abstraction manipulations, or lies and manipulations of the meaning of words, etc...

    It's like the boy who cried wolf. At some point it just becomes more productive to simple ignore them and their distortion. While focusing on that which is without alot of crying wolf.

    Remember that developer use of .net is constrained to non-GLP work.

  9. Compromise for interoperability is not destruction by Carnage4Life · · Score: 4, Insightful

    Just compare any .NET language with the original, (C++ versus the real thing, F# versus ML etc). What you see is that any language, in order to achive interoperability at this level (including inheritance etc) and thus get access to .NET libraries, needs to be mutated into something different.

    Agreed, this is true of any mechanism that allows interoperability. Java does not allow one to effectively utilize benefits of the target platform so that it is interoperable across operating systems. Many would claim that this is a good thing. SOAP and web services are making people similarly compromise to enable building distributed applications something that is accessible to the average developer. Again this is widely considered A Good Thing

    Compromise for the sake of interoperability is something that is done all the time. The question typically is whether the amount of compromise is worth the benefits of interoperability.

    Only superficially all .NET languages are different, only superficially they are like their originals (syntax etc). In fact all .NET languages are structurally alike, only the syntax is somewhat different.

    I'm not sure what you mean by structurally alike but I'll hazard a guess and assume that you meant they are semantically alike. So far I have used 4 .NET languages to program; C#, JScript.NET, VB.NET, and Managed C++. Being skeptic I originally assumed that .NET Framework would simply be creating skinnable languages where the syntax may be different but the underlying semantics are mostly unchanged which in fact many claim is the case for VB.NET and C#.

    However, the more I used the languages the more I realized that although some similarities existed the core of the languages from my past; JScript and C++ was still in their .NET versions. I can still declare vars in JScript and best of all in managed C++ I get all my favorite C++ constructs (STL, the 4 casts, templates, etc) but can combine them "managed code" to get the benefits of .NET.

    Now there are certain compromises such as the fact that the CLR only supports single inheritance (which I believe some research language discussed a while ago on Slashdot found a workaround for) but in my opinion this is a small price to pay to be able to access my C++ objects from VB.NET or my C# objects from JScript.NET. I consider even better that there is one unified class library that I can count on across all the languages besides the language specific ones like the STL or the JScript function library.

    Disclaimer: I work for Microsoft but the thoughts expressed in this post are my opinion and do not reflect the opinions, intentions, plans or strategies of my employer

  10. Wrong, they are tools, not pieces of art by Ars-Fartsica · · Score: 3, Insightful

    The languages that succeed are those that solve a particular problem well in a particular domain, with extra points for being easy to learn and extra extra points for being used by the most people (network effects).