3 ms·
Here's the reason for why I asked. You're saying that: > I've seen the language adding feature over feature instead of addressing critical aspects such as good
by bad_user 11y ago
Here's the reason for why I asked. You're saying that:
> I've seen the language adding feature over feature instead of addressing critical aspects such as good IDE support or decent build tools
Well, Scala 2.11 hasn't added any features, being a release meant for stabilizing, modularizing and optimizing the compiler and the library, fixing many non-withstanding issues. So zero new features.
Scala 2.10, released Jan/04-2013 (2 and a half years ago, OK?), was the release that added some features which included Value Classes / Implicit Classes (they are linked, for providing extension methods, as a refinement of implicit conversions), String interpolation (any sane language has it, plus Scala can now deprecate the conversion to String that was imported from Java), plus macros as experimental. Besides macros, everything else is minor and macros are meant for library authors as a neater way of building compiler plugins.
Scala 2.9, released May/12-2011, only includes changes to the standard library and not the language.
Scala 2.8, released Jul/14-2010 (5 years ago), introduced named and default arguments, package objects, changes to implicits, type constructor inference and a completely redesigned collections library. This release was so big for its users that it should have been called Scala 3. Before Scala 2.8 the language wasn't suitable for usage and Scala 2.11 is pretty much the same language as Scala 2.8.
So I'm really wondering what "feature after feature" you're referring to. Really, take other programming languages that aren't Java and compare the features added in the last 5 years to Scala's history. You'll have a surprise ;-)
Also IntelliJ IDEA is pretty awesome for Scala, I've been using it for the last 3 years. It's worse than IntelliJ IDEA for Java, but it is better than Eclipse for Java or Visual Studio for C#. There's also Scala IDE (built on top of Eclipse) and Ensime (a pretty capable Emacs / Atom / SublimeText plugin). Other platforms can only dream of such support, including Kotlin, or C# for that matter. I'm not joking.
> Sure, I could name things that I don't like
So why don't you name those things that you don't like?
- incepted 11y ago> So why don't you name those things that you don't like? Because then you will tell me that I don't like these features because I don't understand them? But alright, here are a few: - The type projector lambda syntax is absurdly arcane: `({type λ[α] = Either[A, α]})#λ]` - The curry syntax is silly as well (multiple parentheses) - The "_" character has eleven different meanings depending on where it's used [1] [1] http://stackoverflow.com/questions/8000903/what-are-all-the-uses-of-an-underscore-in-scala http://stackoverflow.com/questions/8000903/what-are-all-the-...
- lmm 11y agoThe type lambda syntax is arcane, but that's not a feature - indeed if anything it's the absence of a feature (would you favour explicit support for type lambdas, like the plugin does?). If you're complaining about the syntax of curried functions then again that's not a complaint about a feature; likewise _. I'm not saying they aren't issues, but none of the things you mention is about Scala having "too many features".
- yawaramin 11y agoTo be fair, isn't type projection a Scala feature? Have you ever seen another language that can do it?
- lmm 11y agoIt's not a language-level feature. It's a pattern that makes use of several features - type members, structural types, member selection. (You can often write these things more readably by splitting them onto two lines, putting the type alias in one place and the use of it in another, avoiding the need for the structural type and member selection). It's like the visitor pattern in a language that doesn't have pattern matching, or an explicit Y combinator in a language that doesn't have recursion. Some newer languages have this kind of functionality (in Haskell it's a GHC extension, I think).
- bad_user 11y agoPersonally I'm not having discussions about Scala with the purpose of winning arguments, but rather with the purpose of clearing misunderstandings and this goes both ways. The "_" character is a placeholder for things that can be named, but for which you don't care about that name. And because you don't care about the name, it can function as a wildcard (i.e. any). To me all use-cases of the underscore make perfect sense and I can't remember a single instance in which I was confused by its meaning. Type lambdas are arcane, but as @lmm points out, this is more about the absence of a feature. Basically in Scala type lambdas do not have first class support and so they are based on Scala's abstract types. As to why they don't have first class support? Well, because people complain about too many features ;-) But it's worth pointing out that the TypeLevel folks have plans to introduce first-class support in their fork and thus propose an improvement. And also, because of the work that happened in Dotty, Scala the language is heading towards a DOT calculus foundation, along with a unification of higher kinded types with abstract types, which should iron out the edge cases. The curry syntax seems silly if you come from SML, Ocaml, Haskell or languages from the ML family in general. In such languages all functions have exactly one argument. But Scala is not an ML language and so it doesn't do currying by default. It's annoying sometimes, but as with all design choices there are disadvantages and benefits.