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

Difference between private (-Y) and advanced (-X) compiler options?

5 replies
Stefan Kuhn
Joined: 2009-10-01,
User offline. Last seen 42 years 45 weeks ago.

I wonder what's the difference between private (-Y) and advanced (-X)
compiler options.

When shouldn't I use -Y?
Are there any guarantees for advanced options which aren't there for
private options?

Jan Kassens
Joined: 2011-04-26,
User offline. Last seen 42 years 45 weeks ago.
Re: Difference between private (-Y) and advanced (-X) compiler o

I assume that private options can change with versions (like private methods), and advanced options are just advanced, but should be forward compatible.

Stefan Kuhn
Joined: 2009-10-01,
User offline. Last seen 42 years 45 weeks ago.
Re: Difference between private (-Y) and advanced (-X) compiler o

To be more specific:
if I'm writing a compiler plugin, may I depend on that some options are
available?
I would like to require the user to set -Yrangepos, but it's not
possible neither in sbt (if filters some options) nor in Scala IDE Beta2
(not all -Y options are available in the UI afaik).

Stefan Kuhn
Joined: 2009-10-01,
User offline. Last seen 42 years 45 weeks ago.
Re: Difference between private (-Y) and advanced (-X) compiler o

Got an answer in #scala :
(17:57:43) extempore: -Y means as far as we're concerned it doesn't
exist. What, the behavior changed? What, it was removed with no
warning? Sorry, don't know what option you are talking about.

Kevin Wright 2
Joined: 2010-05-30,
User offline. Last seen 26 weeks 5 days ago.
Re: Re: Difference between private (-Y) and advanced (-X) compi
If you need to ask how much a -Y flag costs, you can't afford it.
Very rarely will these be needed unless you're working on the compiler, a compiler-plugin, or IDE support.  In which case you should already be familiar enough with the compiler source that you can figure the flags out for yourself.


On 10 May 2011 17:00, Stefan Kuhn <qn.666@gmx.net> wrote:
Got an answer in #scala :
(17:57:43) extempore: -Y means as far as we're concerned it doesn't exist.  What, the behavior changed? What, it was removed with no warning? Sorry, don't know what option you are talking about.




--
Kevin Wright

gtalk / msn : kev.lee.wright@gmail.comkev.lee.wright@gmail.commail: kevin.wright@scalatechnology.com
vibe / skype: kev.lee.wrightquora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

"My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger" ~ Dijkstra
Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 6 days ago.
Re: Re: Difference between private (-Y) and advanced (-X) compi
I think this is the case where Stefan is working on a compiler plugin....

On Tue, May 10, 2011 at 12:24 PM, Kevin Wright <kev.lee.wright@gmail.com> wrote:
If you need to ask how much a -Y flag costs, you can't afford it.
Very rarely will these be needed unless you're working on the compiler, a compiler-plugin, or IDE support.  In which case you should already be familiar enough with the compiler source that you can figure the flags out for yourself.


On 10 May 2011 17:00, Stefan Kuhn <qn.666@gmx.net> wrote:
Got an answer in #scala :
(17:57:43) extempore: -Y means as far as we're concerned it doesn't exist.  What, the behavior changed? What, it was removed with no warning? Sorry, don't know what option you are talking about.




--
Kevin Wright

gtalk / msn : kev.lee.wright@gmail.comkev.lee.wright@gmail.commail: kevin.wright@scalatechnology.com
vibe / skype: kev.lee.wrightquora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

"My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger" ~ Dijkstra

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