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."

9 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 RetroGeek · · Score: 2, Insightful

      the CLS runtime is a cheap knockoff of the JVM

      And the JVM is a cheap knockoff of P-CODE.

      "The intermediate code produced by the Pascal-P compiler." And this was in 1976.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
  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. 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.

  5. 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

  6. FUD by Hard_Code · · Score: 2, Insightful

    Well, I am a fulltime middleware Java programmer, and have no particular love for MS, but your post is mostly FUD. Microsoft is not trying to ingratiate themselves to *US*, the Slashdot crowd (duh!) - they are trying to jump off their legacy languages (VB, C++) into a J2EE-like world (which Java has had for years now), and to this goal, .NET/CLR is a pretty damn good architecture. The things which it *does* have over Java which are actually nice, is, for example, optional "unsafe" keywords for native integration, and auto-boxing (which Sun has now planned to introduce to Java in 1.5). .NET is a great platform for current Microsoft developers to migrate to a web-services/J2EE-like world, and it does a damn good job at it. I know if I was an MS developer I sure would rather develop in .NET/CLR/C# than the crap that they currently have to deal with (VB/C++/MFC/ActiveX/COM+).

    .NET is a good architecture for what it is designed for. That doesn't mean MS is not still going to try to do something evil with it, but it is plainly dishonest to spew FUD like that against it. Read the spec before bitching.

    --

    It's 10 PM. Do you know if you're un-American?
  7. 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).