It's a totally minor point, and people can get used to either approach. So we decided to not fight convention in these minor things, when there were other places where we did want to make a difference.
I always think about how to make Scala more popular.
I noticed that the most successful frameworks and tools in Scala community usually support Java API, Kafka, Play, Akka, Spark for example. At the same time, there are a much larger population of Java developers than Scala.
So what prevent Java developers move to Scala even when their most brilliant library authors choose Scala?
I think syntax is the largest block. People worry about that a new language would bring risks into their working production.
On the contrary, there are some successful languages like C++, JSX and Generic Java. They all keep source-level compatibility with their original languages (C, JavaScript, and Java).
Scala's author, Martin Odersky, himself is not a syntax fan, in The Goals of Scala's Design, he said:It's a totally minor point, and people can get used to either approach. So we decided to not fight convention in these minor things, when there were other places where we did want to make a difference.
What the battles in Scala's design did Martin pick? In my honest opinion, these battles should be the typer and the backend.
So, I wonder if we can enable the Java source code compilation in scalac, and still keep using scala's AST, typer and backend. As a result, we could bring the power of Scala's macro system and Scala.js into Java world.
In order to achieve the powers from Scala world, a Java developer only need to switch the java compiler in his Gradle or Maven configuration, without learning any new language.
I guess all the Scala frameworks would benefit from this idea, especially Scala.js, which may be called Java.js then.
Do you think this idea attractive, guys?
--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "scala-internals" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-internals/GCKWlh4z1Zo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I didn't understand why there is a project that compiles Java into Scala.js IR. Why not reuse the existing Java to AST parser?
Simon Schäfer <ma...@antoras.de>于2016年4 月24日周日 上午3:31写道:
Hello,
No, that GSoC project will not use any of the nsc infrastructure. It will reuse an existing Java parser and typechecker, and compile directly from Java AST to Scala.js IR.
Cheers,
Sébastien
I always think about how to make Scala more popular.I noticed that the most successful frameworks and tools in Scala community usually support Java API, Kafka, Play, Akka, Spark for example. At the same time, there are a much larger population of Java developers than Scala.So what prevent Java developers move to Scala
even when their most brilliant library authors choose Scala?I think syntax is the largest block. People worry about that a new language would bring risks into their working production.
On the contrary, there are some successful languages like C++, JSX and Generic Java. They all keep source-level compatibility with their original languages (C, JavaScript, and Java).
Scala's author, Martin Odersky, himself is not a syntax fan, in The Goals of Scala's Design, he said:It's a totally minor point, and people can get used to either approach. So we decided to not fight convention in these minor things, when there were other places where we did want to make a difference.What the battles in Scala's design did Martin pick?
In my honest opinion, these battles should be the typer and the backend.
So, I wonder if we can enable the Java source code compilation in scalac, and still keep using scala's AST, typer and backend. As a result, we could bring the power of Scala's macro system and Scala.js into Java world.
In order to achieve the powers from Scala world, a Java developer only need to switch the java compiler in his Gradle or Maven configuration, without learning any new language.
I guess all the Scala frameworks would benefit from this idea, especially Scala.js, which may be called Java.js then.
Do you think this idea attractive, guys?--