Slashdot Mirror


X# Functional Programming from Microsoft?

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

49 of 85 comments (clear)

  1. Humorists! by avalys · · Score: 4, Funny

    "Microsoft is working on a functional language...".

    Heh...funny. We're finally getting some humor around here.

    --
    This space intentionally left blank.
  2. Is .NET .DEAD yet? by MacAndrew · · Score: 5, Funny

    I've been waiting for the .ANNOUNCEMENT, but .MAYBE I'm .HOPING for too .MUCH.

  3. You know.. in music.. by MarvinMouse · · Score: 5, Funny

    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.

    --
    ~ kjrose
    1. Re:You know.. in music.. by Alethes · · Score: 4, Funny

      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?

    2. Re:You know.. in music.. by Anonymous Coward · · Score: 2, Funny

      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.

    3. Re:You know.. in music.. by clearcache · · Score: 2

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

  4. Miguel! by Jeremiah+Cornelius · · Score: 2

    Are you porting GNU/Emacs to .mono yet?

    --
    "Flyin' in just a sweet place,
    Never been known to fail..."
    1. Re:Miguel! by RevAaron · · Score: 2

      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.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    2. Re:Miguel! by JohnFluxx · · Score: 2

      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.

  5. Calling XML a programming language by rollthelosindice · · Score: 2, Insightful

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

    1. Re:Calling XML a programming language by grammar+nazi · · Score: 2
      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.

      --

      Keeping /. free of grammatical errors for ~5 years.
    2. Re:Calling XML a programming language by JohnFluxx · · Score: 2

      I don't understand your point. Sure there are many file formats that are turing complete - pdf, etc along with the data files that come with just about every game, but I don't understand what this hsa to do with supporting 'an anti-binary bias'?

    3. Re:Calling XML a programming language by JohnFluxx · · Score: 2

      Hmm.. nope still don't get it. You could just as easily have a generic tool to output a binary file instead of a plain text file.

      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?

    4. Re:Calling XML a programming language by JohnFluxx · · Score: 2

      Right.. Thank you for a 100% accurate but totally offtopic reply. Go read what the AC was claiming, and what I was challenging.

    5. Re:Calling XML a programming language by JohnFluxx · · 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 .el files are (.elc). Emacs loads in a lisp file, parses it, then does a raw memory dump back to disk. Then when it next needs the .el file, instead of parsing it, it just dumps the file back into memory. Note that you still keep around the .el incase anything changes. (.el files are programs, but in lisp data files are programs)

    6. Re:Calling XML a programming language by JohnFluxx · · Score: 2

      The application doesn't care if it takes few bits or not.

      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.

    7. Re:Calling XML a programming language by chrisseaton · · Score: 2

      When they 'XML programming language' I think they mean something like foo==10foo=barfoo=baz. As in, a programming language written in XML.

  6. Why Not XSLT? by marvinx · · Score: 4, Insightful

    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!

    1. Re:Why Not XSLT? by JohnFluxx · · Score: 2

      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.

    2. Re:Why Not XSLT? by __past__ · · Score: 5, Interesting
      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.
  7. Can we just put and end to this already m$ by Neck_of_the_Woods · · 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!

    --
    Neck_of_the_Woods
    #/usr/local/surf/glassy/overhead
    1. Re:Can we just put and end to this already m$ by JohnFluxx · · Score: 5, Interesting
      They had to do it. .NET was NOT designed for functional languages. They tried to add on supported with something called idx

      However when they came to try to port something like haskal over to it, they found it just wouldn't fit(See page 18) so they had to make do with a sort of bridge 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.

  8. I see the plan. . . by Bastian · · Score: 2, Flamebait

    1. Expand .NET framework to cater to the 50 or so programmers out there who like both M$ and functional programming.
    2. ???????
    3. PROFIT!

    1. Re:I see the plan. . . by Ouroboro · · 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.

      --
      When I want your opinion I will beat it out of you.
  9. Wrong by sporty · · Score: 5, Informative

    "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

    --

    -
    ping -f 255.255.255.255 # if only

  10. Re:What good are functional languages? by JohnFluxx · · Score: 2

    Uh there are many many documents on lisp on the web along with studies that show that using lisp can speed up development. (actually they only show that people that use lisp devel faster - there can be other reasons why this relationship exists other than direct causality.)

  11. Re:What good are functional languages? by JohnFluxx · · Score: 2

    Just for a few examples of where a lisp-like language is used - just about any game, AI, knowledge based systems, etc.

  12. Alternatives by JohnFluxx · · Score: 2

    I was looking for a way to do a lot of XML processing in a lisp like language. Any suggestions other than this?

    1. Re:Alternatives by opiate · · Score: 3, Informative

      What you want to look at for processing XML in a "lisp-like language" (Scheme) is SXML 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.

    2. Re:Alternatives by vbweenie · · Score: 3, Interesting

      Try also HaXml, Haskell's answer to the same question. David Mertz has an article on it here.

      --
      Experience is a hard school, but fools will learn no other.
  13. Water language and X# by Mike.Plusch · · Score: 3, Informative

    X# sounds like it is trying to achieve some of the goals of the Water language (Water posting on Nov 22, 2002.) 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.

  14. Re:Oy... by DiscoOnTheSide · · Score: 2, Funny

    MS Lisp? I bet $10 that much like calling Microsoft Micro$oft and calling VB "VD" this will get the insulting name...."microthoft" *rimshot* :)

    --
    Viva La Revolucion! Buy a Mac!
  15. Just a proprietary xquery? by etedronai · · Score: 4, Informative

    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, being developed by the w3c.

  16. Re:What good are functional languages? by hey! · · Score: 4, Interesting

    I dunno. Depends on what you mean by "real development". The main limiting factor seems to be the number of people who know Lisp well. If I had to hire a team to do a project in Lisp, I'd probably have to train them all. However, I used to know many very, very smart people who designed complex real world systems in Lisp. They just tended to work in a rather rarified stratosphere of problem domains: not your payroll and website kind of stuff, but horrible, complex and intractable problems.

    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.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  17. Microsoft over-marketed itself into obscurity by zaqattack911 · · Score: 3, Interesting

    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.

  18. Re:Oy... by MrBlack · · Score: 2

    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

  19. it's bogus by nickos · · Score: 2, Informative

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

  20. X Hash ? or by DrSkwid · · Score: 2

    1. They've been through re-hab
    2. No need for creating hash lookups any more
    3. X Sharp = Blunt

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  21. good rhetoric but low on fact by DrSkwid · · Score: 5, Interesting

    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 and here

    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.

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  22. Re:What good are functional languages? by hding · · Score: 3, Funny

    can Scheme or LISP be used for any real development?

    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.

  23. Re:Alternatives (Water -- www.waterlang.org) by Mike.Plusch · · Score: 2, Informative

    Christopher Fry and Mike Plusch have developed the Water language. 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.

  24. Re:Alternatives (Water -- www.waterlang.org) by JohnFluxx · · Score: 2

    Hmm, not OS unfortunetly. I wouldn't want to do any major coding in something with no OS implementation..

  25. X# is not a new language by Utopia · · Score: 2, Informative

    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.

  26. Re:Oy... by __past__ · · Score: 2
    Great choice of a name, then, since there is also Gnu CLISP, 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...

  27. This would actually be pretty cool by jbolden · · Score: 3, Insightful

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

    1. Re:This would actually be pretty cool by jbolden · · Score: 2

      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.

    2. Re:This would actually be pretty cool by lkaos · · Score: 2

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

      --
      int func(int a);
      func((b += 3, b));
  28. Re:Oy... by MrBlack · · Score: 2

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

  29. Re:What good are functional languages? by hding · · Score: 2

    Then you probably want links like Franz success stories, or perhaps this from ALU. Or Digitool. And of course these are just Common Lisp references; you can surely dig up similar things for other languages as well.