Mon, 23 Nov 2009 12:37:27 -0500, bearophile wrote: > dsimcha: >> I think D is about the >> only language on the planet that cares about both scaling up to huge >> million line applications and scaling down to small 500-line scripts. > > "Scala" means "scalable language", it's supposed to be designed to be > able to scale both up and down :-) Removing the array.sort and moving > complex numbers to the std lib is a little against the scaling down, but > I think it's acceptable.
Have you any idea what you are talking about? In Scala arrays are completely defined in the stdlib and there is nothing array related built in to the language per se. This is how they are used: $ scala scala> Array(1,2,3).reverse res0: Array[Int] = Array(3, 2, 1) array.sort is missing but that's not a problem in a scalable language - let's define it! scala> class Sorter(val a: Array[Int]) { def sort = { util.Sorting.quickSort(a); a } } scala> implicit def toSorter(a: Array[Int]) = new Sorter(a) scala> Array(3,2,1).sort res1: Array[Int] = Array(1, 2, 3) Note that this is a statically typed compiled language unlike Python. It's really hard to see how D scales any better when programming in the small. Something like opening files with one liners is a library issue. It takes 5 minutes to build a wrapper on top of Java like stream zoo. You can reuse the wrappers later. IMHO if you're writing max 500 LOC applications, it doesn't really matter what language is used.