5 ms·
> I would have a hard time recommending Scala Native over Rust. Why? Scala is so much nicer. > I would have a hard time recommending Scala.js over Typescript
by tytytytytytytyt 9y ago
> I would have a hard time recommending Scala Native over Rust.
Why? Scala is so much nicer.
> I would have a hard time recommending Scala.js over Typescript.
For this too, Scala is so much nicer. The base libraries are far better than in both Rust and TS.
> I have a hard time convincing JVM devs that Scala is a good choise over Kotlin. At the place I work in all new projects are Kotlin, and Scala is used for the projects that were started in it.
That sounds strange. I know Scala's got some warts and all, bit I still can't imagine Scala devs wanting to downgrade to Kotlin.
- dtech 9y ago> Rust The type system is very good. Denys Shabalin is doing amazing work but Scala Native is still an early mostly 1-man project and not production ready, rust is a production-ready language with a large number of backers. The rust ecosystem is much larger than the Scala native ecosystem. > Typescript Types solve my biggest gripe with Javascript. It's singleton and union type support is leagues ahead of Scala and Dotty and a decent patch for some of its omissions. It's a much closer fit to browsers. The ecosystem is gigantic. Frontend devs know Javascript, you can convince them to learn Typescript but not Scala and the ramp-up time on Typescript is super low. > Switching to Kotlin The Scala devs aren't happy with it, but ultimately it's about the project not the language. It's mostly new hires and previous Java devs that have a negative impression of Scala and prefer Kotlin.
- eklavya 9y ago> It's singleton and union type support is leagues ahead of Scala and Dotty. What? I don't understand it's better than dotty which has a proven core? Typescript's type system wasn't (isn't? I don't know) even sound. > Java devs that have a negative impression of Scala and prefer Kotlin To each their own but if you learn Scala you can never go back to Java/Kotlin, there is not even a contest. Edit: newlines added
- tytytytytytytyt 9y agoYou're the hero we deserve.
- seanmcdirmid 9y agoTypescript is incredibly unsound and at the same time incredibly useful. It rejects the notion that types are just for hard correctness guarantees and focuses on tooling.
- tytytytytytytyt 9y agoSo 'tooling' is it's real selling point? Wow... Last I checked it still used the same mean arrays and dicts, too. Scala's default libraries blow/blew it out of the water.
- seanmcdirmid 9y agoThat's not what tooling means. What you are talking about are called "libraries", which, using the same libraries with better tooling, is one of the core strengths of TypeScript.
- tytytytytytytyt 9y agoThose were 2 separate thoughts. I was not conflating tooling with libraries. And I'm still amazed that you seem to think tooling would be a main selling point or 'core strength' for it.
- seanmcdirmid 9y agoYes. The compiler catches most type errors (depending on how faithful you are to the type system), and code completion and refactoring are great also.
- dtech 9y agoYou should really check out how to do ADT's in TS. It's incredibly simple and intuituve thanks to the union and Singleton support. type Shape = Point | Circle interface Point { type: "Point" x: number } interface Circle { type: "Circle" center: number } let x: Shape = foo() if(x.type == "Circle") log(x.x) // Error It's enterily generic and flows through the whole type system. It makes nullability trivial and `Option` superfluous, since `Option<T>` is an alias for `T | null`. If you check it for null once the type will immediately become `T` from then on. Try something like this with Dotty's enums, it's super easy to hit the limits there.
- weego 9y agoBut as a commercial choice, the depth of available talent with JS experience vs Scala just makes Scala.js an absolute non-starter. Even if you found someone they will be potentially double the salary. So you're stuck cross training developers to write something they could have done anyway with less cognitive load. I admire what scala.js is and I've dabbled with it for my startup for my own indulgence but it's window for viability is tiny.
- drb91 9y agoWhat makes scala "nicer"? Why is Kotlin a "downgrade"? Are you possibly just giving your opinion?
- kod 9y agoPattern matching. Higher kinded types.
- tytytytytytytyt 9y ago> Are you possibly just giving your opinion? Well yes, in the same way everyone here is... But no, if you look at the features of the languages there's a clear difference.