Talk:Scala (programming language)

message: What about the band from Belgium? — Preceding unsigned comment added by 217.82.196.35 (talk) 17:52, 3 December 2004 (UTC)
thread_title: Belgian Band

message: The programming language and the music stuff should not be in one article...   — Preceding unsigned comment added by 24.217.227.208 (talk) 03:46, 23 April 2005 (UTC)
thread_title:  Make this a disambiguation page? 

message: Seems to me that this article is a bit too promoting of the Scala language. A more neutral p-o-w  would be in place.
Which parts specifically do you think should be changed? -- Phouk 
I didn't write the first comment about it being too self-promoting, but it certainly has that feel.  Here's an example sentence: "Scala provides a unique combination of language mechanisms that make it easy to smoothly add new language constructs in the form of libraries".  The word "unique" is particularly objectionable.  There are (at least) thousands of interpreted languages out there.  Is scala truly the only one for which it is "easy to smoothly add new language constructs in the form of libraries" to?
: IMHO, if 'unique' is kept, it should be supported by an external quote / citation. Alternatively, what about calling it a 'novel' approach. The way Scala can be extended is indeed strikingly different from what we know of other mainstream languages (It's not dynamically rebinding a prototype and it's not some kind of macro feature) 93.104.71.211 (talk) 23:08, 25 February 2011 (UTC)
thread_title:  Promotion. 

message: The article currently contains a reference to 'Polymorphic methods' which cross links to Polymorphism (computer science) which is a redirect to Type polymorphism.  Is there a better page to link to?  Regards, Ben Aveling 09:11, 7 September 2008 (UTC)
thread_title:  polymorphic methods. 

message: The given pronunciation doesn't seem right. The main author of Scala (Odersky) pronounces it (in the podcast referenced by the article, for example) as the Italian word (meaning stairs, stairway, ladder etc.). Something like /'ska:la/ in fake IPA. I'm not sure how to show both pronunciations in Wiki but I'd be even happier with just the one correct pronunciation.  —Preceding unsigned comment added by 92.234.33.124 (talk) 20:09, 11 February 2009 (UTC)
thread_title:  Pronunciation of Scala 

message: This article does not say whether Scala allows imperative (non-functional) programming style. Please ammend the article with an answer on the question whether Scala is a purely functional, mostly functional, or both functional and imperative language. 77.127.45.42 (talk) 00:29, 14 November 2009 (UTC)
thread_title:  Imperative programming in Scala? 

message: In...
   def qsort(list: List[Int]): List[Int] = 
   list match {
     case Nil => Nil
     case pivot::tail => qsort(tail.filter(_ < pivot)) ::: pivot :: qsort(tail.filter(_ >= pivot))
   }
... it seems to me that the code may [always does?] yield an incorrect duplication of the pivot value [1 more copy than in the input], and yet changing "qsort(tail.filter(_ >= pivot))" to "qsort(tail.filter(_ > pivot))" will only replace one problem with another: now, the pivot value will be represented only once in the sorted output even if it was present multiple times in the input.  I think the "solution" is to replace the existing example with the one above [i.e. on this talk page].  Maybe I am misunderstanding something here.  Comments and/or suggestions?  —Preceding unsigned comment added by 66.114.69.71 (talk) 07:41, 26 November 2009 (UTC)
thread_title:  Correctness of given functional quicksort? 

message: I think the partitioning of the collection was not done correctly, pivot is the element in the middle of the sequence, in the traditional quick-sort algorithm. Moreover a good typing would use Seq instead of List or Array.
	def qsort(seq: Seq[Int]): Seq[Int] = {
		if (seq.length < 2)
			seq
		else {
			val pivot = seq(seq.length / 2)
			qsort(seq.filter(pivot > _)) ++
				seq.filter(pivot == _) ++
				qsort(seq.filter(pivot < _))
		}
	}
(not signed)
In an ideal case, the pivot would be set to the median of the values contained in the list. Choosing a number in the middle of a list of randomly distributed numbers would not improve speed at all, only harm it by adding a division to every recursive call (Though division is also considered a constant-time operation). In any case, I think the argument against the current version is moot and would not improve the article. Enum (talk) 06:05, 23 January 2010 (UTC)
thread_title:  Correct Scala code for qsort 

message: Some source links seem to point to wrong or dead resources (e.g. [2] would point to .NET if the link were not dead, although the text talks about Java Micro Edition).
--Segfaulthunter (talk) 01:11, 26 June 2010 (UTC)
thread_title:  Sources 

message: Article: Scala is a pure object-oriented language in the sense that every value is an object. Data types and behaviors of objects are described by classes and traits. Class abstractions are extended by subclassing and by a flexible mixin-based composition mechanism to avoid the problems of multiple inheritance.
scala-lang.org: Scala is a pure object-oriented language in the sense that every value is an object. Types and behavior of objects are described by classes and traits. Classes are extended by subclassing and a flexible mixin-based composition mechanism as a clean replacement for multiple inheritance.
Article: The design of Scala acknowledges the fact that, in practice, the development of domain-specific applications often requires domain-specific language extensions. Scala provides a novel combination of language mechanisms that make it easy to smoothly add new language constructs in the form of libraries:
* any method may be used as an infix or postfix operator, and
* closures are constructed automatically depending on the expected type (target typing).
A joint use of both features facilitates the definition of new statements without extending the syntax and without using macro-like meta-programming facilities.
scala-lang.org: The design of Scala acknowledges the fact that in practice, the development of domain-speciﬁc applications often requires domain-speciﬁc language extensions. Scala provides a unique combination of language mechanisms that make it easy to smoothly
add new language constructs in form of libraries:
- any method may be used as an inﬁx or postﬁx operator, and
- closures are constructed automatically depending on the expected type (target typing).
A joint use of both features facilitates the deﬁnition of new statements without extending the syntax and without using macro-like meta-programming facilities.
There may be more; I see nothing on Scala's site indicating that the text was released under Creative Commons. I'm hoping someone will verify that I'm not overlooking something obvious :) — anndelion ※ 22:24, 12 April 2011 (UTC)
thread_title:  Too close for comfort / barely-disguised plagiarism? 

message: Knowing jack about Scala, I'm reluctant to edit the source code examples. However, the example that compares java.lang.Math in the two languages is wrong. All java.lang classes get imported automatically. See Java Specification 7.3Isaac Rabinovitch (talk) 23:34, 9 August 2012 (UTC)
thread_title:  No import needed for java.lang in Java 

message: This part:
"It cleans up what are often considered to have been poor design decisions in Java (e.g. type erasure"
is at least misleading if not completely wrong. Type erasure in Scala is still present. There are workarounds, yes, but it is not solved(or "cleaned up") by the language at all. The same workarounds can be implemented in Java.  — Preceding unsigned comment added by 149.135.146.69 (talk) 11:43, 15 April 2013 (UTC)
thread_title:  Scala still has type erasure 

message: I feel the current introduction paragraph(s) are really poor and messy. Neither are they well structured, nor do they strike a good balance between conciseness and detail. In some questions they go into very specific details, while some things are almost identically repeated across different paragraphs.
It is indeed difficult to write a good introduction to Scala that strikes that balance. So my suggestion is to elaborate a bit on a new introduction in the talk page, before messing around with the actual article.
Here is my take on it (no references, -sigh-). Paragraph 1 should give a good overview of its scope. P2 than describes its environment (JVM) and gives examples of what it offers in terms of functional and OOP. P3 highlights Scala's type system, arguably the most important part of the language. I feel that this might be difficult to understand for someone not familiar with these terms? How to do this? P4 says something about Scala's syntax from the Java perspective (arguably the main source of adopters), P5 and P6 are somewhat disconnected: Talking a bit about Scala's novel contributions, and the concurrency paradigm (which is generally associated with Scala).
ItemState (talk)
- - -
Scala (/ˈskɑːlʌ/ SKAH-lu) is a programming language which blends the paradigms of object-orientation and functional programming. It is statically typed with advanced language features, while still trying to be concise and elegant and maintaining the feel of a dynamic language. The name Scala is a blend of "scalable" and "language", signifying that it is designed to grow with the demands of its users. It can be employed in diverse scenarios such as lightweight scripting or distributed server applications.
Scala programs commonly run on the JVM and are compiled to Java bytecode. Good interoperability with Java libraries is a major goal. Several ongoing projects exist to bring Scala to other platforms such as .NET and JavaScript. On the JVM, Scala shares the basic properties of Java, such as its memory management and threading model, but introduces many advanced concepts. On the functional programming side, these include anonymous functions, optional lazy evaluation and call-by-name, pattern matching and algebraic types, and prominent support of immutable data structures—provided by way of its required standard library. Scala has a more unified type system than Java: There is no distinction between statements and expressions, none between primitive types and reference types, and values and types can both appear as (method or constructor) parameters or (class or local) members. Language elements can often appear in any scope, for example classes, methods and symbol imports can appear in any nesting level, and block expressions can be written anywhere.
Scala's type system is particularly elaborated. It has a top, a bottom and a unit type, it can express higher-order types, singleton types, intersection types and multiple inheritance through mixin composition, it supports type bounds and declaration site variance, and provides path-dependent types and type projections (denoting a nested type). Scala uses a limited form of type inference, making explicit type annotations often omissible.
Scala's syntax uses curly braces and focuses on ease of adoption for programmers coming from Java. While one can use a style akin to Java, "idiomatic" Scala encourages immutable over mutable variables, functional over imperative style, and the type-safe use of the Option class instead of null. Scala allows runtime exceptions like Java, but does not require to declare or catch them.
Scala also adds some novel constructs such a scoping rule called "implicits", a way by which the compiler is able to automatically fill in parameters. Implicits are used to define type classes and extension methods in Scala.
While it is often described as specially suited for concurrent programming, Scala advocates library based solutions over built-in language constructs. For example, actors, futures and software transactional memory are provided through libraries.  — Preceding unsigned comment added by ItemState (talk • contribs) 22:13, 21 July 2013 (UTC)
thread_title:  Introduction Clean Up 

message: I think the article would benefit from adding a version history section (perhaps with or under history). This would allow to concisely introduce named/default arguments, reified generics/reflection 2.10, macros, delimited continuation (if at all), parallel collections (if at all), string interpolation (if at all).
In general, someone should go radically through that article and give it a half way consistent touch (and probably cut away some parts). Right now it just feels like a dump of each and every feature that is available in Scala. Why is delimited continuations mentioned, but not XML literals? Many arbitrary choices.
The introductory I just wrote (above) already suffers from being too long. The article needs a good concept of nesting the information. Perhaps some stuff could even go into separate articles (e.g., Scala collections, Implicits (unique concept of Scala), perhaps Scala vs. Java).
ItemState (talk)  —Preceding undated comment added 22:25, 21 July 2013 (UTC)
thread_title:  General Clean Up 

message: The lead reads like promotional material for the language. It actually creates a hype. The wording is far from optimal in many cases. Nxavar (talk) 21:31, 25 April 2014 (UTC)
replies: text: Could you specify those cases? Brycehughes (talk) 03:39, 26 April 2014 (UTC)
replies: text: I edited the first paragraph for tone as an example. The "source" for elegance was removed since it was not supporting the argument that Scala is elegant. Similar tone editing can be done for the second paragraph. The amount of technical information (the way it is presented is one of the typical ways of creating hype for technology products), for example, needs to be reduced. Nxavar (talk) 08:42, 26 April 2014 (UTC)
replies: text:  Thanks. Could you edit the second paragraph as well?  I took a look at it, but I'm not sure how I'd go about it.  Usually better to make the edits you desire as apposed to fly-by tagging and leaving it for others. Brycehughes (talk) 15:27, 26 April 2014 (UTC)
replies: text: In my edit of the first paragraph I had as a model the way other languages are presented in Wikipedia. I am a programmer myself but I have little knowledge and experience in functional programming. While the first paragraph was general enough to be edited by a non-expert in functional languages, I think the second needs someone more familiar with this programming paradigm, because it goes into a lot of detail. As a general comment, I believe that the amount of detail should be reduced, which would be easier with a rewrite. The problem is I don't know what to take out, or how to group things. Maybe you can take a shot at a rewrite? Nxavar (talk) 11:16, 27 April 2014 (UTC)
replies: text:  Ok, done. Brycehughes (talk) 17:03, 27 April 2014 (UTC)
thread_title:  Tone 

message: Any objection to deleting the "Companies" section? Scala was broad acceptance now, as indicated by the immediately preceding "language rankings" section, and the "companies" section has become merely a spam pot.
Michaelmalak (talk) 15:51, 30 June 2014 (UTC)
replies: text: Support. Rankings covers adoption well enough. Brycehughes (talk) 18:59, 30 June 2014 (UTC)

text: Support. Soc88 (talk)  —Preceding undated comment added 21:25, 18 April 2018 (UTC)

text: Objection. The section contributes to understanding adoption. 87.138.226.29 (talk) 21:15, 28 March 2023 (UTC)
thread_title:  Companies 

message: Shouldn't this: ", or .NET libraries in the .NET implementation." be removed? -- Dough34 (talk) 16:01, 6 March 2015 (UTC)
thread_title:  Still a reference to .NET 

message: Hey,
i'm not very familiar with java but as i can see, the function getX() and getY() were defined, but never used. Therefore, i don't think this comparison is fair because the java code is bloated.
regards
https://en.wikipedia.org/wiki/Scala_%28programming_language%29#Example_with_classes 
: The reason they are there is to provide an immutable field. The way x and y are setup is to produce the same effect as the Scala class parameters of the same name.
:Deuceboise (talk) 17:02, 17 January 2019 (UTC)
thread_title:  java functions are unused in Comparison Java and Scala with classes 

message: Hello fellow Wikipedians,
I have just added archive links to  on Scala (programming language). Please take a moment to review my edit. If necessary, add  after the link to keep me from modifying it. Alternatively, you can add  to keep me off the page altogether. I made the following changes:
*Added archive https://web.archive.org/20100831041226/http://blog.lostlake.org:80/index.php?/archives/73-For-all-you-know,-its-just-another-Java-library.html to http://blog.lostlake.org/index.php?/archives/73-For-all-you-know,-its-just-another-Java-library.html
When you have finished reviewing my changes, please set the checked parameter below to true to let others know.
Cheers.—cyberbot IITalk to my owner:Online 20:14, 13 January 2016 (UTC)
thread_title:  External links modified 

message: In section Everything is an expression, shouldn't the text "To make it clear that all expressions are functions," instead read "all functions are expressions"? I'm learning Scala and this is a helpful article but that bit confuses me. 2602:306:3760:16E0:108A:C9C6:3DA4:7E13 (talk) 20:18, 13 August 2016 (UTC)
thread_title:  Confusing wording 

message: Early in the section there is a list of functional features of Scala that seem to be meant to highlight the differences from Java, however, type local inference was introduced in Java 10 and expanded slightly in Java 10(albeit not to extent of Scala).
Should this be removed or clarified that while java has added type inference, in Scala it is more comprehensive(e.g. unneeded under most circumstances for return types in Scala)?
Deuceboise (talk) 16:45, 17 January 2019 (UTC)
thread_title:  Re: Functional tendencies 

message: The article says scala has algebraic data types, but I think that's misleading. It doesn't have native support for them in the way that Haskell or Rust does. Instead They are sort of simulated by case classes. Agreed? Article should be edited accordingly? Myrmornis (talk) 13:25, 4 February 2022 (UTC)
thread_title:  scala doesn't have algebraic data types 

message: There are so many tools around Scala: SBT, Mill, Coursier, Bloop, Metals with implementations for different editors respective IDEs, the legacy Eclipse based Scala IDE and probably more. That can be confusing. As far as I can see until now only SBT has a dedicated article on Wikipedia and it is questionable if any of the others satisfy Wikipedia's notability criteria. Maybe those can me mentioned here in a chapter about tooling with a short description of what they are responsible for in the tool chain (I think tool graph does describe it better). Maybe together with an SVG visualizing the relations between the tools.  What is your opinion? ITriedMyBest (talk) 21:24, 9 May 2022 (UTC)
thread_title:  Tooling 

message: In the given code example, a method called addToGrid() is called but not defined. Not only is this confusing, but (at least in the Java example), it's incorrect code.
I don't speak Scala (that's why I was here), but could someone with knowledge of both languages correct the example so it's possible to interpret precisely?
Timrb (talk) 19:26, 1 July 2022 (UTC)
replies: text: Done. I changed it to `+=` to illustrate how operators can be defined and called in infix notation. I also changed the Java version to `addPoint` instead of `addToGrid` because it really just adds any point and only adds to grid when it's called on the grid instance. 2600:4040:767E:4600:B0E2:7424:AC7:C066 (talk) 18:49, 3 November 2023 (UTC)
thread_title:  "Point" class code example and addToGrid() 

message: The section about Concurrency describes how Scala no longer provides native support for actors, relying on the third-party platform called Akka. The text also states, though, that Akka is an open-source platform.
> ...it also included support for the actor model, which is now available as a separate open source platform Akka
However, starting with version 2.7.0 (the current one), Lightbend switched the licence of Akka from Apache 2.0 to Business Source License 1.1.
As far as I know, the new licence is not an approved open source licence. I'm not a lawyer, but from their own FAQ:
> The BSL requires that the code licensed revert to an approved open source license (“Change License”) after a period of time (“Change Date”) which can be no later than 4 years.
I think that it's safer to remove the "open source" before the Akka name.
Bruno Unna (talk) 21:50, 7 January 2023 (UTC)
thread_title:  Questionable open-source licence for Akka 

message: Currently Scala supports as stable 3 versions of the language: 2.12.x, 2.13.x and 3.3.x. However, only 1 of them is displayed as newest stable: 2.12.5. This is doubly wrong: 2.12.5 is not the newest in 2.12.x line (that would be 2.12.11) and the newest stable Scala in general is 3.3.0. This data is available when one look into Wikidata but it is not reflected on this page. 2A02:A313:823F:4800:64E7:6829:BCCC:81A4 (talk) 14:54, 28 August 2023 (UTC)
thread_title:  Outdated version information  

message: The redirect Scala (programming language has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at  until a consensus is reached.  Utopes (talk / cont) 00:58, 8 April 2024 (UTC)
thread_title:  "[[:Scala (programming language]]" listed at [[Wikipedia:Redirects for discussion|Redirects for discussion]]