Earlier quoted context omitted.
Scala compatibility is not so great. It has its own collections and other libraries. And it does not even support java getters and setters.
Why would you create a new language and then keep a huge part of what developers interact with on a daily basis in such a broken shape as in Java? (Or rack up a massive amount of complexity and break your typesystem by trying to put lipstick on the Java collection pig? (Kotlin).)
Advanced programming languages (2009)
201–208 of 208 posts
Re: Advanced programming languages (2009)
#202> Scala is a rugged, expressive, strictly superior replacement for Java. Scala is not replacement for Java. It runs on JVM and can invoke java code, but has completely different approach than Java. Use Kotlin if you want Java replacement. Also I would argue that Scala is much better suited for writing compilers than Haskel.
> Also I would argue that Scala is much better suited for writing compilers than Haskel. Any examples of how it can help out?
Compiler today must interact with tools such as IDE. If you keep some basic rules, it is reasonably simple to write compiler which can interact with Intellij Idea and provide incremental compilation, live edit hints, error messages.
In Haskel you dont have any of that.
Re: Advanced programming languages (2009)
#203Earlier quoted context omitted.
this isn't a fair comparison. It fails to account for what happens after the files are downloaded, which is where overall js code size has an outsized effect.
I think people have been including jQuery just fine for the last decade.
Re: Advanced programming languages (2009)
#204Earlier quoted context omitted.
I think people have been including jQuery just fine for the last decade.
Yes, but jquery is much smaller than an empty scala.js app. jquery is about 25kb gzipped and minified (the other comment used the raw size) whereas scala js is 45kb for an empty application.
Re: Advanced programming languages (2009)
#205Earlier quoted context omitted.
The size of the Javascript generated by Scala.js alone makes it a non starter for serious projects.
Look at here: https://www.scala-js.org/ "The generated JavaScript is both fast and small, starting from 45kB gzipped for a full application." - 45kB... jQuery is ~80kB.
Re: Advanced programming languages (2009)
#206This post is very fortuitous for me. I've been looking to learn a functional language and I had more or less narrowed my options to Haskell, OCaml and Scala. I liked the breakdown between these languages and the resources. Can anyone who programs in Haskell or OCaml regularly tell me the current state of standard and third party library support? I'm very attracted to Scala because it has JVM support, which sounds fan…
Knowing Java won't help you much in learning Scala. It's the functional programming parts that will trip you up if you haven't done that before, and this is the most valuable part to learn. I use Scala every day, and it was easy to learn; but I suspect that was because I did a lot of functional programming before that.
Re: Advanced programming languages (2009)
#207Earlier quoted context omitted.
The combination of stronger type systems (especially dependent typing), less error-prone design (no manual memory management, no mutation, no global state, no loops/off-by-one errors), separated side effects (crashing during computation won't break things, less places for outside interference/external failure, etc.), and better error handling (no null, usually no exceptions meaning you have to encode failure into the…
Type systems - already available in the most popular languages no memory management - c++, go, java come to mind No mutation - has a side effect which you probably will never mention. But it will become important as the internet of things gets smaller No global state - in what environments would that ever be an encouraged paradigm? Javascript? No loops/off by one - you still need loops, they are just recursive. The d…
This implies you haven't actually spent time with a strongly typed functional language like Haskell. Once you have, it's hard to continue thinking of Java or C++ as having "type systems".
Re: Advanced programming languages (2009)
#208I would argue that a well-known language is fairly expressive in the sense that it is well-known. Imagine English itself was a programming language - this is the best. But for now I would recommend using those who are commonly used in the common platforms of interest (Java, javascript, C etc)
> Imagine English itself was a programming language That's a terrible idea. https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffal...