Re: Improving IDE support for scala GSOC 2105
Muhammad Mohsin Khan Niazi <[email protected]>
| Newsgroups | gmane.comp.lang.scala |
|---|---|
| Message-ID | <[email protected]> |
EDIT: Scala style guide <http://docs.scala-lang.org/style/> will be a nice
place to start.
On Tuesday, March 17, 2015 at 1:14:05 PM UTC+5, Muhammad Mohsin Khan Niazi
wrote:
>
> Hi everyone,
>
> I am thinking to improve IDE support for Scala by pointing out
> improvements (inside code editor) that can help in writing better code. The
> main idea is inspired by what Resharper does for C# or IntelliJ/Netbeans
> does for Java 8. Take a simple example where anonymous method can be
> replaced by lambda expression Idea IDE will point out that this method can
> written in more concise way.
>
>
> <https://lh3.googleusercontent.com/-v-RbbYBWlTs/VQfhJO6P8kI/AAAAAAAAAUs/6CDbSihSQj4/s1600/Screenshot%2Bfrom%2B2015-03-17%2B12%3A34%3A40.png>
> Similarly resharper points out many instances where single line LINQ can
> replace many lines of traditional code.
>
>
> <https://lh4.googleusercontent.com/-teAUiw_w0uM/VQfhh6rtFwI/AAAAAAAAAU0/ZwIsW8LckRY/s1600/index_codeanalysis.png>
>
> (image source: www.jetbrains.com <https://www.jetbrains.com/resharper/>)
> <https://www.google.com/search?q=resharper+9&safe=active&client=ubuntu&hs=mYo&channel=fs&biw=1252&bih=589&tbm=isch&tbs=simg:CAQSpwEJCkzce8Klxu0akgELELCMpwgaiAEKOggCEhSjCNkJmwjCCc4JpxC_1CMQPnQirHBogZIa3dZ0IwLBpFTovbfQ9uf5XHsjiUsAe8HCAA5nSnzwKSggDEhTCDNMBwwzSAdcBuQzPHcEM-wvqBxowghvXE_1d82Y0IDv6MqDzZ0slmfCd4RgfdgbES6eRAQkBCEGD9wHKcXBhGxJkBPgJSDCE0Cu0KpGmvbA>
>
> <https://lh4.googleusercontent.com/-teAUiw_w0uM/VQfhh6rtFwI/AAAAAAAAAU0/ZwIsW8LckRY/s1600/index_codeanalysis.png>
> Similarly for Scala we can replace a pattern matching solution: (Example
> from
> http://reactive.xploregroup.be/blog/9/Scala-tips:-Improving-the-imperfect-part-1
> )
>
> val result: Option[String] = person.contactDetails match {
> case Some(details) => details.address match {
> case Some(address) => address.street match {
> case Some(street) => Some(street.capitalize)
> case _ => None
> }
> case _ => None
> }
> case _ => None
> }
>
> with the flat map solution to get more concise code:
>
> val result = person.contactDetails.flatMap { details =>
> details.address.flatMap { address =>
> address.street.map { street =>
> street.capitalize
> }
> }
> }
>
>
> But this is just the start we can have a look at other IDEs and think of our own ideas to
> improve the IDE support for Scala including bug fixes. So what do you guys think of this idea?
> Is it suitable for GSOC?
>
>
>
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.