X# Functional Programming from Microsoft? 85
TheSync writes "SearchWebServices.Com has an article claiming that Microsoft is working on a functional language named 'X#'. The language is supposed to be data-oriented and LISP-like, but set up to handle XML."
Humorists! (Score:4, Funny)
Heh...funny. We're finally getting some humor around here.
Is .NET .DEAD yet? (Score:5, Funny)
You know.. in music.. (Score:5, Funny)
Sometimes being sharp is useful (in the right key), but if you already know the key is C, C# is not a good note to hit.
Re:You know.. in music.. (Score:4, Funny)
Tell that to any of the jazz guys that like the sound of a flat-9.
Yeah, offtopic. Who cares?
Re:You know.. in music.. (Score:1, Offtopic)
Yeah, but even then, that flat-9 is added for the effect that it is out of tune..
C# has it's place in a key of C song, just it shouldn't be used totally.
Re:You know.. in music.. (Score:2)
(I used to want to hit people in my theory classes that said stuff like that...before they could utter the phrase "Enharmonic Equivalent")
Re:You know.. in music.. (Score:2, Funny)
Personally, I just bang my fists like hunks of meat into the keyboard, giving rise to a rhythmic cocaphany of clusters and un-harmonies. As I pummel the black and white monster with my hands I hear the sounds of our society, mechanized and dissonant, like a great hulking beast trampling all things beautiful. I weep a single tear as I consider that each note is a human life, stomped out again and again by the wandering beast.
Well actually I can't play the piano at all but this helps me hide that fact.
Re:You know.. in music.. (Score:1, Offtopic)
Wrong. Being out of key is bad, yes. Being slightly sharp or slightly flat is out of key. Just being sharp simply means being one semi-tone higher. In the key of G, F# is perfectly in key. This post is just flaimbait, bashing Microsoft for no real reason.
X Hash ? or (Score:2)
2. No need for creating hash lookups any more
3. X Sharp = Blunt
Re:You know.. in music.. (Score:1)
Impossible, M$ depends on their shares price to rise, but for two years in a row they don't.
Imagine them to b-flat for the future, and M$ goes broke.
Miguel! (Score:2)
Re:Miguel! (Score:2)
Re:Miguel! (Score:2)
* In word you type your high level runable specification and document it in literacy programming style.
* Then you convert the word document to an xml programming language.
* Then run the xml in
I really hope the MS people don't beat us to a decent literacy programming ui.
Old news (Score:1)
it's bogus (Score:2, Informative)
"This bogus press release made the rounds on April Fools Day, 1998. Not long after this was released, Simon Peyton Jones announced his move to Microsoft (an event that caught the author of this press release by complete suprise!)."
Re:it's bogus (Score:1)
That, and the fact that I found it on the Haskell Humor [haskell.org] page sort of tipped me off...
Interestingly enough, Simon Peyton Jones [microsoft.com] does seem to work for Microsoft.
Calling XML a programming language (Score:2, Insightful)
Re:Calling XML a programming language (Score:1)
Re:Calling XML a programming language (Score:2)
[snip] considering a new XML programming language
The author of the article doesn't refer to XML as a programming language here. He only mentions that the new programming language will be based around XML. Actually, later in the article, he speculates that the language will be *lisp-ish* so who knows if MS will do a functional programming language or not. Although the author relates XML to a programming language later in the article, each time, he doesn't explicitly state that XML is a programming language. Just because XML has a strong affinity towards functional programming languages doesn't mean that he's stating that XML is a programming language.
Re:Calling XML a programming language (Score:2)
Re:Calling XML a programming language (Score:2)
What do you mean by the application having to do all the work? Do you mean as opposed to libraries - if so you just said that we use plain text files so we use generic libraries..
Can you be more verbose and give an example?
Re:Calling XML a programming language (Score:2)
It makes no difference _one bit_ to the application whether the file format is in text or binary as long as it has a library to parse that format.
There has to be a program that takes a file format and converts it into a format the program can use. Then the program takes this and say renders it.
Are you suggesting that we skip the first step, and instead make the file basically a raw dump of memory? Then when you want to read in the data you just dump it back into memory.
This will work, but unfortunetly lacks flexibility. If you have a version mismatch between the program and the dumped-data then it will go spectacly wrong because the data structures would have to be exactly the same. If you change your processor then it will go wrong unless the alignment etc is exactly the same. If you upgrade any libraries it will go wrong.
There are indeed some places where you can use this however - emacs is a good example. This is what the precompiled
Re:Calling XML a programming language (Score:2)
If the tag name changes then your app could just support old formats, or it could covert old formats to the new one. You have no chance of doing this with binary.
Re:Calling XML a programming language (Score:1)
Thing is, that anti-binary bias is
a) What makes Unix so multi-platform and
b) makes Unix so eminiently malleable and hackable. Think anything in
It is much easier to edit a text file than a binary file. For one, you can read it. For two, the fact that a text file tends to make things like whitespace ignorable makes it easier and less brittle which leads to more relibale software. If the programs EXPECTS there to be variable amounts of whitespace it compensates which is not true of a binary-reading program which always expects the structures and bits in precisely the correct places and goes wahmmo when something is out of whack.
The difference is like that between a finely tuned racecar and your VW. The one can take more abuse because it is not so dependent on anything being precisley aligned.
Binary may be faster (like the racecar) but it is also more brittle and less reliable (again, racecar...)
The multiplatform thing is easy. Binary is dependent on byte order, the amount of bits-per-wors and such things. Many graphics programs on a PC can still not read Mac created TIFF files to this very day because of this.
A text file, as long as you use ASCII can be read on any friggin platform. There are some issues with character sets and Unicode and so, but that is much simpler to solve. For one, you can eyeball the file to see whats wrong with it.
Re:Calling XML a programming language (Score:2)
Re:Calling XML a programming language (Score:2)
Why Not XSLT? (Score:4, Insightful)
I'd love to see more XSLT systems be built. XSLT becomes powerful when everything is XML, and everything can be obtained via HTTP. This is why Web Services (SOAP/etc) won't take off the way the web has. You can't address the object in a Web Service, you can only address its proxy. Not to mention that all of those objects have some odd proprietary interface to them, instead of the ubiquitous GET/PUT/DELETE of HTTP.
Wow, I really went off topic.
To sum up: Use XSLT!
Re:Why Not XSLT? (Score:2)
Re:Why Not XSLT? (Score:5, Interesting)
Why Not CDuce? (Score:1)
It is a strongly typed language (xslt is not). And this add a lot of robustness.
Moreover, it has a real syntax (close to ML's one)
It is still beta, though.
Oy... (Score:1)
Re:Oy... (Score:2, Funny)
Re:Oy... (Score:2)
$FrameworkSDK$\Tool Developers Guide\Samples\clisp.
(from the clisp readme page)
CLisp is a sample lisp compiler, which compiles to MSIL. CLisp is developed in C# and uses reflection emit to generate MSIL. It can also be adapted as an interpreter if the generated MSIL is executed dynamically instead of persisting to a PE file.
Also since M$ is so heavily pushing
Re:Oy... (Score:2)
However, wasn't Microsoft Bob implemented largely in Lisp? So MS does have Lisp experience, maybe just not the best...
Re:Oy... (Score:2)
Re:What good are functional languages? (Score:2)
Re:What good are functional languages? (Score:2)
Re:What good are functional languages? (Score:4, Interesting)
Lisp is a great hackers language, because it seems like you can code as a way of thinking about a problem, an approach that is usually disasterous. Perhaps the awful syntax makes a necessity of the virtue of abstraction. I'd guess that in part this is because programs are data , rather than organizing things around compilation units, which leads to a differnt kind of rhythm to programming.
I wonder whether anybody has used extreme programming with Lisp; it seems like the lisp tendency to build small compact bits of code would be a natural fit.
Re:What good are functional languages? (Score:3, Funny)
Gee, I hope so. Otherwise a lot of the software I've written for my employer's trading business the past few years isn't real.
Re:What good are functional languages? (Score:1)
Re:What good are functional languages? (Score:2)
Then you probably want links like Franz success stories [franz.com], or perhaps this from ALU [lisp.org]. Or Digitool [digitool.com]. And of course these are just Common Lisp references; you can surely dig up similar things for other languages as well.
Can we just put and end to this already m$ (Score:3, Funny)
Just go ahead and take every language that you did not have a hand in and make something like it.
Maybe just give it a couple of things here and there to make it work better with microsoft products and slap a # on some letter.
This killing us slowly with your "new" stuff is well...killing me.
The next thing you know they are going to be taking something like unix and adding a letter to it and calling it the greatest thing sence sliced bread...oh wait, someone already did that with an L... guess you missed that one but you can steal it!
Re:Can we just put and end to this already m$ (Score:5, Interesting)
However when they came to try to port something like haskal over to it, they found it just wouldn't fit [columbia.edu](See page 18) so they had to make do with a sort of bridge [galois.com] instead.
So what I think they've done is taken a functional language, taken out the features that don't fit well with .net (untyped terms?) and called it a "feature" :)
I'm way out of my depth on this though - hopefully by providing links someone cleverer than me will correct me.
good rhetoric but low on fact (Score:5, Interesting)
August 1980: Microsoft announces XENIX OS, a portable operating system for various 16-bit microprocessors. XENIX is an interactive, multi-user, multi-tasking system. It will be able to run all of Microsoft's existing system software, and also be compatible with the programs written for UNIX OS.
[Xenix was actually an OEM version of Unix licensed by ATT]
August 1984: Microsoft announces that it will use XENIX and MS-DOS for its new personal computer, the IBM PC AT. The new PC sets the standards in multi-user systems. Both of its operating systems support the Intel APX-286 microprocessor.
see here [theregister.co.uk] and here [wednet.edu]
As for Linux
July 1991
> Message-ID:
> Date: 3 Jul 91 10:00:50 GMT
>
> Hello netlanders,
>
> Due to a project I'm working on (in minix), I'm interested in the posix
> standard definition. Could somebody please point me to a (preferably)
> machine-readable format of the latest posix rules? Ftp-sites would be
> nice.
I see the plan. . . (Score:2, Flamebait)
2. ???????
3. PROFIT!
Re:I see the plan. . . (Score:5, Interesting)
1. Expand .NET framework to cater to the 50 or so programmers out there who like both M$ and functional programming.
2. ???????
3. PROFIT!
You want to know the funny thing... I interviewed at MS (Yes I know I'm a whore). I didn't get the job. I think the primary reason was that durring the whole interview I was bagging on CS curriculums that made use of functional programming languages. It just so happens that at least two of the interviewers were big fans of functional programming. One of them had even studied under one of the people who was responsible for big chunks of the Scheme language specification. I guess there are two take aways from this. One, know more about the backgrounds of those who interview you. Two, don't underestimate the number of programmers who like both ms and functional programming. I manage to find two of them in the same room.
Re:I see the plan. . . (Score:1)
This is pretty cool actually. FP is great, if Microsoft pushes it hard then it might become something that makes the world a better place.
Wrong (Score:5, Informative)
yes you can [sun.com]
Alternatives (Score:2)
Re:Alternatives (Score:3, Informative)
What you want to look at for processing XML in a "lisp-like language" (Scheme) is SXML [okmij.org] and its related packages (SXPath, etc.)
These are packages for manipulating and representing XML content in Scheme programs.
XML can be seen as a syntax tree, right? XSL and its friends are tree manipulation tools.
The same can be said for Lisp and Lisp-like languages, whose "program as data" philosophy (and 35 years of history) focuses on program evaluation as tree transformation and manipulation (through nested lists.)
SXML is a translation of XML from its heavy angle-bracket syntax to a Scheme sexpr (Scheme/Lisp's bracket expression syntax) syntax (and back to XML again.) It's extremely powerful.
It's worth looking at if you spend large amounts of time manipulating XML data.
Re:Alternatives (Score:3, Interesting)
Try also HaXml, Haskell's answer to the same question. David Mertz has an article on it here [ibm.com].
Re:Alternatives (Water -- www.waterlang.org) (Score:2, Informative)
Re:Alternatives (Water -- www.waterlang.org) (Score:2)
1.<plus 1/><is 2/> (Score:2)
The samples below come from the Waterland website. ConsiceXML violates XML specifications the same way HTML does.
doc/fast_intro.html [waterlang.org]
Furthermore I do not understand the way they seem to mix values in text and tags. I mean
simply scares the hell out of me. I mean or would be acceptable. These would readable or exploit the structure of XML. I do not want to offend anyone by any means, but what on earth are these Water(TM) people think they are doing?I like C. I like Java. I like C++, LISP, Perl, Prolog and Python. I even like .BAT (4dos), sh, HTML and XML.
I even can see the use of Visual Basic,
but why would anyone want to use XML to write code?
To optimize it using XSLT? Or only to <BUZZ>blah</BUZZ>?
This is not a language.
This is slang.
Being fluent in it characterizes savages.
Water language and X# (Score:3, Informative)
Just a proprietary xquery? (Score:4, Informative)
Re:Just a proprietary xquery? (Score:1)
Microsoft over-marketed itself into obscurity (Score:3, Interesting)
Basically, if anyone has being paying attention to the news... it seems the upcoming windows
"That's business with
Goes to show that sometimes millions spent on advertizing doesn't always make a product:)
I guess this is a little offtopic... but it sounds to me that X# will most likely be absorbed by the marketing mess that is
Good riddance:)
--Zuchini
P.S. I can't spell, cuz I'm lazy.
Or just actually use Lisp (Score:1, Insightful)
And a decent Common Lisp compiler absolutely smokes
X# is not a new language (Score:2, Informative)
X# is an extenstion to C# to enable easy quering and manipulation of XML data; layered on top of XQuery.
Is it a new language ? (Score:1)
This would actually be pretty cool (Score:3, Insightful)
But anyway lets assume it is true. I think it would be absolutely wonderful. C is a great language in terms of performance, its a terrible language in terms of just about everything else: to use the old 60's expression
C programers know the cost of everything and the value of nothing while LISP programers know the value of everything and the cost of nothing. Once Microsoft included a functional language as part of Visual Studio it would open people's minds regarding all sorts of different paradigms, the same way that Visual Basic opened people's mind to event driven programming. Functional programming is very very powerful; and in some ways very natural.
Its becoming increasing obvious that writing high performance software is killing the ability for people to write understandable software. Imagine you file saving routines could be as easy as:
write_to_file(filename,(data_structure_dump(
Where data_structure_dump was generic (like Perl's datadumper) and part of the language.
Somebody below made the comment about Lisp being an excellent language for thinking about a problem while you are coding. I agree; why not have programs evolve naturally from programmers understanding the problem? Then the code gets cleaned up; and at the end the ineffecient loops that are killing performance get taken out and replaced by C++. I think that's a lot better than writing the program multiple times using: very detailed requirements then use cases then UML then C++. Why not have the use cases be the prototype for the program?
Finally this is a minor point but C, C++ and JAVA all have terrible terrible string manipulation. Why can't they have native to_data("Jan 1, 1983") or at least have:
string a = string("76" + 23)// a = "7623"
int x = int("76" + 23);
Anyway while this barely qualifies as a rummor I certainly hope it is true. If anyone from Microsoft is reading this thread pass it up the chain that this is one customer who would be thrilled with X#.
Re:This would actually be pretty cool (Score:1)
string a = string("76" + 23)// a = "7623"
int x = int("76" + 23);
Wouldn't this require lazy evaluation? C, C++ and Java don't have that. In those languages "76" + 23 is evaluated first, before the casting operation is applied.
Re:This would actually be pretty cool (Score:2)
string("76"+23) becomes
string_plus(string("76"), string(23)) which finally becomes
string a = string_plus("76", int_to_string(23));
Similarly for the int case.
Re:This would actually be pretty cool (Score:2)
Am I the only one that notices the irony of you saying this guy has no basis to make such claims when you in fact are making more claims when you also have no basis?
C is a great language in terms of performance, its a terrible language in terms of just about everything else:
I would argue this for a lot of reasons. Namely, the simply fact that C's only form of code organization is functions which are inherently expensive to call (ignore inline for the moment since its new to C99). Also, recursive algorithms often have to be rethought since C-recursive is very expensive.
write_to_file(filename,(data_structure_dump(docum
Where data_structure_dump was generic (like Perl's datadumper) and part of the language.
As oppossed to:
ofstream(filename) << docnt_data_struct;
In C++, every data structure can specialize the ostream insertion operator and get the above for free. If you really wanted to get a default (which for most structures is utterly useless), simply inherent from a common base class.
Finally this is a minor point but C, C++ and JAVA all have terrible terrible string manipulation. Why can't they have native to_data("Jan 1, 1983") or at least have:
string a = string("76" + 23)// a = "7623"
int x = int("76" + 23);
Umm, its called boost::lexical_cast() or boost::date();
As for the second examples, that's just ambiguous. Try:
std::string a = std::string("76") + boost::lexical_cast(23);
int x = boost::lexical_cast("76") + 23;
What you are arguing for, is a weakly typed language that assumes the programmer is never going to do anything interesting. Anyone who's tryed to develop a reasonably sized project in such a language knows better.
And BTW, regardding this comment:
the same way that Visual Basic opened people's mind to event driven programming.
Event driven paradigms where driven simply because MS implemented Win31 with that model (long before VB ever existed). Event driven paradigms are absolutely horrible. Managing more than one thing via events is terribly difficult.
Signal/slots are a much more compelling model. MS is already caused enough damage to the programming community, I can just imagine what will come next...
Re:This would actually be pretty cool (Score:2)
I used my get out of jail free card 1st sentance, 2nd paragraph, "But anyway lets assume it is true."
Namely, the simply fact that C's only form of code organization is functions which are inherently expensive to call (ignore inline for the moment since its new to C99).
Remember the comparisons here are to languages like LISP. Especially given lots of registers and most simple functions compiling to inline I'm not sure its possible to do much better than C/C++. I guess what are thinking of that is much better?
As oppossed to:
ofstream(filename)
Exactly! The differences is in languages like Perl the default is quite useful it fully describes the structure in an easy human format which also happens to be essentially "eval()"able back to the same datastructure. The result is you don't need to write your own casting of your document as an ostream or complex overloading for std::string a = std::string("76") + boost::lexical_cast(23);
int x = boost::lexical_cast("76") + 23;
That actually doesn't work you need to past what you are boosing from and to which means all you are getting is a collection of macros looking up the right conversion functions and these are still hard to use. I think passing the job to the parser makes sense. I don't have any problem with the method I just don't see why the programmer should need to think about it.
What you are arguing for, is a weakly typed language that assumes the programmer is never going to do anything interesting. Anyone who's tryed to develop a reasonably sized project in such a language knows better.
I don't disagree with you. I think having weak typing offers a genuine advantage. The fact that you see it as a major difference from strong typing proves my point that they really are quite different.
But what do you mean by interesting? A great deal of what's interesting in rigid languages becomes rather easy in "weakly typed ones" and thus not all that interesting anymore.
As for the event driven stuff; my point was not that Microsoft used event driven but that VB is what brought event driven to the mainstream. Regardless of whether you think this is a good thing or not I doubt you'd disagree.
Re:This would actually be pretty cool (Score:2)
int x = boost::lexical_cast("76") + 23;
Note: that lexical_cast should be boost::lexical_cast<int>("76"). HTML is surely not C++ friendly...