Even though this perhaps should be in scala-debate, I'm posting it here because:1) It's really very important.2) I've never seen a similar question posted.This comes after reading a few of the "White elefant" posts.The question is simple: List, in descending order of priority, what you feel needs to be addressed/fixed/whatever for Scala to succeed in the corporate (and hence IMHO ultimately the "real") world.My list:1. IDE Support. Scala must have rock-hard support in at least one IDE, and must have "pretty good" support in Eclipse, since it's the de facto standard. I don't think we're close yet. This alone could lose Scala the language wars.
2. Documentation. Scaladoc documentation needs to be expanded on greatly; at the same time Scaladoc itself could stand some enhancements, though exactly where is less obvious. I am complicit in this; I keep on intending to devote some serious time to enhancing scaladoc, and keep failing to do so, dangit!
Ken McDonald wrote:
> 1. IDE Support. Scala must have rock-hard support in at least one IDE, and must have "pretty good" support in Eclipse, since it's the de facto standard. I don't think we're close yet. This alone could lose Scala the language wars.
What other JVM language (Java aside) has better IDE support than Scala?
(Also, I find "language wars" a strange term.)
Kind regards
Andreas
You must accept legitimacy of the idea of "language wars" in order to
succeed in a corporate environment. If you are having difficulty with
the self-deception required to adopt this illusion, try calling it "real
world" -- HTH.
--
Tony Morris
http://tmorris.net/
The question is simple: List, in descending order of priority, what you feel needs to be addressed/fixed/whatever for Scala to succeed in the corporate (and hence IMHO ultimately the "real") world.
I almost didn't use Scala because of how buggy ScalaIDE used to be.
It's a lot better now, but if it were as solid as Eclipse Java support
it'd be easy for someone to switch over and start adding Scala to
their projects.
Of course, rock-solid IDE support relates to the speed of the compiler!
Peace. Michael
(Also, I find "language wars" a strange term.)
there is no solution which is both simple and efficient. you can have
one or the other.
Even though this perhaps should be in scala-debate, I'm posting it here because:1) It's really very important.2) I've never seen a similar question posted.This comes after reading a few of the "White elefant" posts.The question is simple: List, in descending order of priority, what you feel needs to be addressed/fixed/whatever for Scala to succeed in the corporate (and hence IMHO ultimately the "real") world.My list:
1. IDE Support. Scala must have rock-hard support in at least one IDE, and must have "pretty good" support in Eclipse, since it's the de facto standard. I don't think we're close yet. This alone could lose Scala the language wars.
2. Documentation. Scaladoc documentation needs to be expanded on greatly; at the same time Scaladoc itself could stand some enhancements, though exactly where is less obvious. I am complicit in this; I keep on intending to devote some serious time to enhancing scaladoc, and keep failing to do so, dangit!
3. A "Scala Cookbook". I'm amazed one isn't out or on the web already. I know, there's lots on stackoverflow and other sites but it's not the same. Scala is such a neat language, that a newcomer could easily get caught up and read for hours on a good cookbook, saying things like, "Wow, I can do it in just one line...".
> I use NetBeans as a glorified code editor with some combination of sbt
> and/or mvn running in a console. To this end, I would really like to
> see better support for the NB plugin.
I'm also a NetBeans user and would love to see the NetBeans plugin
continue to evolve. Yes, I know... why don't I contribute? Well, as for
many of us I just don't have the personal resources to do that right
now.
I can't wait until retirement. Then I'll be able to get some real
programming done. :)
Peter
And your suggestions? Recommended three or less because probably no one will read past the third one :-).Ken
Alas, someone once divided financial institutions between loaning
banks and investment banks, where the first are very conservative and
the second will try anything that can give it an edge.
--
Daniel C. Sobral
I travel to the future all the time.
If only Scala were *not* being adopted in major financial
institutions, like it is, that argument would be stronger.Alas, someone once divided financial institutions between loaning
banks and investment banks, where the first are very conservative and
the second will try anything that can give it an edge.
For my part, I'm seeing a lot of adoption in media. Including broadcast, papers, online gaming, social, etc, etc.
Basically, lots of people who're after an edge in being more responsive to the market than their competition, so not just investment banking :)
Banks are just more visible because they tend to pay more for support contacts, and use recruiters who are far spammier on LinkedIn and the like.
mainly because I judged the compiler to be
unreliable.
IDE Support would be the most important issue for me. I use Netbeans to write the code and SBT on a terminal to compile and run. I really do not want to use Eclipse, I don't like it as a whole (I don't have a problem with the Scala IDE itself). How hard would it be to have the Eclipse plugin work in Netbeans? It supports OSGI so maybe it could re-use a lot of stuff. Off course integration with the editor itself is definitely going to be different but Caoyuan has gone a long way with the Scala plugin for NB and there should be enough stuff already figured out there.
Oh, I dont know. My team all use intellij since last year or so. Eclipse just did not work out for us - it was too buggy.
We all seem to think intellij is good enough. So do the consultants I know around here who actively use Scala.
YMMV.
Geir
If you refer to the download page, the version number is indeed 2.9.2,
because of changes to the presentation compiler. Since the
presentation compiler is part of the compiler, we need an updated
version to take advantage of the new features. However, since
yesterday we ship with the standard 2.9.1 library, so you should not
feel any difference.
The Eclipse IDE is really low on features. We're basically focusing on
completion, hyperlinking and interactive error reporting. IntelliJ has
been a lot more active in adding new features, though, so maybe you
mixed them.
> It
> also consumes a ton of memory and tends to "just sit there" a lot. It's
> basically unusable in my work environment, while the version quite a while
> back, while buggier and with far fewer features, was usable.
What versions are we talking about, or when did you try Eclipse last?
This sounds really surprising, since my own experience, and most
people that cared to try Eclipse one year ago, agreed that it's much
more usable now.
>I think the
> NetBeans plugin also took a step sideways when it integrated with the
> presentation compiler. In my opinion the only really usable IDE for Scala
> right now is Emacs+ENSIME. Maybe the ENSIME integrations for Vim and JEdit
ENSIME uses the presentation compiler, so it can't be much better
(assuming the presentation compiler is the problem).
iulian
> work well, too. I'm fine with Emacs, but I wouldn't try to force in on
> anyone.
>
>
>
--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
> Thomas, Wow.
>
> Have you been using Netbeans to compile real world projects? My
> experience of Scala Netbeans integration is:
> The guy who was maintaining the plug-in left 2 years ago and that it
> currently chokes on anything more serious than Hello World.
I'm using NetBeans on a Scala project. It's not a huge project, but
definitely larger than "Hello, World." The Scala plugin is working fine.
It's a bit quirky but it gets the job done. I should say that I'm using
the latest version from the git repository compiled from source. The
person maintaining the plugin is still active with it, although activity
is light. The last commit was maybe a couple of months ago (I haven't
tried a pull recently though).
Peter
For the curious, the git repo is https://github.com/dcaoyuan/nbscala
--
Brian Schlining
I have found that IDEA vs Eclipse is a chocolate/vanilla or
purple/green question. I've had to use Eclipse a couple of times and I
just didn't like it.
Donald
-- Andreas Joseph Krogh <and...@officenet.no> - mob: +47 909 56 963 Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no Public key: http://home.officenet.no/~andreak/public_key.asc
My shop list would be:
1. A compiler as fast as the java one. And a modular scala-lib. Yeah, I
now...
2. An as powerful and great library to deals with immutable data
structure modification as the collection one is for collection (lens,
zipper, etc)
3. Being able to use Scala for scripting. Than implies 1 and a better
starting time + something to include automagically dependencies,
essentially. And it will be so good to show how cool and powerful Scala
is in some little lines. I really would *love* to convert the sysadmin I
work with to use it as possible replacement of perl or python (or bash),
but for now, the lauching time are killing that possibility.
IDE support is reaching the point where Eclipse does not go in my way
anymore and is of real help for boring things (imports, completion of
long method names, formatting, things like that).
Documentation is OK, especially with so many books and blogs post online.
A "Scala Cookbook" could be intersting, but I would much more prefer a
repository of Scala scripts, if they were usable for real.
Cheers,
--
Francois Armand
http://fanf42.blogspot.com
You mean like this?
#!/usr/bin/env scalas
!#
/***
scalaVersion := "2.9.0-1"
libraryDependencies ++= Seq(
"net.databinder" %% "dispatch-twitter" % "0.8.3",
"net.databinder" %% "dispatch-http" % "0.8.3"
)
*/
import dispatch.{ json, Http, Request }
import dispatch.twitter.Search
import json.{ Js, JsObject }
def process(param: JsObject) = {
val Search.text(txt) = param
val Search.from_user(usr) = param
val Search.created_at(time) = param
"(" + time + ")" + usr + ": " + txt
}
Http.x((Search("#scala") lang "en") ~> (_ map process foreach println))
See https://github.com/harrah/xsbt/wiki/Scripts. Works like a charm.
>
> IDE support is reaching the point where Eclipse does not go in my way
> anymore and is of real help for boring things (imports, completion of long
> method names, formatting, things like that).
>
> Documentation is OK, especially with so many books and blogs post online.
>
> A "Scala Cookbook" could be intersting, but I would much more prefer a
> repository of Scala scripts, if they were usable for real.
>
> Cheers,
>
> --
> Francois Armand
> http://fanf42.blogspot.com
>
--
Exactly like this, thanks for pointing it !
Now, it only remains compiler speed and starting time :)
(wow, that's really cool, what a pity I missed that... Does it exists
for a long time ?)
> I use IDEA-11 EAP with the latest scala-plugin and I really don't consider IDE-support at all to be an issue anymore.
This is also my experience too although I use IDEA-11 and Eclipse. The only thing that irritates me in IDEA is that one still needs to do a full compile occasionally to see if the red lines in editors are real problems or not. But a couple of bugs I submitted recently were fixed in 1 day which made the experience much better.
The IDE is simply not an issue any more, certainly not one that should prevent anyone from benefitting from Scala.
-------- Original-Nachricht --------
> Datum: Thu, 10 Nov 2011 10:25:31 +0000
> Von: Chris Marshall <oxbow...@hotmail.com>
> An: scala...@googlegroups.com
> Betreff: RE: [scala-user] Re: What is highest priority for Scala to succeed in corporate world (Should be in scala-debate?) ?
>
> > On Sun, Nov 6, 2011 at 2:08 AM, Erik Engbrecht
> <erik.en...@gmail.com> wrote:
> > > I think you need to define what "rock-hard support" in an IDE means.
>
> Here are some of the things that IDEA can do for me in Java files that
> have not-much to do with refactoring/navigation. These things will (I suspect)
> come as a *big* surprise to the people who are used to VIM and emacs but
> they are the sorts of things that save a lot of time.
> 1. Intelligent string parsing. IDEA can tell me when my format string
> passed to String.format is malformed wrt to the types of the arguments I pass
> to it (it is highlighted as a bug). It can render *strings* which represent
> SQL or regex such that they have coloring appropriate to SQL (different
> color keywords etc).
it works for nested languages in general (sql, hibernate query stuff). for example, i have native javascript inside my gwt java classes. idea offers full support for these snippets. i pity my eclipse co-workers every time :)
> 2. Auto-complete *within Strings*. In a String value in my program, IDEA
> detects whether the string looks like a path and can auto-complete within
> the string. For example, if I am creating an ImageIcon with the path to an
> image resource, IDEA can offer me the choices of images within the directory.
really helpful inside xml files
> It even pops up an *image viewer* as I scroll down the options, even
> though all I have written is something like: "/path/to/images/ CTRL-SPACE"
> 3. Color choosing. IDEA spots when a java.awt.Color is created in my
> program and offers a little square of that color in the sidebar. Clicking on the
> square gives me a color picker which I can then use to change the color's
> parameters (requires enterprise edition)
it also shows the color in the debugger.
System administrators, in general, are not developers. They need a different toolset than us devvie guys do. I don't think it is possible to build a tool that does both well.
I would love to be proven wrong on this one, tough.
Geir
System administrators love stability from others. For their own
script, I have never seen one give a fig. And I think the wild ride
that are the scripting languages is proof enough of that attitude.
> 3) Speed, but simplicity is much more important.
If speed wasn't important, Perl would never have been born. Log files
can be HUGE, and handling them efficiently is important.
> 4) An API, (where applicable) which wraps OS level functionality in
> simple fashion.
I'd go even beyond that. They want "a library for that". CPAN is not
simply a result of Perl's popularity: it is an integral part of it. I
can *browse* the available libraries from CLI by typing "perl -MCPAN
-e shell". I can search for a Ruby library on shell with "gem search".
I'm not familiar with Python, but I bet it has the same thing.
So, while sbaz, as it is, doesn't work, having a working sbaz, and a
web site equivalent, would be fundamental in actually getting Scala
accepted as a system administrator tool.
> 5) Can be installed, without playing version bingo, from the OS
> package management system.
Well, they do like that, but I can tell you this is not a situation
one encounters that often. Again, this is true much more for stuff
sent by devel than stuff done by sysadmin themselves.
> 6) Fast code/test/deploy cycle, for a 200 line program, compile/
> startup time of more than 2 seconds is too long.
Well, there are third party solutions to that, but it can't be helped
except by having a JVM daemon running.
> 7) Is Bourne, Python, Ruby or for those hangers on from the dot-com
> boom, Perl.
>
> System administrators, in general, don't like the following things.
>
> 1) Dynamic behaviour redefinition, think implicits.
Actually, I think they'd love implicits.
> 2) Factory classes, design patterns, types, static typing.
Mostly (well, see stuff like Python-written Ganeti or Perl-written
OTRS for counter-examples). As for static typing, the problem is not
static typing, the problem is boilerplate. In fact, you could replace
that whole line with "boilerplate" and be done with it and be more
accurate, to boot.
> 3) Monads, Monoids, things that make more than 2 minutes to make sense
> of.
Word.
> 4) Stuff that needs to constantly auto-update itself from some server
> in Switzerland, every time you do a build.
As if there isn't a package manager that isn't download-happy. They
don't like being FORCED to update at a time they don't want to. Other
than that... business as usual.
Ruby and Python were born as system administration scripting
languages, as far as I know. I do know that my first contact with Ruby
was in such a role. And I think it is undeniable that Perl is the
ultimate system administrator tool. :-)
Which is more and more besides the point. Devops is here to stay.
Our customers - many orders of magnitude larger than us, have vey funky
environments. I have seen all sorts of scripting environments known to man
(and a few in-house) in production all over the place.
Also - the moment I stopped pushing for it, some guys here started picking
it up... now we have at least one "official" project using an internal scala
DSL :)
Maybe the most important thing we all need to do is just chill... of course
a great UI won't hurt the chilling process!
------
About Big data - yeah. Kind'a easy to explain to someone: map-reduce this
sh!t. somehow that sounds better to the masses than "flat-map this sh!t"?
That however will be just a stepping stone kicking in new paradigms... Yo,
Greg - how's your book coming along?
------
To answer the original "what scala needs to succeed in the enterprise" ?
Karma!
Cheers,
RAzie
-----Original Message-----
From: scala...@googlegroups.com [mailto:scala...@googlegroups.com] On
Behalf Of jherber
Sent: November-10-11 9:24 AM
To: scala-user
Subject: [scala-user] Re: What is highest priority for Scala to succeed in
corporate world (Should be in scala-debate?) ?
I find myself using scala for "ad hoc" scripting more and more.
Speed aside (that's not the point for "ad hoc" usage) I find scala REPL
sessions SO MUCH MORE convenient than perl fuzzing.
The typical: I have to repeat this stupid thing now 1374 times - I could do it
manually - spending 2 days effort and producing lapse of concentration errors
on every ~100'th repeat.
Or I could do it perl - writing that thing from scratch for one-time-use.
Sprinkling around all kind of debug prints and data::dumper because I know it
won't work the first time... but at least it would be done considerably faster
in the end.
Or I could delegate it to a colleage who would try to get it done with Excel.
Or I can use the REPL and "find my way" interactively. And in the end I can
copy the "valuable" statements together (while the work is already done)
sprinkle some object { def main...} around it - a little polishing et voila:
another small script tool as jump-starter for the next similar problem.
And I'm getting it faster done than with perl.
And no: I don't think about types, monoids, monads, functors et al. in this
context. "It simply happens"...
Scala isn't always complex ;-)
And to satisfy the thread:
* more advertisment / good advertisment
Scala has many things to offer - we have just to show it...
Greetings
Bernd
I built it specifically so people can "find their way interactively" through
an application's admin objects, like say...
runtime.adapters.map (_.reconnect)
what's more, it has an embedded "quoting" ability (like a gist/pastie) so
you can easily send runnable admin scripts around...
So - scala should succeed in the enterprise for admins ! :) Given its DSL
capabilities and with something like the scripster, how can it be
out-featured?
cheers,
Razie
-----Original Message-----
From: scala...@googlegroups.com [mailto:scala...@googlegroups.com] On
Behalf Of Bernd Johannes
Sent: November-10-11 3:11 PM
To: scala...@listes.epfl.ch
Cc: Daniel Sobral; Geir Hedemark; bryan hunt; scala-user
Subject: Re: [scala-user] Re: What is highest priority for Scala to succeed
in corporate world (Should be in scala-debate?) ?
[...]
> And no: I don't think about types, monoids, monads, functors et al. in
> this context. "It simply happens"...
Well, in my company we once introduced Groovy and made
good experience, because it has been easily adapted by
different people, allowing for easy embedding (GroovyConsole e.g.)
and fast RAD and scripting tasks.
Trying to push Scala as a replacement in this area here
would be absolutely void.
So even when trying to avoid a term like "language war", one has
to face the question "why not Groovy" one time.
(I indeed had recently.) But there is so much debate over
Scala vs. Java, that this question is silently avoided.
Regarding the original topic: I don't think that this area
adds to it. In general, scripting in Scala is possible, but
not its main selling point (IMO).
KR
Det
> A "Scala Cookbook" could be intersting, but I would much more prefer a
> repository of Scala scripts, if they were usable for real.
I'd find this useful too. I'd also be happy to contribute - for example
at the moment I'm writing a simple stand-alone J2EE servlet that allows
you to browse Mercurial history without running 'hg serve' for each
repo. Part of that involves parsing XML via a pipe and processing the
resulting scala.xml.Document - not rocket science but there's a couple
of bits that took some hunting around and reading of the library source
to figure out - for example the fact that BufferedSource sometimes
scribbles on stderr and that ProcessIO leaks file descriptors.
My concern is that I'm still learning Scala so I'm not sure my code is
exactly 'Best Scala Practice'. If such a script repository was set up I
think there'd need to be some vetting process for the content. Ideally
it would be possible to annotate the scripts with comments and
suggestions - for people learning Functional concepts, "why" is every
bit as important as "how".
--
Alan Burlison
--
I just get the feedback of a (experience and good) Java programmer with
his first hours of Scala. His main problems were:
#1 (and a big 'one') : Binary (un)compatibility.
That one is just complettly unexpected for a Java user, and so it tooks
a rather long time for him to understand that most of his problems were
due to that point.
Just to be clear: he wasn't even aware that there might be some issues
of that kind in Scala - Java really comes with bad habbits ;)
The good news is that that one should be rather easy to correct, at
least for the 'awarness' issue: just make a lot of documentation and
warning all around the internet until it's known and expected that you
have to be carefull (or more preciselly to take care) of what versions
of Scala are used in what libraries (or what you Eclipse plugin force
you to use).
#2: brittle feeling about the Eclipse plugin
Most of his problem were due to the binary compatibility issue, but
nonetheless, the Eclipse plugin seems to give a bad feeling to
newcomers. It's a combination of things: performance (slow completion,
memory used, etc), bugs, bad (or not fisrt-class) integration with other
tools like SBT, etc.
That were his two main concerns, the first one being the worst - because
it really was unexpected for a Java-dev, and make nothing works,
sometimes in really strange ways.
Thanks,
--
Francois ARMAND
http://fanf42.blogspot.com
http://www.normation.com
Cant stop wondering How on earth he found that as an issue during his first hours of playing with the language?
I also can't stop but notice he had NO issues with the language itself ??
Thanks,
Razvan
Second, the in ENSIME you request autocompletion by hitting tab, as opposed to it automatically triggering based on some delay. So Eclipse tries to autocomplete much more frequently than ENSIME does, and when ENSIME does it you really want it to do it.
Simple : download Play! framework, use sbt:eclipse, then use eclipse
IDE. But Play! was built for Scala 2.8, and Scala IDE came with 2.9.
It is VERY easy to contribute stuff to docs.scala-lang.com, through
the http://github.com/scala/scala.github.com repository. The syntax is
just wiki style, with just a small header you can almost copy&paste
from other files. For example:
---
layout: overview
title: Handling nulls
disqus: true
---
## Introduction
Instead of writing
if (o != null) { return func(o); } else { return somethingElse(); }
write
Option(o) map (func) getOrElse (somethingElse())
**DON'T DO THIS**
val x = Option(o)
if (o.nonEmpty) func(o.get) else somethingElse()
There. Put this in a file on the "tutorials" directory, and you'll
have made a page with a title, code with syntax highlighting, and some
bold text.
> the moment I'm writing a simple stand-alone J2EE servlet that allows you to
> browse Mercurial history without running 'hg serve' for each repo. Part of
> that involves parsing XML via a pipe and processing the resulting
> scala.xml.Document - not rocket science but there's a couple of bits that
> took some hunting around and reading of the library source to figure out -
> for example the fact that BufferedSource sometimes scribbles on stderr and
> that ProcessIO leaks file descriptors.
>
> My concern is that I'm still learning Scala so I'm not sure my code is
> exactly 'Best Scala Practice'. If such a script repository was set up I
> think there'd need to be some vetting process for the content. Ideally it
> would be possible to annotate the scripts with comments and suggestions -
> for people learning Functional concepts, "why" is every bit as important as
> "how".
>
> --
> Alan Burlison
> --
>
--
For the record, the Scala IDE supports both 2.8 and 2.9.
http://download.scala-ide.org/releases-28/stable/site
http://download.scala-ide.org/releases-29/stable/site
-- Mirco
I do know that, as I think any Scalaiste more than some days old do.
What I wanted to report is that complettly newcomers, especially Java
one, it was a surprise to have to care about binary compatibility
between Scala version.
Well, and it was just a report, I don't want to have to argue against
fact. You can take care of them of not, it was just to contribute what
might be an "highest priority for Scala to succeed in corporate world".
Thanks,
I wouldn't try to push it - it's just natural to me (as a Groovy dyslexical)
to use Scala for scripting as this is possible.
The reasoning isn't: "scala is great for scripting - so promote its use as
such."
It's more the other way round: I selected scala as "complement" to Java
because it was the best match for my requirements (scala and closure where the
only contender on my short list). But as I discovered how great it fits my
scripting needs I adopted it for this, too.
I wouldn't have selected scala "just for scripting" alone. Nor Groovy or
something else because I was perfectly comfortable with perl until I came to
know scala...
> Regarding the original topic: I don't think that this area
> adds to it. In general, scripting in Scala is possible, but
> not its main selling point (IMO).
I agree: scripting is not scalas main selling point. But it doesn't hurt to
remind people that it is useful for that too (read: synergy).
Greetings
Bernd
The fact that you call it "binary" is a reference to the JVM binary compatibility, which only means that you can run the compiled bytecode on the JVM, not that it will still be compatible with whatever version of the whatever library. Which is the case here.
Also, from what I understand, things got a lot better starting FROM 2.9 which is when the compiler got stable enough.
You can see why I find it amazing that that was his biggest problem! Which is not even a problem... Anymore.
Sorry, don't want to seem confrontational but I am puzzled!
Thanks,
Razvan
[German context - pimp is a foreign term for us]
While I don't perceive the term as offensive or immature it still has some
"aftertaste". It's associated with - well - "tribal" like blatancy and often
assigned to "lower social ranks and their patterns of macho behaviour". [It's
a prejudice - but we can't wish it away... by the way: scala is complex -
isn't it?]
For a technical audience (devs and admins) I would use it without second
thought. Developers and admins are known to use a rather hefty language.
But in any other settings I would substitute the term with something else. I
didn't have the opportunity to introduce scala to some audience yet. But I
would coin a term like "consumer driven/assigned enhancement". That's not
fancy on any scale. But it's neutral.
Greetings
Bernd
Going back to binary compatibility, I think that an important step has been made: Scala minor releases
are now binary compatible.
That demonstrates the problem is (1) relevant, and (2) work is being done to mitigate it.
I agree with you when you say that a Java dev is not used to deal with binary incompatibilities, hence we
need to make his (and our!) life easier.
How can we do that? In my opinion, the first thing that is needed is a way to tell programmatically if a
library is binary incompatible wrt the used scala library (the example you reported for Play! is a perfect
use case).
Just imagine the Scala IDE issuing an error when you add in the classpath a library that is not binary compatible.
I bet that it would make binary compatibility a much simpler problem to deal with (for everyone).
But for making this real we need help from the compiler. Specifically, we need to know with what Scala version
a binary class is compiled.
An additional important aspect is improving the documentation and understanding of how to evolve Scala
code to ensure release-to-release binary compatibility. If library maintainers are given the tools to strive for
binary compatible releases, then the whole problem will simply go away.
Cheers,
Mirco
"com.weiglewilczek.slf4s" %% "slf4s" % "1.0.7"
then when I updrade scala version, things will happen painlessly,
provided that :
1) the maintainers of the libraries are quick to release their jars
when new Scala versions come out
2) the maintainers of the libraries use proper version naming scheme
to not break the magic
It's a big if, but I think most maintainers of libraries are aware of this.
Also what makes binary incompatibility less painfull for me as an
eclipse user is that I use SBT's eclipse plugin
to generate and update the project definition. My build config is the
single source of
truth in terms of versions, that are all agnostic of the Scala release.
I take the time to mention this, because I think there could be more
documentation out there
that explains the availability of a tool chain that can go a long way
in making the binary incompatibility
much more acceptable.
Right now the doc is on thres sites :
- ScalaIDE's site
- SBT's site
- SBT's eclipse plugin github page
I'm sure that most seasoned Scala devs are aware of this, but someone
starting Scala will
loose a lot of time if they don't discover this quickly.
Cheers
2011/11/11 Mirco Dotta <mirco...@gmail.com>:
As to knowing and matching compiled versions , sbt does add the compiler version to the artifact and it also can compile and publish a few versions of the artifact already...
Use %% and insist the library dev publishes a few versions...?
Thanks,
Razvan
Tim
That would be perfect. In the reported example, it would have made clear
where the errors were coming from.
But even without that, the incompability between major revision should
be made much more visible (I mean, in a "can not be ignored" fashion) on
Scala IDE page.
If that information was really blazing in the first page, new comers may
at least wonder why so much fuzz is written about different Scala
version and take about that, and that may ring a bell when some times
after, they will see libraries with different scala version on their
artifact name.
I remember that my first complexe Scala project (as in something with
Scala external libraries) implied Lift, and that I quickly become aware
of the binaries problem. That was on Scala 2.6 series, so we don't have
all the goodness of present days to handle it, but David Pollak did make
really clear and apparent, and in a good number of ml threads and other
media that you *had* to use the same Scala version than the one Lift was
compilled with. That helps and certainly saved me some days and WTF
moments.
> Just imagine the Scala IDE issuing an error when you add in the classpath a library that is not binary compatible.
> I bet that it would make binary compatibility a much simpler problem to deal with (for everyone).
> But for making this real we need help from the compiler. Specifically, we need to know with what Scala version
> a binary class is compiled.
>
> An additional important aspect is improving the documentation and understanding of how to evolve Scala
> code to ensure release-to-release binary compatibility. If library maintainers are given the tools to strive for
> binary compatible releases, then the whole problem will simply go away.
Of course, what would be even better, but it is more looking like a more
involved, and so middle to long term solution.
> It is VERY easy to contribute stuff to docs.scala-lang.com, through
http://docs.scala-lang.org/ I believe...
> the http://github.com/scala/scala.github.com repository. The syntax is
> just wiki style, with just a small header you can almost copy&paste
> from other files. For example:
I've read http://docs.scala-lang.org/contribute.html and I have a couple
of questions:
1. Is it possible to preview your new content somehow?
2. Would it be possible to set up a specific section for cookbook-style
examples on the site?
Thanks,
--
Alan Burlison
--
Very easily. See the README on the github page -- you need to install
ruby gems and then use it to install jekyll -- assuming neither is
available. I agree this information could be at least linked to from
the contribute page you mentioned. That's something to contribute
already there. :-)
> 2. Would it be possible to set up a specific section for cookbook-style
> examples on the site?
The site is just starting. Everything is possible, but it is better to
add content to some place that might not be best and then move
everything latter than wait for all the proper sections and layout to
be done. See, for instance, the FAQ I added to tutorial -- definitely
not the place for a FAQ, but it's better than nothing for now. Also,
my initial contribution had serious formatting problems, which Heather
kindly fixed.
Uh. So if you spot a typo and want to fix it, a Windows user have to
download and install Git, Ruby, Ruby Gems then Jekyll.
Suddenly, I see some value in Web-based applications... :-)
Git, OK, I already have it as it is useful to grab and update some open
source projects. But for the tooling, I wonder why it doesn't use
Scala-based software... :-P
It isn't a major problem, but needing to install lot of stuff just to
contribute something (and probably to register to GitHub as well?) can
be quite a high barrier for an occasional contributor, discouraging many.
I know that sometime I come across a project (freeware, open source) and
I want to mention an issue or two, without having the intent to get more
involved. If I have to register somewhere (forum...), I just go away: I
am already registered in too many places, including a good number I
already forgot...
(Now, Scala isn't a fix & forget product, you have to get involved in it
to be able to contribute something. Just saying...)
It is not a fundamental criticism of the process, which is already a big
progress with regard to nothing at all! I just point out some potential
issues.
To end on a positive note: if Ruby tools are needed only for
previsualization, one can indeed just fix what is needed, hope markup
syntax is OK, and rely on maintainer to fix formatting issue.
But still, putting up a small server with the Ruby tools where we can
paste some text with markup and see the result in the browser could be
quite useful.
Just a suggestion... :-)
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
In a similar note, the "flatMap that s...t" expression that some Scala
developers affectionate [1] doesn't really offend me (although I would
raise a brow if it was used in French in front of me... :-)) as I have
heard worse [2], but it can offend other people, and doesn't seem
appropriate.
If Tony reads this, he will laugh, telling that's just words, but some
people [3] attach importance to words, seeing some as offensive.
[1] Promoting, probably with irony, flatMap to a kind of golden hammer.
Or, perhaps, a brown one...
[2] But I wouldn't use it...
[3] Can depend on age, origin, culture, social background, etc. You
don't know who read you on the Internet.
I don't know if this came up already in this thread, but if all you
want is to fix a typo, you can use the "Fork and edit this file"
button on GitHub.
Cheers,
Mirko
--
Mirko Stocker | m...@misto.ch
Work: http://ifs.hsr.ch | http://infoq.com
Personal: http://misto.ch | http://twitter.com/m_st
Well, if you are crippled... ;-)
I see your point, but installing Ruby is pretty easy. I have never
installed Gems on Windows, but I don't expect it to be hard. And using
gem to install Jekyll is trivial.
HOWEVER, if all you want is to fix a typo, there's still hope!
As it happens, Github supports markdown. I don't know if it supports
the full Maruku extensions, but you can get at least an approximation
by just visualizing the file on github.
AND, you can fork the project on github (you'd need to do that
anyway), and EDIT the file on github itself! Github even provides
limited syntax highlighting of markdown elements.
So, in fact, if all you want is to submit small corrections, all you
need is a browser.
See? I told you it was easy to contribute to it. :-)
>
> Git, OK, I already have it as it is useful to grab and update some open
> source projects. But for the tooling, I wonder why it doesn't use
> Scala-based software... :-P
>
> It isn't a major problem, but needing to install lot of stuff just to
> contribute something (and probably to register to GitHub as well?) can be
You do need to register to github. Of course, you could simply open an
issue with the contribution, but that would but a very high bar on
getting your contributions committed, and you'd still need to
register. Besides, you need to register to github only once, and then
you'll be able to contribute to thousands of different open source
projects, besides having a place to put your own projects and
snippets.
> quite a high barrier for an occasional contributor, discouraging many.
> I know that sometime I come across a project (freeware, open source) and I
> want to mention an issue or two, without having the intent to get more
> involved. If I have to register somewhere (forum...), I just go away: I am
> already registered in too many places, including a good number I already
> forgot...
> (Now, Scala isn't a fix & forget product, you have to get involved in it to
> be able to contribute something. Just saying...)
>
> It is not a fundamental criticism of the process, which is already a big
> progress with regard to nothing at all! I just point out some potential
> issues.
>
> To end on a positive note: if Ruby tools are needed only for
> previsualization, one can indeed just fix what is needed, hope markup syntax
> is OK, and rely on maintainer to fix formatting issue.
> But still, putting up a small server with the Ruby tools where we can paste
> some text with markup and see the result in the browser could be quite
> useful.
> Just a suggestion... :-)
>
> --
> Philippe Lhoste
> -- (near) Paris -- France
> -- http://Phi.Lho.free.fr
> -- -- -- -- -- -- -- -- -- -- -- -- -- --
>
>
--
Very easy is: 1. load this url 2. type in this text area 3. done.
Very east is not: 1. pick platform-specific instruction list. 2.
Install applications x,y,z. 3. Edit stuff locally and then invoke
magical incantations to do something with it.
Come on people! In the age of google docs, AWS and wikipedia, we
should be able to do better at 'very easy' than this.
Matthew
>
> --
> Daniel C. Sobral
>
> I travel to the future all the time.
>
--
Dr Matthew Pocock
Integrative Bioinformatics Group, School of Computing Science, Newcastle
University
mailto: turingate...@gmail.com
gchat: turingate...@gmail.com
msn: matthew...@yahoo.co.uk
irc.freenode.net: drdozer
skype: matthew.pocock
tel: (0191) 2566550
mob: +447535664143
On 2011-11-14 10:43 AM, Ken McDonald wrote:
> Hello from the original poster of this article. I've had my #1
> position changed by a couple of articles including one good, long one
> by Jim Herber (sp?). So here it is: the #1 problem with Scala being
> accepted in the Enterprise world:
>
> Scala is too complex.
>
> Not too long ago, I would have said this is incorrect, because Scala
> can be used at 90% productivity while being no more complex than Java.
> My attitude was changed by the aforementioned articles, plus some
> recent experience with collections.breakOut.
>
> 1) The obvious: Scala can be used as great advantage without undue
> complexity. However, there will always be people in an organization
> who are capable of using the more complex features, and ultimately do
> so regardless of coding guidelines. They will leave behind them code
> that the standard programmer, or even another advanced programmer who
> took a different tack in the Scala ecosphere, are simply unable to
> maintain. This is simply death to a large organization; much as we
> would like to think of ourselves as uniquely talented individuals,
> they _must_ have interchangeable engineers in order to continue their
> existence.
Well articulated! Excellent point!
As a leader in establishing agreement in coding guidelines in my
organization I was frustrated by how many compromises we had to make for
individuals coding styles - I simply could not convince some people to
stop using Hungarian Notation in Java and C#. I was further frustrated
that after achieving a consensus, some developers continued to ignore
the agreed upon guidelines. In one case when I did a code review on
someone else's changes, then failed it because it did not conform to the
guidelines, they took it as a personal insult on their ability, which
led to a mess of other issues. As the software architect I am not sure
how I would manage these issues with Scala.
Interesting Idea!
Hear, hear.
Can anyone suggest an alternative? I've been saying things like "add
methods to a class", but that isn't exactly what's happening.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk7BaRwACgkQ5IyIbnMUeTvyhgCfQMSLLBAhH3veizmqVazYpGLS
OEwAn3r7aoYafwi2+vyejMmlvzf30Lu8
=Hhme
-----END PGP SIGNATURE-----
This is true for absolutely all and every languages. Or if not the
language, it's its frameworks. But I believe that was said many times,
so I'm not sure that saying it one more time will change anything.
For example, I believe I'm a correct programmer. I love programming,
understanding new things, etc. I did some work with Coq to prove some
properties about memory contiguity on a compiler. I now a bunch of Java
frameworks and contributes to several. All that to bring some
credibility to the following: I *never* get struts. I *never* get
hibernate. I *never* get Java generics. For each of them, sometime I
thought I finally get them, to discover at the next corner that that
wasn't true.
So, having interchangeable engineers is just an utopy. What Java really
have for it is something like 15 years of tries and errors that refined
some convention to be accepted and well documented to the point of "you
just have to copy that, don't think". I'm sure that with the same amount
of time and exposure to interchangeable engineers, Scala will have the
same patterns.
It was a time of Java and OO was also unable to maintain. Who really
succeeded in maintaining EJB entreprise applications ? OK, and in a cost
effective way ?
That being said, we (Scala user) have certainly some work to do in
speaking about how easy is Scala, and not only how many theorical buzz
word we are able to sank on a single line. Things like the example on
https://github.com/harrah/xsbt/wiki/Scripts
I categorize people not based on their skill, which I find largely irrelevant on its own, but rather on their cost in terms of my supervising time required to keep them on-track. Un-surprisingly, one correlates negatively with the other...
And
High-cost are the first to go... regardless of their skill. And that DID include a few 'smartsies' continuously using constructs and patterns that I repeatedly deemed much too complex/costly to maintain!
-------
@Ken
Well – somewhat agree and disagree with 1)
a) From my (extensive but in one place) EP experience, I/we have NEVER asked a lesser skilled developer to fix/maintain code written by highly skilled developers. It simply never happens. The reverse is the norm. And when you’re running out of highly skilled developers, you’re royally screwed anyways…
b) Do not put smart language constructs on the same footing with poor use of stupid languages. I have seen (and see on a daily basis) such convoluted, maintenance-proof designs and code by both above and under-average developers as to turn many a hair white. There is no freaking way that any other average developers will be able to efficiently maintain said code, in either case! Languages don't screw you - people do!
c) What can I say? Automated peer reviews should work miracles…
Hello from the original poster of this article. I've had my #1 position changed by a couple of articles including one good, long one by Jim Herber (sp?). So here it is: the #1 problem with Scala being accepted in the Enterprise world:Scala is too complex.Not too long ago, I would have said this is incorrect, because Scala can be used at 90% productivity while being no more complex than Java. My attitude was changed by the aforementioned articles, plus some recent experience with collections.breakOut.1) The obvious: Scala can be used as great advantage without undue complexity. However, there will always be people in an organization who are capable of using the more complex features, and ultimately do so regardless of coding guidelines. They will leave behind them code that the standard programmer, or even another advanced programmer who took a different tack in the Scala ecosphere, are simply unable to maintain. This is simply death to a large organization; much as we would like to think of ourselves as uniquely talented individuals, they _must_ have interchangeable engineers in order to continue their existence.
2) Somewhat less obvious: Scala is a highly orthogonal language, i.e. one feature does not "overlap" another feature, so each additional feature multiplies the abilities of Scala by the number of its possible states. Java is not so orthogonal, so let's say that each feature adds to the abilities of Java by the number of its position in the feature sequence. Let's assume that each language has five "features", each of which may be "used" or "unused". Scala has 2^5 possible "feature interactions". Java, by contract, has 1+2+3+4+5. The counterargument to this is that you can understand entire swaths of the Scala feature set by understanding a single concept. This is theoretically true, but realistically invalid. For example, I placed in the upper part of the top 1% of the GREs when I took them, and I don't understand a freakin' thing about scalaz, plus my understanding of implicit parameters is coming along very slowly. I'm sure that many of you are brighter than I, but consider the target; the Enterprise programmer. They are not even in my IQ range, let alone yours. (No offense to EP programmers out there. I've appreciated other people's well-written, non fancy code, as opposed to brilliant, impenetrable code, many times in my career. And to be honest, you almost certainly have a much more successful personal life than I do.)
3) Least obvious: more power =/= more productivity. So the Scala type system is Turing complete, great. How many think this is important? How many think this should be used in code? How many think this is, net, a gain? I'm hoping the answer is well under 5% in each case. This is a bit of a rehash of (2) above, but not completely. Scala has a lot of features. To be honest, it has _enough_ features for the time being, unless new features can simplify it.How to handle this situation in the Enterprise? One previous post mentioned "Scala Lite", but did not elaborate. I think it's time to consider the possibility of optionally "feature-restricting" Scala so that the Enterprise can ensure its code is at a certain level of approachability. I won't try to give a full spec here, but will give one suggestion I think makes sense: It should be possible, in the Enterprise, to disable the ability to define implicit parameters.
Cool, thanks! "Enriching" and the Rich{String,Foo} naming pattern sound
nice to me.
iEYEARECAAYFAk7BcpwACgkQ5IyIbnMUeTt0hgCfRobgQX2ZWeOoPz2Qss8Ze7Ao
y4IAoKnzqyTna2NupvUJUwDY7ovr5de4
=JmE2
-----END PGP SIGNATURE-----