Linked by Eugenia Loli on Wed 14th Sep 2005 15:07 UTC, submitted by Michał Moskal
.NET (dotGNU too) A new major version of Nemerle language was released. Nemerle features a very high level .NET language with functional programming support. This version brings full support to .NET 2.0 generics and a bunch of other things. After the release of C# 3.0 spec preview it might be interesting to see how could next generation of .NET languages look like.
Order by: Score:
v ... looks like...
by BlackTiger on Wed 14th Sep 2005 15:32 UTC
v ... looks like...
by BlackTiger on Wed 14th Sep 2005 16:09 UTC
v First Post
by Anonymous on Wed 14th Sep 2005 16:29 UTC
My take on Nemerle
by eMagius on Wed 14th Sep 2005 16:34 UTC
eMagius
Member since:
2005-07-06

I've gotten my feet wet with Nemerle before, and it is a pretty nice functional-style language. Unfortunately, there are all kinds of little quirks due to the that it is a compiled .NET language (so everything's really typed down below and the traditional performance benefits of functional code are largely lost).

I think I liked F# a bit more (back when I was looking at the two) as it fit .NET better; Nemerle seems to have been designed for a utopian environment, then retrofitted to work with the limitations of .NET.

Things might have changed in the last few months, however.

Reply Score: 1

RE: My take on Nemerle
by japail on Wed 14th Sep 2005 17:46 UTC in reply to "My take on Nemerle"
japail Member since:
2005-06-30

F# is more of a "retrofitted" language being an adaptation of CAML to the CLR.

Reply Score: 1

Why?
by Anonymous on Wed 14th Sep 2005 16:35 UTC
Anonymous
Member since:
---

Why does it suck? After reading a little bit through the language documentation I actually find it quite attractive. There's a need for a broad set of languages supporting the .NET Framework - and especially a need for functional languages. Yes, I know that Standard ML has been ported to the platform as a research project. But the "non-OO languages" also need maintenance.

Congratulations with the new version, folks. Good work!

Reply Score: 0

RE: Why?
by Jamie on Wed 14th Sep 2005 17:39 UTC in reply to "Why?"
Jamie Member since:
2005-07-06

Its wrong to make a sweeping statement like the guy who said it sucks but functional languages to me are only really useful or successful when they address a very narrow target (take for instance XSL or SQL etc). In these cases the syntax can often be highly expressive towards the target and thus deliver excellent productivity over imperative languages.

General purpose functional languages are however quite difficult to master when they have a broad scope as they lack the expressive advantage of their "narrow target" cousins. They dont generally offer enough extra benefits over imperative languages in those cases to make them worthwhile.

Reply Score: 2

RE[2]: Why?
by japail on Wed 14th Sep 2005 17:54 UTC in reply to "RE: Why?"
japail Member since:
2005-06-30

Expressive advantage? Have you ever looked at Haskell code?

Reply Score: 1

RE[2]: Why?
by rayiner on Wed 14th Sep 2005 18:16 UTC in reply to "RE: Why?"
rayiner Member since:
2005-07-06

Try writing a compiler in a functional style versus an imperative style, in a language that just justice to the functional style. Indeed, try writing any "logic heavy" code in such a language. Algorithms that are very difficult to express in terms of 'for' and 'while' loops become much more simple to express in terms of 'map' and 'reduce'.

Reply Score: 1

RE: Why?
by japail on Wed 14th Sep 2005 17:51 UTC in reply to "Why?"
japail Member since:
2005-06-30

SML .NET is still developed, has Visual Studio integration, etc. I can't say that there's much of an actual need for functional languages on the .NET platform, and really most of the work seems to be imperative programming in multiparadigm languages, like ML derivatives. That isn't to say that there's anything wrong with developing languages that target the CLR.

Reply Score: 1

v Next Gen .NET languages
by Anonymous on Wed 14th Sep 2005 17:10 UTC
Hmm
by rayiner on Wed 14th Sep 2005 17:12 UTC
rayiner
Member since:
2005-07-06

C# 4.0 Reference Manual: http://www.amazon.com/exec/obidos/tg/detail/-/1555580416/qid=112671...

Yes, it was published in 1984...

I'm not one to be bitter and petty, but c'mon, could Microsoft introduce one new feature in C# 3.0 that's not already in Common Lisp? Push the boundaries just a little bit? You'd think that with multiprocessing becoming the wave of the future, they'd pull in some of their polyphonic C# work...

Reply Score: 1

RE: Hmm
by Anonymous on Wed 14th Sep 2005 17:58 UTC in reply to "Hmm"
Anonymous Member since:
---

Now you're IMHO insulting Lisp quite a bit. Sure, C# is more modern in several respects, not the least built-in threading and a modern library set, but otherwise it's not a reference manual. Lisp has tons of features that C# can't even dream of.

To be on-topic, Nemerle looks like a cool revamped OCaml for the CLR.

Reply Score: 0

RE[2]: Hmm
by rayiner on Wed 14th Sep 2005 18:18 UTC in reply to "RE: Hmm"
rayiner Member since:
2005-07-06

That's why I said it was for C# 4.0 ;) C# seems to slowly, yet enexorably, be moving in that direction.

With regards to the topic, this is somewhat of a dual post, as it announces both Nemerle 0.9.0 and the release of the C# 3.0 preview spec.

Reply Score: 1

RE: Hmm
by japail on Wed 14th Sep 2005 18:26 UTC in reply to "Hmm"
japail Member since:
2005-06-30

You're right, that does sound pretty bitter. How is that Common Lisp standard revision going? Is it pushing any boundaries? Did it turn into a statically-typed language that relies on manifest typing in order to need local-variable type inference to annoy programmers less? Perhaps it's switched to single-dispatch and inflexibly coupled methods to type definitions so that it needs "extension methods?" Those retarded collection initializers don't exactly look like Common Lisp to me, perhaps they're new?

Actually upon looking at this specification, Microsoft appears to be doing some things to make their language less retarded, and others to just make it needlessly complicated (such as query expression translation).

Reply Score: 1

RE[2]: Hmm
by rayiner on Wed 14th Sep 2005 18:58 UTC in reply to "RE: Hmm"
rayiner Member since:
2005-07-06

Heh. My comment was, of course, somewhat tongue in cheek, but my point was that C# is trying to solve the same problems as Common Lisp, and going about it in the same general way. Now, that might be like saying that the engineering behind a Porche and a Yugo is "generally similar", but issues of quality aside, they're both cars, right?

Completely static typing is annoying. CL solved it by making use of type declarations optional. C# attempts to solve it by making omission of type declarations optional. Methods coupled to classes is annoying. CL solves it by using generic methods, C# is trying to solve it by using extension methods. And collection initializers, well, do remind me a bit of CL. The example on page 16 could be mapped quite cleanly to LIST plus a defclass with initargs (or a defstruct).

Reply Score: 1

RE[3]: Hmm
by japail on Wed 14th Sep 2005 19:19 UTC in reply to "RE[2]: Hmm"
japail Member since:
2005-06-30

My point is that C# takes the short bus to school every day, and as such to remain within its conceptual framework while still providing improvements to the people that use it every day for whatever it is people use .NET for, it requires things that aren't like Common Lisp even if they alleviate problems that Common Lisp doesn't have.

When every third-party language for the CLR adds local type inference, why should C# not do it and instead worry about merging research work, or otherwise add any other experimental functionality right this second? When they see a clear need, or are confident that their work can be merged into the mainline language you can rest assured that C# ?.0 will be released. They aren't going to develop Alice# overnight; they're going to do it over the course of the next decade. ;)

Reply Score: 2

RE[2]: Hmm
by smitty_one_each on Thu 15th Sep 2005 11:27 UTC in reply to "RE: Hmm"
smitty_one_each Member since:
2005-07-07

>and others to just make it needlessly complicated (such as query expression translation).
Redmond has always excelled at taking existing, standardized things and specializing them to their platform. You can argue in a positive sense that this helps build the brand and free them from copyright worries. Or you can argue otherwise, but the day is too nice to troll.

Reply Score: 1

v RE: Hmm
by CanuckleFrog on Wed 14th Sep 2005 20:03 UTC in reply to "Hmm"
RE[2]: Hmm
by rayiner on Wed 14th Sep 2005 21:04 UTC in reply to "RE: Hmm"
rayiner Member since:
2005-07-06

Define "failure". If a "failed" language is one that influenced the design of dozens if not hundreds of languages over the years, remains state of the art despite its age, is still a required part of the top university programs, and still has an active user community half a century after its introduction, then Lisp is a glorious failure.

With regards to syntax --- John McCarthy did have common sense. He originally intended to define a syntax for Lisp. He just never got around to adding it because his "common sense" proved to be wrong --- the language's users liked it the way it was. That's the thing about common sense --- sometimes it blinds you to possibilities outside the common experience. Ultimately, the prefix syntax proved to be a mixed blessing. It simultaniously made it one of the most powerful languages ever designed, because it was completely and cleanly extensible, yet made it inaccessible to the closed-minded nitwits that make up most of the computer industry.

Reply Score: 1

re
by Anonymous on Wed 14th Sep 2005 17:16 UTC
Anonymous
Member since:
---

Functional is tough to learn. Very different.

Reply Score: 0

Archmage
by Anonymous on Wed 14th Sep 2005 17:19 UTC
Anonymous
Member since:
---

Where did the name for the programming language come from?

Nemerle was the name of the archmage in A Wizard of Earthsea

Reply Score: 0

Next .Net language
by Anonymous on Wed 14th Sep 2005 17:40 UTC
Anonymous
Member since:
---

ruby#

Reply Score: 0

:-O
by Anonymous on Wed 14th Sep 2005 17:48 UTC
Anonymous
Member since:
---

From C#3.0 samples:

This sample shows how to implement a domain specific language inside of C# using compiler generated expression trees. The language here is a very simple logic programming language with rules written in C# like:

// A doll is a toy.
rules += isToy("doll");
// A train is a toy.
rules += isToy("train");
// Ann plays with a train.
rules += playsWith("ann","train"); // John likes a toy if Ann likes that toy.
rules += Y => likes("john",Y)==likes("ann",Y);
// Ann likes toys that she plays with.
rules += X => likes("ann",X)==(isToy(X) & playsWith("ann",X));

// Ask a question: What does John like?
foreach(string s in rules.Solve<string>(N => likes("john", N)))
Console.WriteLine(s);

Reply Score: 0

RE: :-O
by tummy on Wed 14th Sep 2005 18:45 UTC in reply to ":-O"
tummy Member since:
2005-09-14

That looks exciting! Do you have a link to the 3.0 examples?

Reply Score: 1

re: rayiner
by Anonymous on Wed 14th Sep 2005 17:50 UTC
Anonymous
Member since:
---

One such feature missing in Lisp is possibility of static type checks and type inference.

Reply Score: 0

RE: re: rayiner
by rayiner on Wed 14th Sep 2005 18:14 UTC in reply to "re: rayiner"
rayiner Member since:
2005-07-06

Nope. Type declarations are a part of the language, and a good compiler will issue the requisite errors and warnings. SBCL/CMUCL is particularly good about this, and will do enough type inference to catch many type errors even without declarations. I don't usually bother to put type-declarations in my code, yet the only type errors (that I make, anyway), and that the compiler misses are polymorphism-related errors that wouldn't be caught 'till runtime in C# anyway.

Reply Score: 1

RE: re: rayiner
by Anonymous on Wed 14th Sep 2005 18:16 UTC in reply to "re: rayiner"
Anonymous Member since:
---

Thatīs not true. Common Lisp enables type declaration and there are a lot of Lips with type inference.

Reply Score: 0

re: Jamie
by Anonymous on Wed 14th Sep 2005 17:57 UTC
Anonymous
Member since:
---

Nemerle is NOT purely functional, it's multiparadigm, like Common Lisp ( CL is even all-paradigm ;-) )

I think that FP are more expressive in some parts (like higher-order functions that many imperative languages don't have) and less expressive in other parts (lack of assignment, or weak support for imperative programming). But they removed assignment on purpose, in the same way like goto was removed or suppressed in procedural languages - these languages lost a bit of expressivity, but gained clarity.

Reply Score: 0

RE: re: Jamie
by Anonymous on Thu 15th Sep 2005 18:52 UTC in reply to "re: Jamie"
Anonymous Member since:
---

"goto was removed or suppressed in procedural languages - these languages lost a bit of expressivity, but gained clarity."

care to explain how "GOTO :FOOBAR" or, worse, "GOTO 26765", could possibly be any more "expressive" than "foobar()"?

BTW, threading support isn't builtin to C#: it's part of something bigger called .NET -- a huge library, accessible by any language targetting the CLI runtime...

Nemerle is ok, as far as .net languages go, but it's just like Paul Graham once said: modern languages look more like Lisp everyday...

Personally, i believe Haskell to be a pretty parenthesesless, statically-typed Scheme with type inference...

Reply Score: 0

RE[2]: re: Jamie
by ondrej on Thu 15th Sep 2005 19:42 UTC in reply to "RE: re: Jamie"
ondrej Member since:
2005-09-14

"care to explain how "GOTO :FOOBAR" or, worse, "GOTO 26765", could possibly be any more "expressive" than "foobar()"?"

Are you confusing goto with gosub ? Goto is not used for functions calls, and it cannot be replaced with function calls.

Consider a language without exceptions, then goto can be useful to jump on error handling code at the end of a function.

Reply Score: 1

RE: Hmm
by ondrej on Wed 14th Sep 2005 18:40 UTC
ondrej
Member since:
2005-09-14

> How is that Common Lisp standard revision going?

I don't need the CL standard comittee to write macros for me, I can write them myself ;)

> Did it turn into a statically-typed language that relies on manifest typing

It's true that you can declare types in CommonLisp, but I think that the checks are not as good as in mainstream statically typed languages. But I did not experiment with this much.


The c# query translation looks like truly nearly worthless syntactic sugar, the direct code (i.e. calling methods) is close to it, so why pollute the language with this thing ..... I might write a macro for that in CommonLisp, but I would not hardwire it into C# compiler.

Reply Score: 1

Macro System
by rayiner on Wed 14th Sep 2005 18:41 UTC
rayiner
Member since:
2005-07-06

Nemerle's macro system seems quite powerful indeed, being of the procedural variety rather than the pattern-matching variety. It's syntax, on the other hand, seems, hard to swallow at best. Quote, though it is an extremely important operator in macros, has a very distracting and baroque sytnax in Nemerle. Also, while its admirable that they offer both hygenic capabilities and the ability to break hygene, the syntax is, again, somewhat baroque.

I'm tempted to believe that a cleaner macro system is possible, even within the constraints of an infix language, but I haven't given it enough thought to be sure.

Reply Score: 1

There's a big difference between LISP and C#
by tummy on Wed 14th Sep 2005 18:47 UTC
tummy
Member since:
2005-09-14

C# is going to be mainstream. Sun didn't invent OOP with Java but their certainly made it mainstream.

C#, or at least, .NET will do the same for alternate programming paradigms such as functional and logical programming.

No company has managed to make functional or logical langauges accepted by the majority of programmers. If anyone can do it, Microsoft can.

The future of programming looks very exciting!

Reply Score: 1

rayiner Member since:
2005-07-06

Ah yes, the quintessential argument in favor of C#: "yes, it might be completely derivative and unoriginal, but at least we'll get Joe Blow programmer to use it!"

For the kind of money they are able to pour into this project, and the kind of talent I'm sure they are capable of hiring, I expect a wee bit more than "well, at least our marketing is first-rate!"

As for your endline, I believe you meant:

The future of programming looks very... much like the past.

Reply Score: 1

japail Member since:
2005-06-30

It's more like, "Whatever the future holds, it will probably look something like Java." It's not even a matter of a limitless marketing budget. AWK begets Perl which begets PHP. People like PHP. They use it every day for a large piece of web development, and it didn't even have the "PHP to destroy Windows?" like Java did from 1996-2001. Perl too, and unless you consider O'Reilly to be more powerful than every university on the face of the Earth (lisp and scheme were rather popular for a while), I don't think it's because programmers have been mindlessly programmed by their marketing into using it. Even in PLT, more effort is spent on ML derivatives or Java/JVM work.

Reply Score: 1

ondrej Member since:
2005-09-14

I agree, they are not truly original but they are bringing very nice ideas to mainstream. The C# team obviously does't fear to bring not-so-usual features to their language, and there are several Microsoft Research teams working on programming language projects, and their work has nice chance to be used in MS tools. Unlike Java, which is just stuck in standard OOP, ignoring all the nice Lispy stuff ;-) inventing horrors like anonymous inner classes instead.

> The future of programming looks very exciting!

I have the same feeling, I would just specify that to future of _mainstream_ programming ;)

Reply Score: 2

RE: :-O
by ondrej on Wed 14th Sep 2005 19:12 UTC
ondrej
Member since:
2005-09-14

http://msdn.microsoft.com/vcsharp/future/
download LINQ Technology Preview

Reply Score: 1

v Lisp sucks
by barkley on Wed 14th Sep 2005 23:04 UTC
RE: Lisp sucks
by rayiner on Thu 15th Sep 2005 01:57 UTC in reply to "Lisp sucks"
rayiner Member since:
2005-07-06

LOL. My first exposure to Lisp was via a contractor who (being eccentric yet indispensible), would do all her simultions in Lisp. It's very hard to find college-aged people doing Lisp, because the in-thing to do these days seems to be to churn out code monkies rather than cultivate real computer scientists. But that's a different rant entirely...

Reply Score: 1

Re: barkley
by Anonymous on Wed 14th Sep 2005 23:15 UTC
Anonymous
Member since:
---

Perhaps you'd like to show us a Java application that is not a silly enterprise web-based form deal? Face it, nobody is using Java for serious development (and EJB's in the "enterprise" generated with JBuilder database wizards is not serious by any stretch of the word).

Reply Score: 0

v RE: Re: barkley
by barkley on Wed 14th Sep 2005 23:33 UTC in reply to "Re: barkley"
... looks like...
by BlackTiger on Thu 15th Sep 2005 08:57 UTC
BlackTiger
Member since:
2005-07-22

his new "languages" looks like complete shit...

WFT? Any normal, good, readable language everybody tries to convert to some monster-like language like CPP.

Like XML... XML WAS a good idea, but now - unuseful complicated crap.

Complete shit...

PS:
Every car in the end of its life becomes "Opel"...
Every PL becomes CPP...

Im so tired...

Reply Score: 1

Question for raynier
by Anonymous on Thu 15th Sep 2005 18:55 UTC
Anonymous
Member since:
---

What do you think microsoft want to do with their flagship language?

a)cram in as many new, novel features as possible so they can appeal to the "I've just finished my university lisp course and I feel smug and everybody else in the world is an idiot" crowd.

or

b)Make a useful language for practical use, without giving a damn for whether it appeals to teenagers?


Honestly, this thread reminds me of my teenaged, female niece, and her belief that any band is rubbish as soon as it becomes mainstream. It belies a certain immaturity, to say the least.

In fact, I think there is a reason that lisp failed miserably. It has little to do with the the world being full of morons, and more to do with it being an inferior solution. In fact, the famous lisp bubble and crash of the late 80s showed that lisp was unable to deliver when it comes to complex industry projects, where C-family languages have had a history of great success by comparison. The market has selected lisp out into obscurity based on its poor track record.

Lisp reminds me of perl, in a lot of ways. It has lots of needless complexities that make developers using it feel smug and superior to the rest of humanity, but it fundamentally misses the point of what a computer language shoudl be: easy to use and learn, and easy to read, maintain, and so on. Lisp fails terribly at the most basic requirements of a language, and no amount of silly abstract features can make up for that. In fact, they only make the problem worse. Common lisp today is just about unusable in a serious environment for these reasons.

Reply Score: 0

RE: Question for raynier
by Anonymous on Thu 15th Sep 2005 19:28 UTC in reply to "Question for raynier"
Anonymous Member since:
---

"easy to use and learn, and easy to read, maintain, and so on. Lisp fails..."

I don't think there are many languages that come close to Scheme ( a Lisp dialect ) in the "easy to use and learn, and easy to read, maintain" department while at the same time providing powerful and flexibility like no other.

yet, for practical matters, i guess too much minimalism does harm a tad bit... of course, you can always use an environment rich Scheme implementation, like PLT's or tap into an existing one, with Kawa for instance, which is Scheme targetting JVM and making good use of its resources...

Reply Score: 0

RE[2]: Question for raynier
by ondrej on Thu 15th Sep 2005 20:07 UTC in reply to "Question for raynier"
ondrej Member since:
2005-09-14

I don't see how Lisp is less practically useful than Java, if you consider linguistical issues only and forget the other stuff like lack of libraries, implementations, small user base etc. Unfortunately, most Lisp critics don't try to explain this and they just very vaguely talk about inpracticality, academia, smug teenagers, stupid parentheses etc. IMHO base of CL is simple (function application with special forms and macros), fairly easy to read (really high level code, conciseness instead of repeating boilerplate code, DSLs), easier to maintain (short code with less duplications).

Reply Score: 1

This should be two posts
by Anonymous on Thu 15th Sep 2005 18:56 UTC
Anonymous
Member since:
---

I have taken a short look at the C# 3.0 spec. Some of the features sound nice, but they are increasing the complexity of the language much too quickly for my liking.

And what about this silly query expression stuff?

It would be much better to make the language itself extendable, like Nemerle, Boo and various other .NET languages have shown.

But anyway, I always thought that MSIL and the CLR was the really exiting part of .NET.

Reply Score: 0

RE: This should be two posts
by Anonymous on Thu 15th Sep 2005 19:19 UTC in reply to "This should be two posts"
Anonymous Member since:
---

"And what about this silly query expression stuff?"

yeah! instead of "select foo from bar", you now can write "from bar select bar.foo". innovation at M$'s best! ;)

Reply Score: 0

RE[2]: This should be two posts
by ondrej on Thu 15th Sep 2005 19:47 UTC in reply to "This should be two posts"
ondrej Member since:
2005-09-14

Query expressions are syntactic sugar that are not worth it, but c# seems to be more extensible now thanks to closures and expression trees. If I understand it correctly, then part of the query expressions ("where ......") is not hardwired into the language, but built on the expression trees feature - the code after "where" is DSL that is translated to e.g. SQL by a library that analyzes its expression tree.

Reply Score: 1

Re: Question for raynier
by Anonymous on Thu 15th Sep 2005 21:24 UTC
Anonymous
Member since:
---

Lisp reminds me of perl, in a lot of ways. It has lots of needless complexities that make developers using it feel smug and superior to the rest of humanity, but it fundamentally misses the point of what a computer language shoudl be: easy to use and learn, and easy to read, maintain, and so on. Lisp fails terribly at the most basic requirements of a language, and no amount of silly abstract features can make up for that. In fact, they only make the problem worse. Common lisp today is just about unusable in a serious environment for these reasons.

I had no problem learning Common Lisp. I find it easy to use, easy to read, easy to write, and easy to maintain. Perhaps you're just stupid?

Reply Score: 0