This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Roslyn

15 replies
Olivier Lefevre
Joined: 2011-10-23,
User offline. Last seen 42 years 45 weeks ago.

Microsoft has just released project Roslyn: http://msdn.com/roslyn,
a complete rewrite of the C# and VB# compilers that breaks them into
several stages and makes them available via an API to third party
programs. I don't think Java has anything like it (although there
was talk of an AST API at some point) but how does the Scala compiler
compare?

Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Roslyn
This sounds more like Microsoft advertisement rather than a question, even the title. If this was stack overflow this "question" would get voted down and closed.

On Sat, Oct 22, 2011 at 5:05 PM, Olivier Lefevre <lefevrol [at] yahoo [dot] com> wrote:
Microsoft has just released project Roslyn: http://msdn.com/roslyn,
a complete rewrite of the C# and VB# compilers that breaks them into
several stages and makes them available via an API to third party
programs. I don't think Java has anything like it (although there
was talk of an AST API at some point) but how does the Scala compiler
compare?

Olivier Lefevre
Joined: 2011-10-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Roslyn

On 10/23/2011 2:03 AM, Aleksey Nikiforov wrote:
> This sounds more like Microsoft advertisement rather than a question,
> even the title. If this was stack overflow this "question" would get
> voted down and closed.

Actually I think *you* are the rude imbecile who needs voted down
and I'm going to do just that. I asked because I know the Scala team
progressively re-engineered the compiler in just that direction to
make it easier on Scala IDE designers and I was curious to learn
how their work compares. Now you just go nicely and f*** off, ok?

The rudeness of some people.

ichoran
Joined: 2009-08-14,
User offline. Last seen 2 years 3 weeks ago.
Re: Re: Roslyn


On Sat, Oct 22, 2011 at 8:56 PM, Olivier Lefevre <lefevrol [at] yahoo [dot] com> wrote:
On 10/23/2011 2:03 AM, Aleksey Nikiforov wrote:
This sounds more like Microsoft advertisement rather than a question,
> even the title. If this was stack overflow this "question" would get
> voted down and closed.

Actually I think *you* are the rude imbecile who needs voted down

I don't believe this sort of language is appropriate for this mailing list.  It's an unwarranted escalation to an admittedly not-very-friendly reply.  If you want people to take you seriously and consider the questions that you ask, it is highly advisable to be more courteous than this.

For what it's worth, I agree with Aleksey in large measure, though I would have tried instead to point out how your question was not really that well phrased if you are genuinely interested in learning about the capabilities of the Scala compiler.

Think about what you are asking: you want people with detailed knowledge of the compiler (of whom there are not all that many) to also be instant experts in a brand-new Microsoft product so they can do a product comparison for you?  That's a little unreasonable, isn't it?

Try phrasing like this for such questions:

"I have heard about the Roslyn rewrite of the C# compiler to allow for third-party access to (say something about what cool things the API exposes).  This functionality seems really useful for (some problem you have that will be solved by this).  I know the Scala compiler is open source so one could in principle add equivalent functionality, but it's a lot easier if it's designed with extensions in mind.  Is there a way to (do such-and-so) in the Scala compiler as, for example, a plugin?"

This form is a real question: you provide enough information in the question so that people don't have to go read a bunch of MS product announcement stuff, and you demonstrate a real need for which MS has a real solution for you.  This allows people, if they're so inclined, to reason about something solid.  After all, the answer could very well be, "Well, for that problem, actually you don't need any compiler API access--generic types take care of that and related problems like so...."

So please try to cool off and write a question that shows you put enough effort and care into it such that you actually care about getting the answer.

  --Rex


Olivier Lefevre
Joined: 2011-10-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Roslyn

On 10/23/2011 3:39 AM, Rex Kerr wrote:
> I don't believe this sort of language is appropriate for this mailing list.

Please. Strong language is inappropriate but jumping on people and calling them
trolls on a whim is? That's a mite hypocritical, don't you think?

> This form is a real question: you provide enough information in the question so
> that people don't have to go read a bunch of MS product announcement stuff

You are the second person who exhibits an inexplicable anti-MS bias here. MSDN is
not a forum for marketing or product announcements: that would be the blogs or
things like that. MSDN it is the place with the real technical information, as
well as the product itself.

Because 1) Scala has (or had) a .NET back-end 2) we know that the Scala team is
in touch with some peers at MS like Don Syme, who is close to the VS group that
also did Roslyn, and lastly 3) this seems very relevant work, I did not think it
necessary to placate the troll police with a long backgrounder. But, fine, next
time I'll make one.

Jonathan Toland
Joined: 2011-04-20,
User offline. Last seen 42 years 45 weeks ago.
Re: Roslyn
[…twiddling my fingers as if the last awkward and/or inappropriate posts didn't transpire and back on topic…]
I bet Martin's keenly aware of Roslyn but I suspect it was inspired by either Scala or mutually by another source. I'm generally informed (thanks to Miguel's tireless documentation) how scalac works but not specifics. Scala compilation is ordered by phases which can be hooked by plugins similar to what's Roslyn's whitepaper illustrates. There was also a talk at Scala Days about modularisation of pertinent phases for integration with the Eclipse plugin. Is there a whole example of Roslyn extension? I wonder how it compares functionally.
Ismael Juma 2
Joined: 2011-01-22,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Roslyn
Hi Olivier,
On Sun, Oct 23, 2011 at 6:00 AM, Olivier Lefevre <lefevrol [at] yahoo [dot] com> wrote:
Because 1) Scala has (or had) a .NET back-end 2) we know that the Scala team is in touch with some peers at MS like Don Syme, who is close to the VS group that
also did Roslyn, and lastly 3) this seems very relevant work, I did not think it
necessary to placate the troll police with a long backgrounder. But, fine, next
time I'll make one.

For what it's worth, I think it is an interesting development and I found your reference useful.
Best,Ismael
odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Re: Roslyn
I had read of Roslyn but don't know any specifics until now. It's true that the Scala compiler work is going in the same direction. 
Best,
 -- Martin
Olivier Lefevre
Joined: 2011-10-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Roslyn

Hi Toland, Ismail and Martin,

Thanks for overlooking the unpropitious start of the thread and for
the confirmation that these are indeed kindred efforts: it helps
put both in perspective.

Regards,

Peter C. Chapin 2
Joined: 2011-01-07,
User offline. Last seen 42 years 45 weeks ago.
RE: Re: Roslyn

I think this is the way of the future with respect to compilers. I can't
imagine contemplating a new compiler project that doesn't present the
compiler as a collection of documented libraries. For example in the C/C++
world there is clang [1] which does this. See especially

http://clang.llvm.org/features.html#applications

Peter

[1] http://clang.llvm.org/

> -----Original Message-----
> From: scala-tools [at] googlegroups [dot] com [mailto:scala-
> tools [at] googlegroups [dot] com] On Behalf Of Olivier Lefevre
> Sent: Sunday, October 23, 2011 06:20
> To: scala-tools [at] googlegroups [dot] com
> Subject: [scala-tools] Re: Roslyn
>
> Hi Toland, Ismail and Martin,
>
> Thanks for overlooking the unpropitious start of the thread and for
> the confirmation that these are indeed kindred efforts: it helps
> put both in perspective.
>
> Regards,
>

nilskp
Joined: 2009-01-30,
User offline. Last seen 1 year 27 weeks ago.
Re: Roslyn
On Sat, Oct 22, 2011 at 7:03 PM, Aleksey Nikiforov <lexn82 [at] gmail [dot] com> wrote:
This sounds more like Microsoft advertisement rather than a question, even the title. If this was stack overflow this "question" would get voted down and closed.

It's a legitimate question.
Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Roslyn
+1

On Sun, Oct 23, 2011 at 12:48 AM, Ismael Juma <ismael [at] juma [dot] me [dot] uk> wrote:
Hi Olivier,
On Sun, Oct 23, 2011 at 6:00 AM, Olivier Lefevre <lefevrol [at] yahoo [dot] com> wrote:
Because 1) Scala has (or had) a .NET back-end 2) we know that the Scala team is in touch with some peers at MS like Don Syme, who is close to the VS group that
also did Roslyn, and lastly 3) this seems very relevant work, I did not think it
necessary to placate the troll police with a long backgrounder. But, fine, next
time I'll make one.

For what it's worth, I think it is an interesting development and I found your reference useful.
Best,Ismael



--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SWSeattle, WA 98136

+1 206.650.3740

http://biosimilarity.blogspot.com
Miguel Garcia 2
Joined: 2011-01-30,
User offline. Last seen 42 years 45 weeks ago.
Re: Roslyn

Hi, 
I'm working on Scala.Net and I've looked at Project Roslyn. Comments follow. 
About Scala.Net, it's alive and kicking [1] although one very practical feature is missing as-of-right-now (interop with assemblies exporting generic types). We'll get there soon. 
About Project Roslyn. It offers a peek into ASTs at selected points, via an API that does not expose full details. That's enough for most use cases. The Scala compiler is more flexible in this regard, it supports both "peeking" and "poking" in between any of the transformation phases it sports [2]. That's without counting the IDE-oriented APIs that expose ASTs for tasks like refactoring, style checking, and so on. The search keywords for IDE-oriented APIs are "presentation compiler" [3] as well as refactoring support [4]. 
There have been presentations at ScalaDays about some of the topics above. And, the URLs listed below are just a representative sample, there are more for sure. Unlike for Project Roslyn, there's no single website that brings together all the available information on Scala compiler infrastructure. 
References:
[1] http://lamp.epfl.ch/~magarcia/ScalaNET/
[2] http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/
[3] http://ensime.blogspot.com/2010/08/building-ide-with-scala-presentation.html
[4] http://scala-refactoring.org/

Miguel http://lamp.epfl.ch/~magarcia/


Ken McDonald
Joined: 2011-02-13,
User offline. Last seen 42 years 45 weeks ago.
Re: Roslyn


On Sunday, October 23, 2011 12:00:42 AM UTC-5, Olivier Lefevre wrote:
On 10/23/2011 3:39 AM, Rex Kerr wrote:
> I don't believe this sort of language is appropriate for this mailing list.

Please. Strong language is inappropriate but jumping on people and calling them
trolls on a whim is? That's a mite hypocritical, don't you think?

WRONG. BZZZZ.
Your original question intrigued me. Your response disgusted me, and gave you a -8 on my, "is he worth listening to" scale. Since your original question gave you a +3, you're now at -5--not very good for a single (completely non-informational, I might add) response.
I'll probably finish reading out the thread, and then close it, due purely to your response. Makes you feel good, doesn't it?
Ken 
Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
Re: Re: Roslyn
Olivier -
This kind of response is almost never appropriate, nor is it helpful to anyone.  Next time, take the high ground.  Respond with content, not words the convey a hot temper.
I'm curious as to what others think of Roslyn, but where there was once *one* poor email on this thread, there are now several, and I think its utility has been diminished.
- Josh

On Sat, Oct 22, 2011 at 8:56 PM, Olivier Lefevre <lefevrol [at] yahoo [dot] com> wrote:
On 10/23/2011 2:03 AM, Aleksey Nikiforov wrote:
This sounds more like Microsoft advertisement rather than a question,
> even the title. If this was stack overflow this "question" would get
> voted down and closed.

Actually I think *you* are the rude imbecile who needs voted down
and I'm going to do just that. I asked because I know the Scala team
progressively re-engineered the compiler in just that direction to
make it easier on Scala IDE designers and I was curious to learn
how their work compares. Now you just go nicely and f*** off, ok?

The rudeness of some people.

Olivier Lefevre
Joined: 2011-10-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Roslyn

On 10/29/2011 9:24 PM, Ken McDonald wrote:
> you're now at -5 [...] Makes you feel good, doesn't it?

You're being silly. Unlike many of the people posting on StackOverflow, in
asking about Roslyn I wasn't trying to burnish my profile and increase some
kind of numerical ranking: I was asking merely out of genuine interest. This
creeping obsession on the web with modding, scoring and ranking is *very*
ugly and a complete perversion of the original spirit of Usenet. Of course
we often form an opinion on what we read but in assigning public and numerical
scores to postings you are assuming a judgeship nobody appointed you to. This
is the puritan spirit: judge, judge, judge and then let the whole polity know
what your judgment is! You have to give it to them: StackOverflow (and GitHub!)
seem to have perfectly captured the spirit of the times in this respect; they
offer both the self-appointed censors and the tireless self-promoters an arena
where they can meet and have it at it. Personally I'd rather commit the occasional
foul-up and then admit it than give in to this kind of mentality and weigh my
every word and move on a trebuchet.

So if you chose to overreact to my own overreaction you are only hurting
yourself.

Regards,

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland