Live data from Hacker News

Towards Scala 3

scala-lang.org

241–250 of 383 posts

Re: Towards Scala 3

#241

Earlier quoted context omitted.

> Is it actually unsound if you perform no casting? Yeah, it is. At the very least, I know that function parameters are bivariant, which isn't sound: function foo(callback: (obj: Object) => void) { callback("not a bool"); } function main() { foo(function (bool: Boolean) { if (bool) window.console.log("!"); }); } This compiles without a type error but ends up assigning a string to a parameter of type bool.

I'm a Flow user rather than TS (and Flow complains about that code out of the box), but you are not telling us all: Since TS 2.6, if you enable all the optional " strict " mode checks than TypeScript does complain about that code. I see no disadvantage in those checks, e.g. "strictFunctionTypes", being optional, since you can always make them mandatory for your own project(s). To test it: - Go to the TS Playground at…

Is that option documented somewhere? I imagine there are some tradeoffs with enabling it.

Re: Towards Scala 3

#242

Earlier quoted context omitted.

> Why are people so intent to bash sombody else's language choices?! Partially it's simple tribalism. But part of it is also the rational awareness of the opportunity cost of investing in a language other than the author's preferred one. The more people using language X that I don't like, the fewer people using my preferred language Y. That means fewer libraries I can use, docs I can read, bugs that get fixed, etc. L…

That might be true to some extend, but many languages have completely different target audiences. People whose favourite language is Go, will probably not move to Scala (and vice versa). Kotlin vs Scala is an easier to understand competition. In any case, if people want other people to invest in "their language", they should focus on making that language and its ecosystem compelling to use, not bash other languages..…

[deleted]

Re: Towards Scala 3

#243

Earlier quoted context omitted.

I'm a Flow user rather than TS (and Flow complains about that code out of the box), but you are not telling us all: Since TS 2.6, if you enable all the optional " strict " mode checks than TypeScript does complain about that code. I see no disadvantage in those checks, e.g. "strictFunctionTypes", being optional, since you can always make them mandatory for your own project(s). To test it: - Go to the TS Playground at…

Is that option documented somewhere? I imagine there are some tradeoffs with enabling it.

https://www.typescriptlang.org/docs/handbook/release-notes/t...

> TypeScript 2.6 introduces a new strict checking flag, --strictFunctionTypes.

> The --strictFunctionTypes switch is part of the --strict family of switches, meaning that it defaults to on in --strict mode.

> Under --strictFunctionTypes function type parameter positions are checked contravariantly instead of bivariantly.

> ...(etc.)

Re: Towards Scala 3

#244
post #2

Just curious, what companies (or kinds of companies) are betting on Scala nowadays? It seems that the people wanting "better Java" all decided they like Kotlin, and the functional programming people now gravitate more towards either F# (for .NET ecosystem) or OCaml/Reason (for the more unixy world). And the academic/research/learning crowd seems to like Haskell more. Who's still in Scala boat? Are Google or Fb or oth…

If you make heavy use of Spark there is still no better language/ecosystem than Scala.

Re: Towards Scala 3

#245
post #122

Disclaimer : I'm nobody important, but I do have an opinion If scala team were to disavow sbt, that'd be the single best thing they could possibly do for the ecosystem. I used to write a lot of scala, and working with sbt was enough to eventually get under my skin. I really like some of the OOP aspects of scala, the left-to-right style of thinking matches how my brain works. Scala having a lot to offer can distract n…

I've been using Gradle to build Scala projects for a while now without any issues.

Re: Towards Scala 3

#246
post #161
post #122

Disclaimer : I'm nobody important, but I do have an opinion If scala team were to disavow sbt, that'd be the single best thing they could possibly do for the ecosystem. I used to write a lot of scala, and working with sbt was enough to eventually get under my skin. I really like some of the OOP aspects of scala, the left-to-right style of thinking matches how my brain works. Scala having a lot to offer can distract n…

> If scala team were to disavow sbt, that'd be the single best thing they could possibly do for the ecosystem. Seconded. Between http://www.lihaoyi.com/mill/ and https://bazel.build/ , there are plenty of alternatives.

Thirded. There are some exciting things happening in the Scala build tool space right now. We're migrating everything to Bazel right now, including our Scala code. Bazel + Scala is not amazing yet, but so far I have enjoyed it much more than sbt. It's also very nice to use the same build tool across all our languages.

Re: Towards Scala 3

#247
post #192

Earlier quoted context omitted.

The reality is that a language lives or dies by its ecosystem - particularly when it comes to a language like Scala that's in a tightly symbiotic relationship with its IDEs (the next time someone tries to sell you a "visual programming language", look at Scala for a language that makes really effective use of the GUI for programming without compromising the things that make textual programming languages good - see e.…

As a fellow emigrant of `Scala is the best island` forced off for pragmatic reasons. I've been around scala long enough to see the rise and fall of multiple expeditions into the bowels of the OSGI eclipse cave of horrors (Sean McDirmid / Miles Sabin etc). Before switching horses and settling in Intellij for several years. So I understand where you are coming from. I've since jumped ship again to vscode (along with ty…

Not sure if you read it in the article, but Scala 3 will have LSP support (if it doesn't already).

Re: Towards Scala 3

#248

Earlier quoted context omitted.

I'm a Flow user rather than TS (and Flow complains about that code out of the box), but you are not telling us all: Since TS 2.6, if you enable all the optional " strict " mode checks than TypeScript does complain about that code. I see no disadvantage in those checks, e.g. "strictFunctionTypes", being optional, since you can always make them mandatory for your own project(s). To test it: - Go to the TS Playground at…

Is that option documented somewhere? I imagine there are some tradeoffs with enabling it.

Tradeoffs? It might frustrate some people more accustomed to JS' loose type system.

Re: Towards Scala 3

#249
post #2

Just curious, what companies (or kinds of companies) are betting on Scala nowadays? It seems that the people wanting "better Java" all decided they like Kotlin, and the functional programming people now gravitate more towards either F# (for .NET ecosystem) or OCaml/Reason (for the more unixy world). And the academic/research/learning crowd seems to like Haskell more. Who's still in Scala boat? Are Google or Fb or oth…

We use Scala heavily. If kafka/Spark/Monoids/Semigroups/Cats/Algebird makes any sense to you and you are looking for a job, send your resume to mansur.ashraf@apple.com

Re: Towards Scala 3

#250

Earlier quoted context omitted.

Is that option documented somewhere? I imagine there are some tradeoffs with enabling it.

https://www.typescriptlang.org/docs/handbook/release-notes/t... > TypeScript 2.6 introduces a new strict checking flag, --strictFunctionTypes. > The --strictFunctionTypes switch is part of the --strict family of switches, meaning that it defaults to on in --strict mode. > Under --strictFunctionTypes function type parameter positions are checked contravariantly instead of bivariantly. > ...(etc.)

Contravariance then, right. Thanks! I haven't gotten into Typescript yet, and at this point it looks fairly large and a little daunting, so this is helpful.
Post reply on HN