Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
Microsoft

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."
This discussion has been archived. No new comments can be posted.

X# Functional Programming from Microsoft?

Comments Filter:
  • Humorists! (Score:4, Funny)

    by avalys ( 221114 ) on Monday January 13, 2003 @06:51PM (#5076715)
    "Microsoft is working on a functional language...".

    Heh...funny. We're finally getting some humor around here.
  • by MacAndrew ( 463832 ) on Monday January 13, 2003 @06:52PM (#5076727) Homepage
    I've been waiting for the .ANNOUNCEMENT, but .MAYBE I'm .HOPING for too .MUCH.
  • by MarvinMouse ( 323641 ) on Monday January 13, 2003 @06:56PM (#5076770) Homepage Journal
    Being sharp isn't a good thing... It's actually common for singers who don't know how to sing to sing sharp... Yet, Microsoft likes C#, and X# (X isn't even a note this time.) I am excited though. I am waiting for someone to tune Microsoft a bit and perhaps release b-flat, or perhaps D##.

    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.
    • by Alethes ( 533985 ) on Monday January 13, 2003 @07:05PM (#5076840)
      but if you already know the key is C, C# is not a good note to hit.

      Tell that to any of the jazz guys that like the sound of a flat-9. :)

      Yeah, offtopic. Who cares?
      • OT: I know...

        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.
      • Besides...a flatted ninth in the key of C is a Db, not a C#...

        (I used to want to hit people in my theory classes that said stuff like that...before they could utter the phrase "Enharmonic Equivalent")
    • by Anonymous Coward
      Bah! You tonality freaks get me everytime. "Oooh, I play music in a 'key', look at me". "Oooh, I select notes that 'sound good', I'm so special".

      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.
    • Being sharp isn't a good thing... It's actually common for singers who don't know how to sing to sing sharp

      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.
    • 1. They've been through re-hab
      2. No need for creating hash lookups any more
      3. X Sharp = Blunt
    • I am waiting for someone to tune Microsoft a bit and perhaps release b-flat, [...]

      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.
  • Are you porting GNU/Emacs to .mono yet?
    • Actually, an Emacs-like editor for .NET/Mono would be pretty cool. It'd be great to have an interpreted/incrementally compiled language with .NET access (SmallScript, a Lisp dialect) as the scripting or main language of this Emacs.NET- you could use Emacs to modify and extend your entire .NET computing environment.
      • I thought I found someone that let you do literacy programming in MS Word - but it wasn't as cool as I hoped. What you did was:

        * 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 .NET and compare the output to your actual implementation and check the fit.

        I really hope the MS people don't beat us to a decent literacy programming ui.
  • This press release [haskell.org] from 1998 talks about Microsoft adopting Haskell (a purely functional language with lazy evaluation).
    • it's bogus (Score:2, Informative)

      by nickos ( 91443 )
      I'd love to think that Haskell was getting this kind of attention, but text at the bottom of the page reads:

      "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!)."
  • Does anyone else get upset when XML is called a "programming language"? I mean, just because an acronym ends in the letter L doesn't make it a "programming language".
    • What I define as a language, is if you can make an IRC Client out of it, its a programming or scripting language.
    • Please allow the grammar nazi to clear things up:

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

    • When they 'XML programming language' I think they mean something like foo==10foo=barfoo=baz. As in, a programming language written in XML.
  • Why Not XSLT? (Score:4, Insightful)

    by marvinx ( 9011 ) on Monday January 13, 2003 @07:30PM (#5077002) Homepage
    Isn't XSLT a functional language? It's a wonderfully helpful tool when working with XML. How would another language (X#?) help the situation?

    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!
    • I was surprised by your comment - I didn't think xslt was powerful enough. But a second of googling showed it is indeed turing complete [unidex.com].
    • Re:Why Not XSLT? (Score:5, Interesting)

      by __past__ ( 542467 ) on Tuesday January 14, 2003 @03:33AM (#5079264)
      XSLT may be turing complete, but at a general-purpose programming language, it sucks. Even for complex XML transformations, it gets messy. Would you like to write

      <call-template name="split-string">
      <with-param name="string" select="$s">
      <with-param name="delimiter" select=" "/>
      </call-template>
      instead of
      split_string($s, " ")
      every time? That all input has to be well-formed XML doesn't help either. XSLT is useful, but for a limited domain.
    • And there is another language that is, IMHO, far more interesting than xslt. It is called CDuce [cduce.org].

      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.

  • by Viqsi ( 534904 )
    Okay, I'm convinced that this is April 1st in disguise. First the quardruple-speed browser, then the SCO patent issue, then the porno cellphones, and now this - Microsoft Lisp.
    • MS Lisp? I bet $10 that much like calling Microsoft Micro$oft and calling VB "VD" this will get the insulting name...."microthoft" *rimshot* :)
    • Why is it that your typical slash-dotter is always a day late and a dollar short with their Microsoft jabs? There is a simple lisp compiler in the .NET SDK (called clisp). It should be located somewhere around
      $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 .NET at universities there are also a number of functional programming languages that target the CLR. You can find a fairly comprehensive list of .NET languages here http://www.jasonbock.net/dotnetlanguages.html
      • Great choice of a name, then, since there is also Gnu CLISP [clisp.org], one of the better known free lisps (used by Yahoo's ViaWeb, for example).

        However, wasn't Microsoft Bob implemented largely in Lisp? So MS does have Lisp experience, maybe just not the best...

        • I'm not sure if the .NET clisp is CLOS compliant....I'm guessing they called it clisp because it is written in C# (or because it targets the CLR), and I agree that it it is annoying the overloading of the clisp name. M$ has done this also with the CLI (in .NETspeak the Common Language Infrastructure, but for unix wonks the Command Line Interface). Anyhow...
  • by Neck_of_the_Woods ( 305788 ) on Monday January 13, 2003 @07:54PM (#5077140) Journal

    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!

    • by JohnFluxx ( 413620 ) on Tuesday January 14, 2003 @01:48AM (#5078983)
      They had to do it. .NET was NOT designed for functional languages. They tried to add on supported with something called idx [microsoft.com]

      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.

    • by DrSkwid ( 118965 ) on Tuesday January 14, 2003 @07:07AM (#5079711) Homepage Journal
      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

      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.
  • by Bastian ( 66383 )
    1. Expand .NET framework to cater to the 50 or so programmers out there who like both M$ and functional programming.
    2. ???????
    3. PROFIT!
    • by Ouroboro ( 10725 ) <aaron_hoyt&yahoo,com> on Monday January 13, 2003 @09:39PM (#5077813) Homepage Journal

      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.

    • Actually many of the developers on the Haskell spec now works for Microsoft, specifically AFAIK in the Intentional Programming Project that now seems to have been spun off.

      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)

    by sporty ( 27564 ) on Monday January 13, 2003 @07:58PM (#5077178) Homepage
    "You can't just import an XML file and magically have it available to your program. You have to first put it through some sort of transformation, which requires work that is unnatural or unwieldy." -- Sean McGrath

    yes you can [sun.com]
  • I was looking for a way to do a lot of XML processing in a lisp like language. Any suggestions other than this?
    • Re:Alternatives (Score:3, Informative)

      by opiate ( 16005 )

      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.

    • Christopher Fry and Mike Plusch have developed the Water language [waterlang.org]. Christopher Fry was one of the original developers on Macintosh Common Lisp when it was Coral Software. Water was designed to be as easy as Basic, but give you all the power (and more) of Lisp. Water was designed to support both object-oriented programming and functional programming. It uses the ConciseXML syntax and uses the syntax for data, logic, and presentation. Water is an All-Level Language because it can be used for both high-level and low-level tasks.
      • Hmm, not OS unfortunetly. I wouldn't want to do any major coding in something with no OS implementation..
      • The samples below come from the Waterland website. ConsiceXML violates XML specifications the same way HTML does.
        doc/fast_intro.html [waterlang.org]

        • 5.<is 5/>
        • object.<get key lookup=false if_missing='return' default=false/>
        • <if> cond1 action1 cond2 <do> action2a action2b 'continue' </> otherwise action3 </if>

        Furthermore I do not understand the way they seem to mix values in text and tags. I mean

        5.<plus 7/>.<divided_by 3/>
        simply scares the hell out of me. I mean
        <int value="(5+7)/3"/>
        or
        <math divide_by="3"><math add="7">5</math></math>
        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.

  • by Mike.Plusch ( 536441 ) on Monday January 13, 2003 @08:51PM (#5077549)
    X# sounds like it is trying to achieve some of the goals of the Water language (Water posting on Nov 22, 2002. [slashdot.org]) Given that XML standards are used for defining APIs, data types, data, RPC, and presentation, it only seems logical to extend XML to handle general purpose logic. Working with XML from Java feels like writing a Java program using C libraries -- everything is a foreign call.
  • by etedronai ( 35656 ) on Monday January 13, 2003 @09:36PM (#5077804)
    I am highly skeptical of things like this because it seems to just be microsoft attempting to control an xml based data language as a reaction to a similar open language, xquery [w3.org], being developed by the w3c.
  • by zaqattack911 ( 532040 ) on Monday January 13, 2003 @11:37PM (#5078372) Journal
    I have a feeling this X# language will be even less adopted then even C#.

    Basically, if anyone has being paying attention to the news... it seems the upcoming windows .NET server is being renamed to windows 2003 server. Why? remember those useless non-specific .NET adds on TV, in magazines everwhere?

    "That's business with .NET" Apparently MS marketers have discovered that they pushed the ".NET" trademark so hard... that the public is confused and the original meaning of .NET technology has been completely lost amoung all the hype.

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

    Good riddance:)

    --Zuchini

    P.S. I can't spell, cuz I'm lazy.
  • by Anonymous Coward
    Both Common Lisp and Scheme have long had packages for transforming XML (a language with EVEN WORSE syntax than Lisp) into Lisp and back again.

    And a decent Common Lisp compiler absolutely smokes .net or java.

  • The article is largely incorrect.

    X# is an extenstion to C# to enable easy quering and manipulation of XML data; layered on top of XQuery.
  • There is an article in /. called "Water, a Newish Web Language Out of MIT" about a functional language created at MIT (www.waterlang.org).
  • by jbolden ( 176878 ) on Tuesday January 14, 2003 @01:13PM (#5082205) Homepage
    First off I'm not sure whether to give this any weight. We have an article quoting a guy who doesn't even claim to have much inside knowledge about what is going on. The only thing I can throw in is that the head of Microsoft language development is looking for languages that handle niche problems much better than high performance general purpose languages even at the cost of drastically reduced performance; that is Microsoft is seriously considering another major scripting language even further from C++/Java than VB is. So this X# rummor does fit with the known facts; which is far short of saying its true.

    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(d ocume nt_data_structure));
    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); // x = 99

    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#.
    • 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); // x = 99

      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.

      • I don't know I think it could happen at the parser level. "76"+23 is going somewhere so that parser could notice this and

        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.

    • First off I'm not sure whether to give this any weight. We have an article quoting a guy who doesn't even claim to have much inside knowledge about what is going on. The only thing I can throw in is that the head of Microsoft language development is looking for languages that handle niche problems much better than high performance general purpose languages even at the cost of drastically reduced performance;

      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(docume nt_data_structure));
      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); // x = 99


      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...
      • 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? :)

        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.

The cost of feathers has risen, even down is up!

Working...