News for hackers. Stuff that matters.
Re:Reasonable Scala Compiler by hota_mazi on Thursday August 17, 2017 @11:53PM (#15043423)
Regardless of Scala, it's an absolutely insane idea to develop your own language to write your apps.

Either stick to the real Scala or switch to Java or Kotlin, but writing your own language is a failure waiting to happen.

I give this project a few more months before it gets canceled.

Re:Reasonable Scala Compiler by mintplant on Friday August 18, 2017 @12:08AM (#15043482)
Funny you should mention Kotlin, as it's the result of JetBrains doing just that: developing their own language to write their apps. Mozilla represents another successful example with Rust.

I'm of the opinion that developing new, purpose-built languages (or extending existing ones) is a strategy that isn't given as much consideration as it should.

Re:Reasonable Scala Compiler by hasenj on Friday August 18, 2017 @01:38AM (#15043851)
> Funny you should mention Kotlin, as it's the result of JetBrains doing just that: developing their own language to write their apps.

JetBrains is in the business of IDEs and similar programmer tools. Kotlin fits right in with the rest of their business.

Imagine if JetBrains produced a chatting program, because their engineers were not satisfied with the existing options.

Re:Reasonable Scala Compiler by banjoriver on Friday August 18, 2017 @01:45AM (#15043873)
You mean something like this: https://plugins.jetbrains.com/plugin/233-idetalk

:)

Re:Reasonable Scala Compiler by bmc7505 on Friday August 18, 2017 @02:09AM (#15043959)
Re:Reasonable Scala Compiler by Throaway786 on Friday August 18, 2017 @12:53AM (#15043676)
Jetbrains is a compiler/IDE company, they have the expertise to do such task. What will Twitter gain from this endeavor?
Re:Reasonable Scala Compiler by sulam on Friday August 18, 2017 @01:04AM (#15043724)
1) Twitter certainly has the right engineers to do this.

2) If they can speed up Scala compile times by 5 minutes a day (extremely conservative -- compilation times tend towards 1s per file), across even 1,000 developers (Twitter had around 2000 when I was there) that immediately funds a 5+ person development team. This isn't the sort of thing you throw a huge team at, anyway.

3) It helps with recruiting talent who is looking to work in environments that have strong type safety, or who just want to work for companies willing to invest time in making their software engineers more productive.

Re:Reasonable Scala Compiler by Scarbutt on Friday August 18, 2017 @01:02AM (#15043717)
developer productivity.
Re:Reasonable Scala Compiler by notfried on Friday August 18, 2017 @01:24AM (#15043795)
More like developer retention.
Re:Reasonable Scala Compiler by carlosdp on Thursday August 17, 2017 @11:58PM (#15043445)
That's... not true. You mention Kotlin, that was developed by JetBrains as a better language to develop Intellij and plugins.

Hack/HHVM was developed by Facebook to modernize PHP.

There are plenty of cases where organizations successfully developed their own languages/compilers that gave them advantages. It's insane only if you have no good reason to do it. This sounds like they have a need: compile times are slow.

Re:Reasonable Scala Compiler by sk5t on Friday August 18, 2017 @12:10AM (#15043489)
JetBrains' business and expertise is language stuff, lexers, compilers--isn't it fair to give them a pass on making a language?

One needn't extend the same consideration to, say, fogcreek...

Re:Reasonable Scala Compiler by alexandercrohde on Friday August 18, 2017 @12:08AM (#15043483)
you think compile times are so slow that they're saving time by writing a whole language? I'd like to see the numbers on that...
Re:Reasonable Scala Compiler by carlosdp on Friday August 18, 2017 @07:44PM (#15050619)
We're talking about a large organization that probably does 1000s or 10000s of builds a day, so yea it might
Re:Reasonable Scala Compiler by hasenj on Friday August 18, 2017 @01:39AM (#15043855)
> Hack/HHVM was developed by Facebook to modernize PHP.

Yes but why use PHP in the first place? It's not the right tool for something like Facebook.

Re:Reasonable Scala Compiler by Joeri on Friday August 18, 2017 @02:36AM (#15044042)
In 2003 PHP was the most sensible choice for rapid prototyping of a web app and for early facebook it was more important to iterate and experiment than build it right. Even today it still holds its own, but there are plenty of alternatives (rails, node.js, ...)
Re:Reasonable Scala Compiler by foolfoolz on Friday August 18, 2017 @12:23AM (#15043540)
> it's insane to write your own language > switch to Java or kotlin

ah yes rewriting in a new language, the classic not-insane approach

Re:Reasonable Scala Compiler by hota_mazi on Friday August 18, 2017 @03:39AM (#15044290)
I offered several alternatives and I made it clear they belong in a spectrum. Don't make it sound like I claimed it was binary.

If the options are "Keep writing in Scala", "Port to Kotlin" and "Write a Scala compiler", the latter is clearly the worst and most costly of all.

Re:Reasonable Scala Compiler by PeterisP on Friday August 18, 2017 @04:32AM (#15044506)
Porting a large codebase can easily be harder than writing a compiler, many companies have codebases much larger than a reasonable compiler.
Re:Reasonable Scala Compiler by ucho on Friday August 18, 2017 @07:22AM (#15045199)
It worked out for Facebook and PHP so maybe that is why they want to give it a try.
Re:Reasonable Scala Compiler by zeckalpha on Friday August 18, 2017 @03:36AM (#15044276)
You posted this on hacker news, which is essentially the only app written in its language.
Re:Reasonable Scala Compiler by yawaramin on Thursday August 17, 2017 @11:59PM (#15043450)
It's not a new language, it's a reduced subset of the same language.
Re:Reasonable Scala Compiler by hota_mazi on Friday August 18, 2017 @12:02AM (#15043459)
You're playing with words. They are creating their own language which is a subset of Scala, and they decide which features to keep based on whether they are fast enough to compile.

The point is: developing your own language to ship your apps is crazy.

Re:Reasonable Scala Compiler by swsieber on Friday August 18, 2017 @12:33AM (#15043583)
I think there is a significant difference in that developing g your own language requires a rewrite to use new language, not a tweak to existing code..

If you insist on them "creating a new language" then say that they created a new language to speed up development, not to ship their apps. They were already shopping their apps. This is an optimization that helps them speed up development on their existing codebase.

Re:Reasonable Scala Compiler by sulam on Friday August 18, 2017 @01:06AM (#15043735)
Insane choices start to look very rational at sufficient scale.
Re:Reasonable Scala Compiler by yawaramin on Saturday August 19, 2017 @02:50PM (#15054952)
Is http://asmjs.org/ a new language?

(Hint: no. http://asmjs.org/faq.html )

Also,

> The point is: developing your own language to ship your apps is crazy.

It's crazy until you get to Facebook (PHP -> Hack) / Google (Go/Dart) /Twitter scale, then it starts looking like a really good idea.

Re:Reasonable Scala Compiler by hasenj on Friday August 18, 2017 @01:40AM (#15043863)
Not to mention they can also decide laters to add new features to this new language, further diverging from Scala.
Re:Reasonable Scala Compiler by hota_mazi on Friday August 18, 2017 @02:06AM (#15043949)
They are already diverging from Scala since they are only implementing a subset of it:

> We are planning to start small with a trivial subset of Scala and then gradually add features, carefully measuring their impact on compilation performance

It will be a while before they reach parity with Scala, and I'll bet the project will be canceled before they even come close.