F# - A New .Net language 295
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."
That's the power of .NET (Score:4, Insightful)
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.
Re:That's the power of .NET (Score:2)
Re:That's the power of .NET (Score:3, Interesting)
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.
Re:That's the power of .NET (Score:2)
Actually to be fair the last time I saw an NT4 box without SP6 was... about a couple of years ago so there's a lot of variance. If every popular app install e.g. latest Macromedia automatically overwrites the old buggy CLR with the latest one (like MFC libs).... Wow, that could be good, very few Java app installers automatically overwrite old JVMs.
I foresee in 2 years people on /. bithcin' about Macromedia FlashPlayer v7 requiring a DRM-compliant CLR. Then in 20 years developers will become so lazy with drag-n-drop coding that every app uses CLR, then Windows XP^2 will only allow CLR apps to run and they'll deprecate the entire Win32 API. L33t Fortran, C and assembler coders will be 90 years old so nobody will be able to use "dangerous" ByteArrays.
Re:That's the power of .NET (Score:2)
The power to lobotimize languages? (Score:5, Insightful)
This is what I really dislike about
I think you are really a troll, but in any case you bring to light a common ignorance about the whole
Re:The power to lobotimize languages? (Score:2)
Re:The power to lobotimize languages? (Score:3, Insightful)
Although there are other languages that can run on JVM, the ease of getting inheritance and cooperation to this level is only possible in
And if you had looked at the language description, you would have seen that F# lacks the following:
Therefore your claim, that somehow getting parts of a language to run on
Re:The power to lobotimize languages? (Score:2)
In truth, I'm not aware of any language features that are that much more easily implemented on the
I think the difference is that with
While the mutli-langauge drive seems great at first, like I was saying I find it very disturbing that the same thing could happen to languages that has happened to OS's - we could enter a long dark period where the only real "language" you could program in is
Re:The power to lobotimize languages? (Score:2)
Re:The power to lobotimize languages? (Score:2)
Re:The power to lobotimize languages? (Score:2)
How old is
The sun integration path for generics exists since 1997. At that time the Pizza compiler was crafted by the team of Martin Oderski.
Marginal academic projects didn't have much influence before because many people wouldn't even bother to
This marginal academic project is now the foundation for Java with Generics. Java 1.5 will include generics and for Java 1.4 you can downlaod at sun a version including generics (JSR014).
However you are right if you like to say that generics should have been included from the start on.
angel'o'sphere
Re:The power to lobotimize languages? (Score:2)
This is not really fair... (Score:2)
F# is not crippled. It's just missing the module constructs of O'Caml, which as far as I know should not cause any problem to be implemented -- they just aren't yet.
SML.NET, which I think works (though I haven't checked) apparently implements all of SML, including its module language. SML's module language is even cooler than O'caml's, too.
To destroy languages is the power of .NET (Score:4, Interesting)
Only superficially all
Therefore, should
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
Re:To destroy languages is the power of .NET (Score:2)
F# is a language with type variables, type inference, and lexical closures. Those are real differences, not just syntax. I'd be overjoyed if, say, Java had support for them, but it doesn't.
(C# + CLR) which is 100% like Java + the JVM
No, C#/CLR are not "100% like" Java/JVM. C#/CLR is clearly based on Java/JVM, but Microsoft added a few features that make some difference. Among others, the CLR offers support for value types, pointer manipulation, and (experimentally) genericity. Those features do change the runtime significantly relative to the JVM (whether for better or for worse is a separate debate).
Re:To destroy languages is the power of .NET (Score:2)
You didn't mention an important one which is a big lack in JVM. That is: tail recursion. Does it have it?
Re:To destroy languages is the power of .NET (Score:2)
It i not up to the JVM to implement or lack proper tail-recursion-optimization, but up to the java compiler. I know that a (standard compliant) Scheme compiler has been written targeting java bytecode. The Scheme standard requires proper tail-recursion-optimization.
Re:To destroy languages is the power of .NET (Score:2)
No, this is not true. TRO can happen whenever a method calls another method just before returning. But the JVM lacks the primitives for expressing this concept in general and it isn't guaranteed to perform the optimization automatically, either. When a Scheme compiler performs TRO on top of the JVM, it can't be using JVM method calls.
I know that a (standard compliant) Scheme compiler has been written targeting java bytecode. The Scheme standard requires proper tail-recursion-optimization.
Java is Turing equivalent, so you can implement any language on top of it (in the worst case, as a full interpreter). The real question for CLR/JVM is whether the optimization happens naturally when you map onto its built-in notion of functions. And for JVM, the answer appears to be "no".
Re:To destroy languages is the power of .NET (Score:2)
The fully-rnrs-scheme-compliant scheme, SISC [sourceforge.net] on the JVM uses the JVM heap, not stack, where most schemes on real processors would use the processor's real stacks, munging them for tail-recursion.
Re:To destroy languages is the power of .NET (Score:2)
The JVM (basically a neutered Forth VM) can't do proper-tail-recursion the "easy" way- it lacks the required stack manipulation primitives, according to some people they left them out for security reasons at the time of design
Can you explain that deeper or provide a link to a paper?
I learned Tail Recursion Elimination is done by unrolling a recursive call into a loop.
fib(int n) {
if (n == 0) return 1;
if (n == 1) return 1;
return n * fib(n-1);
// and a call to fib-n-1
}
fib_loop(int n) {
if (n == 0) return 1;
if (n == 1) return 1;
int res = 1;
for (int i = n; i > 0; i--) {
res *= i;
}
return res;
}
This is PURE HIGH LEVEL language code, and tail recursion elimination is applied! This has nothing to do with the underlying virtual machine, IMHO.
angel'o'sphere
Re:To destroy languages is the power of .NET (Score:2)
You didn't mention an important one which is a big lack in JVM. That is: tail recursion. Does it have it?
Tail Recursion is not the issue of a VM; be it CLR or JVM. Its a issue of the language.
Java supports recursion, like all modern languages except perhaps some BASICSs.
Do you perhaps mean tail recursion elimination? Thats an optimization which is done by the compiler.
Elimination of recursion, tail recirsion or others is hard in late bound invocations. In Java its only easy doable for static or final methods.
angel'o'sphere
Compromise for interoperability is not destruction (Score:4, Insightful)
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
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
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
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
Re:Compromise for interoperability is not destruct (Score:2)
- not-OO at all (but purely functional or logical languages)
- languages like ADA or OCCAM that have completely different parallelism paradigmas
I prefer more loose integration, where different languages/environments can implement truely different paradigmas. Then you integrate for example by:
- building a 'bridge' in the C, the de-facto glue language (JAVA has JNI, almost any language has some kind of interface to C
- more coarse component mechanisms such as Corba (or COM or web services if you like)
In more specialized environments (that thus are impossible to integrate at the fine level as
Agreed, language designers != VM designers (Score:2)
This makes sense - it is wasteful and time consuming for disparate teams to reinvent the VM.
Now before getting on your high horse about these unique VMs exposing some key element that the others omit - just remember, every language is ultimately a wrapper/macro/syntax rewrite of your CPUs intruction set. Raising the level of assumption to the VM level is realistic.
Now admittedly Parrot does not encapsulate a lot of the features in .Net (security, data abstraction, object pooling...etc etc), but its a step in the right direct.
Don't underestimate .Net - it makes sense.
Re:Compromise for interoperability is not destruct (Score:2)
Re:Compromise for interoperability is not destruct (Score:2)
References? (Score:2)
Re:References? (Score:2)
Re:Compromise for interoperability is not destruct (Score:2)
Other languages may be less severely chopped. E.g., C++ doesn't use multiple inheritance very much, and a version of interfaces would probably be a adequate substitute. And Ruby and Smalltalk don't use multiple inheritance at all. I'm not really sure where Common Lisp falls. The importation of modules isn't the same as multiple inheritance, but it does have similarities.
If you want to look at the possibilities, check out the page "Languages for the Java VM" (sorry, I don't have the URL right to hand).
A virtual machine is really just a high level assembler language. You can probably do anything with it, but some things will be more expensive than others. And these won't necessarily be the same things that are implied by the underlying hardware.
FUD (Score:2, Insightful)
.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.
Re:To destroy languages is the power of .NET (Score:2)
In my experience, multiple inheritance kills reuse, and is somtimes so overused that you get a complex, rootless graph of classes. I actually dislike multiple inheritance. Now, I freely admit that this could be product of ignorance of the the intelligent use of the feature.
By contrast, I genuinely like the Java system of interfaces. It adds a "works-like" or "can-do" semantic to the traditional object semantics of "is-a" and "has-a." In my experience, it is easier to keep clean and extend, and it doesn't really overcomplicate the class heirarchy.
Mind you, I've programmed in C for nearly 20 years, so it took a long time to really become an OO programmer instead of a C programmer who uses class libraries -- which is what I believe about 60% of C++ programmers really are. I think C++ took off because of the relatively easy transition from C, but I think all of my complaints about C++ come from the holdover baggage of C.
Things I dislike in C++
o "virtual" Sure, high efficiency, but can make for real confusion. "Which method got called?" I like Smalltalk and Java better on this.
o Multiple inheritance. I like interfaces. Please tell me why I'm wrong (the ony cure for ignorance is confession).
o Operator overloading (this is also something I like). Here my complaint is bad use of operator overloading. How am I supposed to know what it means to increment an Employee?
o Memory management. Being an old C and later C++ man I was highly dubious about Java's garbage collection model. One month of Java and I totally changed my tune. An entire class of bugs simply disappears. With Java "It compiles, therefore it works" became almost true. Never in C++.
o Pointers and instances. I don't like (and its just for cleanliness reasons -- not on principle) that you can instantiate an object both by declaration and allocation. In practice, I've ended up using object pointers all the time. When I mix object pointers (read references) and declared objects I end up confusing programmers who must maintain my code in the future. (Should "payment" be deleted or just go out of scope?)
o No root class. In Smalltalk and Java you get many advantages from having a root class that at some point every other class inherits from. In fact, it gets rid of many of the cases where templates are required in C++ (but not all -- I do like templates!)
Things I really like about C++:
o Templates. You can't beat 'em.
o Operator overloading. When you use it well, it's nice. One bit of code I wrote a long time ago that I use over and over again is a file-backed array class. Overload the subcript operator and your go right to line "n" of a text file. It works so well I haven't had to change a bit of code in it in five years.
o Speed. Java sucks on speed. It just does.
o Destructors. I really miss destructors in Java. Even though I consider it a small price to pay for losing the memory management/pointer bugs that are so easy to make in C/C++, it is nice (REALLY nice) to have a method that is ALWAYS called when the object is destroyed (no longer used), as opposed to when it happens to get garbage collected. This is especially noticed when dealing with resources outside of the language, like DB connections and sockets to external services. Sure, you code around this, but a destructor is really nice.
So, set me straight!
(No holy war intended here -- I love almost all the languages I've programmed in for one reason or another. They all have their uses.)
Re:To destroy languages is the power of .NET (Score:2)
As a language, what does C# (or any
Yes, there are differences in licensing. But as we all know, CLR's openness is mostly cosmetic. Key to real usage of CLR shall be the standard class libraries, which are not open and only available on Windows. Really, this licensing issue is so weird. People keep complaining about Sun, where Sun has learned the hard way that they have to play it hard to avoid perversion of the Java standard as a platform neutral technology that runs everywhere.
Microsoft tried to subvert this, they almost succeeded; only after years of legal battle and sharpening of licensing rules Sun could avoid fragmentation and MSFTs usual 'embrace and extend' way. After MSFT saw they could not do this with Java, they even completely dropped it and came up with
In practice, Java runs on almost any platform around. In practice (even though CLR is supposedly open)
Re:To destroy languages is the power of .NET (Score:2)
well said! though, it's not highly recommended (at least from my past expereience) to try running a weblogic java app server on a win 2K box, it is possible and does work.
Re:To destroy languages is the power of .NET QWZX (Score:2)
Re:That's the power of .NET (Score:2)
Re:That's the power of .NET (Score:2)
The CLR assembly code is based on the intermediate code from the Microsoft C++ compiler that existed several years before Java was made public. The byte code format of the Java VM and CLR are completely different. Java is a virtual machine and CLR is an intemediate code format of an object oriented compiler.
C# is essentially a wrapper for the CLS API.
Which is what you would expect from a modern programming language, remove all unnecessary inconsistencies you can.
C# does have features that no other mainstream programming environment has had since the Lisp machine. All managed objects can be querried to examine the metadata, the programmer can define attributes of their own to be included in the metadata.
What this means is that you can write a new data structure foo and then call XMLSerialize (foo) without having to do any more code. If you want to serialize to a specific schema you decorate the data structure definition with attributes. There is also a tool that does this for you.
The really cool thing about .NET for language developers however is that you get access to all the tools of a high quality programming environment without a lot of work. You get the debugger, the class browser, access to the .NET libraries, and the language sensitive editing.
Re:That's the power of .NET (Score:2)
The CLR is clearly a knockoff of the JVM, but it is not a "cheap knockoff". With the CLR, Microsoft fixes problems that Sun has promised to address years ago but failed to do anything about. I, for one, am tired of listening to Sun's unfulfilled promises.
Microsoft has finished screwing customers, and is on to screwing programmers.
I have no doubt that if you become a Microsoft customer, you will get screwed. But the open C#/CLR implementations (Mono, P.NET) look a lot more promising than the open Java implementations (gcj, Kaffe), in terms of completeness and conformance to a published specification (ECMA C#). And the reason for that is that Sun did not want the competition and Sun did not want an open, well-defined specification, while the existence of Java forced Microsoft to be more open than they usually would be.
Re:That's the power of .NET (Score:2)
In fact, with alternative hardware platforms such as PPC and ARM diluting the hold of x86-based Linux, anyone now writing end-user Linux apps in something other than Java should pause to consider how accessible and maintainable their products will be.
I agree Java will certainly face a challenge from the Dotnet platform. F Sharp is a very clear warning signal to Sun, and it won't just be academics who want to move on from C++ and Simula 67.
Re:That's the power of .NET (Score:2)
I make a living coding Java on Linux. Frankly, your statement is silly. First of all, JDKs on the "other" processors are well behind current x86 releases (ppc at 1.3.0, arm at 1.3.1, x86 at 1.4, for example). Second, having to deal with with what Java version is on the end user's machine leads to most of us distributing the JRE with our code. That means separate packages for each platform, and, given point one above, either limiting supported platforms or using an LCD java version.
Given those (and other) issues, I think I would seriously consider C or C++ with perhaps wxwindows as the GUI toolkit for future end user apps. Java's standard library is nice, but the performance, memory and distribution hassles are (or can be) a bitch. Of course, they are somewhat balanced by Java's nice (not perfect, but nice) standard library and the fact that Java the language is easy to build good code in. It has warts, yes, but nothing to compare to the disfigured freak that is C++. Back on the first hand again, C++ and C leave the door open for additional end user niceties because they aren't using up all the cycles and bytes just standing still (modulo coder skill, of course).
Not that I hate Java, mind you. Again, its standard library is pretty damn nice (not perfect, but what is?) and the language itself is, IMHO, better than C++ from an every day point of view. I just think that its hype factor is still too damn high.
Re:That's the power of .NET (Score:2)
How can the point be silly if you've decided to code in Java? Or are your technical choices made at random?
Second, having to deal with with what Java version is on the end user's machine leads to most of us distributing the JRE with our code.
That's bizarre - most companies do precisely the opposite. For example, BEA provide a WebLogic install specific to Windows that does include a VM, because Windows is a relatively well-defined base, but for Linux, Solaris, HP-UX etc. they provide one without. This is because they realize that choosing a VM on these platforms is generally the job of a sys admin and not something that their product alone should dictate.
Given those (and other) issues, I think I would seriously consider C or C++ with perhaps wxwindows as the GUI toolkit for future end user apps.
I suspect that there's some hollow laughter from other
Java's standard library is nice, but the performance, memory and distribution hassles are (or can be) a bitch.
Performance is good enough to run high-volume transactions behind innumerable web sites. It's also good enough for intensive GUI work (e.g. JBuilder). Memory demands don't seem to be a problem, after all, people are developing apps that can run on phones. 'Distribution hassles' presumably refers to the same self-inflicted 'problem' above.
Re:That's the power of .NET (Score:2)
I stand by my original comments. I never said I wouldn't use Java, just that it is certainly not the no brainer, silver-bullet sollution for cross-platform development that the hype machine makes it out to be.
Re:That's the power of .NET (Score:2)
What do you mean by "all"? There is effectively only one closed Java implementation on any platform: the one from Sun; all others are derived from it in one way or another. Even legal issues aside, the Java platform simply isn't well-specified enough to have any interoperable, fully independent implementations.
In fact, with alternative hardware platforms such as PPC and ARM diluting the hold of x86-based Linux, anyone now writing end-user Linux apps in something other than Java should pause to consider how accessible and maintainable their products will be.
Anyone writing applications in Java (meaning, Sun's Java language and the Java2 APIs) for Linux should consider the folly of writing open source applications that depend on a proprietary runtime and set of libraries. Sun can pull the rug out from under open source Java efforts quickly by changing the licensing terms on their "standard" Java libraries.
And the closed Java implementations on Linux and BSD are a lot more promising (as in production-ready) than Mono et al.
The closed source implementation of Java is not really suitable for open source work on Linux unless you want to hand the keys to Linux to Sun. And you can guess what they would want to do with it.
The real choices for a Java-like open environment on Linux are the Java language with the JVM and non-standard libraries, or ECMA C# implementations, adding additional .NET features as needed. Neither choice is perfect, but ECMA C# is at least a well-defined target.
Re:That's the power of .NET (Score:2)
Anyone contemplating developing Java on Linux applications should read the following to set their mind at rest:
1. The list of already existing and completely open VM and class library ports at Kaffe.org. Sun can do nothing to restrict any of these clean-room developments, nor has it shown any sign of wishing to.
2. Sun's Community Source license [sun.com]. This explains the terms on which Sun's own code is shared. Note that this license has proven open enough for the Blackdown Linux [blackdown.org] port to be developed. Interestingly, the Blackdown group have listed [blackdown.org] what they would ideally want from Sun to keep their implementation fully compatible, and a "better definition" of the Java platform doesn't appear to be needed.
Attempts by Mono developers and other interested parties to discredit Java-on-Linux should be treated with great caution. Not only do they try to represent Sun and IBM as imposing more restrictions on open developments than Microsoft (presumably their status as actual open source contributors counts for nothing against the neutral and fair-dealing Redmond empire, well known for its 'embrace' of standards) but they deliberately misrepresent what parts of Dotnet are actually open and standardized. Any open app that uses a Dotnet GUI (Windows Forms or Web Forms) or database API (ADO.NET) is not using standard mechanisms - these APIs, and in fact over 1000 of the 1200 classes in Dotnet today, are entirely proprietary and are protected by patents.
Oh, and I didn't use the word "all" - et al translates as 'and others', a somewhat different meaning.
you are confused (Score:2)
So? Kaffe is not an implementation of the Java platform. It is a VM with a bunch of classes that conforms to nothing in particular. In fact, as far as VMs go, there are better open source VMs out there; Intel's ORP, for example, beats Sun's JVM on many benchmarks. But a VM is not an implementation of the Java platform, it is only a tiny component.
Sun's Community Source license [sun.com]. This explains the terms on which Sun's own code is shared. Note that this license has proven open enough for the Blackdown Linux [blackdown.org] port to be developed.
I suggest you actually read the SCL some time. You will see that Sun retains all the important rights. Of course, they let Blackdown do a port for now. If Java on Linux stops suiting Sun, they can shut down the effort easily.
Attempts by Mono developers and other interested parties to discredit Java-on-Linux should be treated with great caution. Not only do they try to represent Sun and IBM as imposing more restrictions on open developments than Microsoft
I made no such claims; you are arguing a straw man.
Any open app that uses a Dotnet GUI (Windows Forms or Web Forms) or database API (ADO.NET) is not using standard mechanisms
So? And your point is what? With ECMA C#, we at least get a set of standard libraries that is considerably more complete than what other language standards (e.g., C, C++, CommonLisp) offer. There is nothing comparable for Java. For Java, we only get Sun's proprietary documentation and a bunch of books.
these APIs, and in fact over 1000 of the 1200 classes in Dotnet today, are entirely proprietary and are protected by patents.
Can you back up those claims with some facts?
Anyone contemplating developing Java on Linux applications should read the following to set their mind at rest:
I think anybody following your advice is a fool. When choosing a language and environment for open source development, we need binding commitments that it remains open and a well-defined language and library standard. ECMA C# represents such a binding commitment and standard. There is nothing equivalent for even the smallest part of Java.
I used to think Java could fill the niche of a next generation application development language on Linux. But Sun has backed out of all commitments and is instead pushing "community" processes in which they retain the ultimate control over large parts of the Java platform.
Maybe the open source C#/CLR efforts won't work out. Maybe Microsoft has some devious master plan and a bunch of aces up their sleeve. But whatever the situation with C#/CLR, I'm convinced that Java is not the answer. If you don't trust the open source C#/CLR efforts, my recommendation would be to stick with C/C++ for the time being, or use one of the many other open source languages.
Re:That's the power of .NET (Score:2)
Again, there's mono. "Proprietary extensions" are not really a problem. Microsoft add "proprietary extensions" to C++ all the time, it doesn't stop me using C++ (I just ignore their extensions, and their C++ development tools ;-)
Re:That's the power of .NET (Score:2)
Of course, Microsoft will extend the hell out of C#/CLR, just like Sun keeps adding APIs to Java. Both are trying to make their platforms so big and complex that they are unclonable and that they stay in complete control.
The difference is that for C#/CLR, we get an open, well-defined standard: ECMA C#. It defines a lot more APIs than standards for, say, C or C++. It's a good basis to start from. Furthermore, most people just won't care whether their Mono code runs with Microsoft's C# implementation or not--it just isn't relevant what Microsoft does.
As I said in my previous post, I don't know whether C#/CLR will work out for open source development. It may well not. Give it a year or two. What I do know is that Java definitely isn't working out: Sun has failed to follow through on most of their commitments, and technically, Java has failed to evolve much as well.
I'd trust Sun over Microsoft any day.
I consider it foolish to trust either company. What I trust is a standards process and an open source implementation of the standard with a well-defined license. ECMA C# has both.
Re:That's the power of .NET (Score:2)
I suggest you read a book like "Compiling for the
Re:That's the power of .NET (Score:2, Insightful)
And the JVM is a cheap knockoff of P-CODE [ic.ac.uk].
"The intermediate code produced by the Pascal-P compiler." And this was in 1976.
Full name of F# (Score:3, Funny)
Re:B# (Score:2)
Re:B# (Score:2)
Your second example was screwed up. You probably meant E# == F.
Although it is true that B# is the same note as C, that is, you strike the same key on a paino keyboard, there are sometimes good reasons to write the note as B# instead of as C-natural. Here is an example. In key of C#, what notes are in the scale? Simple: C#, D#, E#, F#, G#, A#, B#, C#. Key of 7 sharps.
You put 7 sharps on the staff to indicate the key. So when a C note is written it means C#. So how to you indicate a C-natural? It would be ugly to have to write a C note followed by a natural symbol everywhere you wanted a C note. But if you just put a B note, which is intuitive in this example, it means B#, since the B# was indicated in the key signature on the staff at the beginning of each line of music. Yes, you're striking the C-natural note (which is B#), but the music typesetter writes it as B#. Now re-read the above, but first:
s/B#/E#/
s/C natural/F natural/
Re:Full name of F# (Score:2)
Oh great, yet another language to learn! (Score:2, Interesting)
Re:Oh great, yet another language to learn! (Score:5, Insightful)
Think I'll stick to what I know, instead of trying to learn more and more...
Isn't this the perfect way to fall behind? I think the only way to actually stay on top of things and keep informed is to be willing to keep learning. If you stop learning you will quickly grow ignorant of what is going on in the world and everyone else will get ahead of you. I prefer to keep learning the therefore hope that I will never adopt your additude towards new things.
I have to say, to your defense, that .NET and everything that comes from it has a very good chance of being no more than a publicity stunt from MS. But since the people who made C# were quite competent before MS hired them (and may still be), I will have to look at it at some point, to evaluate it if nothing else. The same will be the case for F#. I will look at it and see it as a chance to learn something new and become a better and more wise programmer.
Re:Oh great, yet another language to learn! (Score:2)
Yes, by all means, read some of the pro-MS propa- err... articles on .NET and find out what people being paid by Microsoft are saying about it. You'll be just one step closer to enlightenment!
Mediocrity is bliss.
Re:Oh great, yet another language to learn! (Score:3, Insightful)
That's quite a generalisation. Bert Meyer likes .Net. So does Miguel, enough to implement a substantial portion of it. Are these guys being "paid by Microsoft" ? If C# is "a java ripoff", why doesn't Miguel use Java instead of C# ?
I haven't formed any strong opinions on .Net, because in my case, not being an expert is an
obstruction to forming strong opinions. Not so with a number of the resident slashmonkeys, apparently.
What is the point? (Score:2, Flamebait)
Re:What is the point? (Score:5, Insightful)
Teachers of real CS courses have been teaching functional programming since before Java was a blink in the eye of its creators. ML, Haskell, Scheme are such are far more popular in CS academia than they are in industry, and OCaml is arguably one of the most powerful functional (-based) languages around. Sorry, but I don't see your point.
I agree, but... (Score:2)
I personally feel that students would be better off learning one of the realworld languages or at least languages which real world languages were based on such as C, Simula or SmallTalk or Java (since C# seems to be based on that). At the same time it should be, IMO, a part of every CS course that students should learn to write well commented code that is legible to maintainers etc.
Re:I agree, but... (Score:2)
Yes, but some languages encourage it. Classic Fortran, APL and Perl are both languages where normal code approaches unreadability. You want to teach students in a clean language, so that they have more of a tendency to write in that style.
*it doesn't actually do any more than C*.
In a pedantic sense, this is true of every language from Intercal to Perl. In an unpedantic sense, yes, actually, it does. Or did you miss sets and nested functions? And if you don't want to learn a language that doesn't do more than C, why are you complaining about languages like O'Caml, which goes huge steps beyond C in some areas?
I personally feel that students would be better off learning one of the realworld languages or
Why? A computer science degree should teach more than how to hack out code, and any decent computer programmer can pick up the basics of a new language in a day, provided it's similar to one they've already learned. If you want realworld languages, why didn't you include Fortran or COBOL, possibly the two most used languages in the world?
Re:I agree, but... (Score:2)
Writing millions of lines of code projects is a different goal to learning some basic programming concepts. The best tool for one of these goals may or may not be the best tool for the other.
Getting the concepts across is the whole point of teaching. You succeed if and only if you get the concepts across. Languages are easy to learn, but paradigms are very difficult. I've become a better C++ programmer by learning ML, Python and Perl. I don't use ML in my work, and probably won't in the forseable future, but it's exposed me to paradigms that a flexible "real world" language like C++ wouldn't have forced me to learn.
I personally feel that students would be better off learning one of the realworld languages or at least languages which real world languages were based on
The goal of taking a course is not to learn particular technologies. You have trade certifications for that sort of thing. Students need to learn not just one language, but several, to gain broad exposure to different programming paradigms. A good degree will inevitably include some "real world" code, because you need real world languages to get "close to the metal", so courses like operating systems involve some C.
At the same time it should be, IMO, a part of every CS course that students should learn to write well commented code that is legible to maintainers etc.
Things like this are the tip of a large iceberg-- you can only really learn to comment properly from experience. Most student code is simple enough that only the headers need to be commented.
The problem is that it's very difficult to teach "real world programming" within the constraints and limitations of classes. The classes typically only run for a semester, which means that school will not give you much of an idea of what it's like to work with a large codebase over a long period of time.
Useless in the real world?! (Score:2)
Ask any ML advocate (or Google), and they'll point you to a list of real-world uses of ML and its brethren, including the back ends of several big-name products. These tools are eminently suitable for real-world use, and a remarkably high proportion of those who've tried and documented their results have done well.
The fact that these languages are not more widely used, given their demonstrated potential, is more a sad indictment of the "professional" software development community than anything else.
Re:What is the point? (Score:2)
Cut-down versions of langauges under .NET? (Score:2)
You appear to have exactly the same concern as me. Microsoft's "C++ Managed Extensions" and the version of "C++" you can run under .NET are far from the C++ I know and use every day. C++ without MI, templates, most of the standard library, etc. is not really C++ at all.
Now, given that, almost implicitly, pretty much anything you write in OCaml is generic to some degree by default, it's going to be interesting to see what, if anything, they can do about that under .NET. If they have to effectively emulate that genericity, the performance is going to take a Big Hit(TM), as is the credibility of MS' claims about .NET. If, OTOH, .NET can support concepts like generics well either now or in the near future, MS' credibility is going to go way up.
Re:What is the point? (Score:2)
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>F#</title>
<meta name="Microsoft Theme" content="arcs2 000, default">
<meta name="Microsoft Border" content="tl, default">
... no wonder it doesn't render right in Mozilla. Of course, the ugly buttons gave it away...
Re:What is the point? (Score:2)
Yes you do.
Re:What is the point? (Score:2)
Re:What is the point? (Score:2)
I see a pattern... (Score:2)
win95, win98, win98se, winmx, win2k, winnt, wince, winme...
activeX, vbs, asp, j++...
and now c# and f#.
I foresee in the near future g# h# j# k# and n#.
(i# and l# are skipped to annoy IBM and Linux people)
Re:I see a pattern... (Score:2, Funny)
Well, musically speaking...
Yes, that is the standard sharp-notation. But this is Microsoft we're dealing with here, so I'm sure they'll embrace and extend to the rest of the alphabet as the previous poster suggested.
Why don't they use Smalltalk and stop F#$% around? (Score:2, Interesting)
Re:Why don't they use Smalltalk and stop F#$% arou (Score:5, Insightful)
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.
SmallTalk is dead, get over it (Score:2)
Re:SmallTalk is dead, get over it (Score:2)
You mean like IBM? Last time I heard, VisualAge's IDE (and probably more) was written in Smalltalk.
but at this point the prospects for this language having a real imapct is zilch.
You mean, besides the impact it has already had? Smalltalk's OO strongly influenced how Java's OO was set up, among other things.
Throw it up on the scrap heap with Lisp and the other dead way-cool languages.
Um, Lisp? You know, the language that drives Sawfish and Emacs? It's hardly dead.
What is it with people's desire to throw away all languages but a couple of the cool new ones? A compiler doesn't stop working because some one comes up with a new language; and a large part of the reason these languages die is because people go "does anyone use that language anymore" and use something different, whether or not there's actually support for the language, or whether or not it would be the best language for the job, or whether or not you would enjoy writing it in that language most. Guess what; there are good compilers for Ada and Lisp and O'Caml and Smalltalk on Linux and all major platforms, and besides the libraries which do exists, all those languages may interfacing C from them easy. If you feel like it would be easiest to use them, or it would produce the best code, use them! Maybe it will provoke a renassiance in the language; or maybe it will just get the job done well in an enjoyable fashion.
Re:Why don't they use Smalltalk and stop F#$% arou (Score:2)
Why do people have to reinvent the wheel a thousand times, but never succeeding in making it truly round? WHAT advantage has Ruby over Common Lisp or Smalltalk? WHY did it have to be made? What, as a language, can it do that Smalltalk or Common Lisp can't? It's a waste of time, really.
Re:Why don't they use Smalltalk and stop F#$% arou (Score:2)
Comparing ruby to common lisp doesn't make a whole lot of sense, they're substantially different beasts. Can you write GUI applications in common Lisp ? (and would you want to ?) Ruby has more of an OO bias, while Common Lisp has a functional bias (though both are multi-paradigm).
As for comparing it to smalltalk, IMO the main advantage Ruby has is that it's better at interoperating with the rest of the system. Smalltalk is great in a hypothetical universe where everyone programs in SmallTalk, but unfortunately, the real world doesn't work like that.
It's not a question of "what (x) can do that (y) can't". You can do everything in assembly language , however, you may find some tools more convenient.
Re:Why don't they use Smalltalk and stop F#$% arou (Score:2)
Perhaps, in the event that you read this response, you should read this article [google.com]
and perhaps be enlightened (or not).
I use ruby because I like it, simple as that. I've used a bunch of other languages, not common lisp, but scheme, ML, and a little bit of smalltalk (among others). And it just happened that ruby has won out at this point, possibly to be replaced by liking some other language (though probably not common lisp or smalltalk) some day.
Anyone seriously thinking about the concept of reinventing the wheel should note the dramatic differences between the wheel that goes on the bottom of a 747, and the wheel used on a wagon 4000 years ago. Though it does seem like what you are asking is more like 'why doesn't everyone use common lisp, because it is the best language ever!' than actually 'why do people reinvent the wheel?'
And posting on slashdot is much more of a waste of time than writing a language.
Re:Why don't they use Smalltalk and stop F#$% arou (Score:2)
Re:Why don't they use Smalltalk and stop F#$% arou (Score:2)
Anyhow, there are plenty of better candidates for 'redundant language' to pick on (XML and its myriad of ways to computational completeness, Python, Javascript...)
Support for .NET generics (Score:2, Informative)
So it looks like there are releases of Microsoft's jitter that have full support for execution-time expansion of generics. I can't wait!
Remember April 1st? (Score:2)
I'm not anti-MS by any means but even I can notice that this F# have very limited appeal. Posting an article about it, is very suspicious.
good job on the generic implementation, but... (Score:3, Insightful)
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.
Pay more for a brand name of asprin (Score:2)
I'm not interested in it. In fact I'm less then zero interested in it, as the generic brand contains the same ingredients and cost a whole hell of a lot less.
For those stuck on words used. Microsoft is a brand name. GNU, FSF, GPL is the generic indicator, organization of establishing the generic and the licensing of the generic that insures it stays that way.
Re:Pay more for a brand name of asprin (Score:3, Interesting)
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
Languages - an art form (Score:2, Informative)
They ask, "Why bother creating another language? There is quite a number of them out there. Any of them should be able to solve almost any problem out there."
Programming languages are an art form, and like any other art form, it deserves respect. Each programming language forces a programmer to think about a problem in a slightly different manner. Prolog forces a programmer to think in terms of goals to be achieved, and OO languages force a programmer to think in terms of self contained parts of the problem. Different programming languages make it easier to solve different types of problems. Haskell is a great language to represent infinite sequences due to its use of lazy evaluation.
Would you tell a musician to not experiment with sounds not created by traditional instruments because there are so many musical instruments out there for him/her to use, and that any musical piece can be performed with any of them? Musicians come up with new sounds all the time because those new sounds allow them to view music from another perspective
Wrong, they are tools, not pieces of art (Score:3, Insightful)
A terrible loss (Score:2)
Sure, it's F-unctional/imperative, but there are other Functional/imperative languages, how come they got the priviledge on the F? It's a non-intuitive choice for something based on ML, and it takes over the F...
How many headlines in SatireWire et al could have been based on that F#? How many inside jokes, idiomatic expressions? An important piece of the
Can you use "this F# S# is not compiling!" anymore? No, because it might not be implemented in F# and would confuse your co-workers, who would have otherwise understood your feelings exactly. We will see, ad nauseam, co-workers mocking poor F# developers with jokes that, in the pretense of sophistication
Confusion in the workplace will stifle any creative idiomatic use of F#, nagging by co-workers with repetitive jokes will stifle any creative alrogithmic use. F# will die and will kill the F# with it.
Saying just "piece of S#!" is not the same. And how long before even that is removed, when they implement Smalltalk in
Why, Microsoft, why?!
E# (Score:2)
Too long (Score:2)
I've got all day (Score:2)
F#UCKING C#UNTS, I say.
doo bee doo bee doo bee doo bee doo bee doo bee doo bee doo bee
What the world needs is an interesting experiment (Score:4, Interesting)
I thought the whole point was that this wasn't a new language, but a .NET port of OCaml, which is an existing and well-regarded language whose blend of functional and OO/imperative style has been quite successful in the past.
Now, the interesting thing here will be the performance they get out of it, and how easy it is to take advantage of the .NET libraries. One of OCaml's major claims to fame is that, while being a pretty high-level language, its output code is often close to the efficiency of well-written C or C++. Another big claim to fame of functional langauges in general, and OCaml in particular, is that you can write very concisely. Given that the .NET framework is obviously geared towards OO languages that are isomorphic to VB.NET/C#, it will be interesting to see whether a language that works in a significantly different way can still hold its own in performance and usability terms.
The answers will be a pretty significant indicator of whether .NET really is a well-designed, multi-language framework, or whether it's just a commercial spin on a small number of language in an MS-dominated marketplace, with added corporate buzzwords. I think a lot of serious, open-minded programmers would like to know the answer to that one right now.
Re:C#, F#... (Score:2)
Take a look at a piano
Re:C#, F#... (Score:2)
More songtexts of them [geocities.com]
Re:MSFT public-relations apocalypse. (Score:3, Funny)
> 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"...
Re:MSFT public-relations apocalypse. (Score:2)
Or.... for the paranoid out there... perhaps with the federal prosecution being dropped and everything else, this is MS's statement directly to programmers:
"Programmers??? F#/OCaml/ML"
Re:MSFT public-relations apocalypse. (Score:2)
Eventually, Microsoft will release a simplified version of F#. They could call it BrainF#.
Re:Will there be.....? (Score:2)
Re: (Score:3, Informative)
Re:Grow up. Please. (Score:2)
Slashdot is a bit less pro-Debian than it once was, perhaps, but it's always been pro-Linux and anti-Microsoft. Your user ID doesn't suggest that you've been around long enough to know, though.