I don't think anybody would argue that a functional
language can be more complex than an OO one.
All said, Scala is still the functional language I will turn to when I
have the time to look at one in more detail. But sorry, Dick, I'm on
the wrong continent for training!
I've never run into anyone that is holding off on Fantom because it lacks 'true' generics.Scala's problem is that it tries to change too much, but Fantom's problem is that it doesn't change enough; no matter what people tell you, its fairly obvious (to me anyway, YMMV) that changing something as fundamental as the programming language, especially if that language prefers use of alternative (fantom / scala versions of) crucial java runtime classes such as ArrayList, is a gigantic step that will never be taken lightly. So, you need a lot of convincers, but at the same time, the _vast_ majority of programmers do not want to learn more than 1 language so have to feel like another language can make a new home for them based on some simplistic snippets and without knowing much about said language. So, the language has to be both filled with convincing arguments that it feels like real, meaningful progress, whilst at the same time looking like it'll be such a minor change that they'll know for sure they'll adapt easily to this new language.Screwed if you do, screwed if you don't.I've said it before, but if any contender to java's throne is to show up, it needs to come up with "leightweight" convincers, just like java did to C: Java took just about the entire C syntax, warts and all, and imported that part wholesale to lower the bar (i.e. to 'be like fantom'). It then added things that were worth a lot but didn't have a high impact on the language itself in order to convince C programmers to switch to it (i.e. to 'be like scala'): A garbage collector, write-once-run-anywhere, threading, networking, and many other fairly standard tasks all supplied by a universal standard library thus truly delivering on the 'platform independent' promise. As an encore, java simplified a number of things, including removing the preprocessor. Not sure if that made a real difference in the end, but keeping things simple (in fact, now we might argue java was a little _too_ simple) never hurt language uptake, unlike the reverse of course. Something as simple as looking at scala's collections API makes people run for the hills even though in practice those crazy type variables do work fine (.toMap(implicit) on the other hand....)
So, high impact stuff that doesn't complicate the language, that's what'll make java.next. What should this look like? Don't know - but I guess at least one of these will be involved:- A language that caters to DSLs not by making the syntax flexible but by standardizing the AST and Parser and making these pluggable, with a meta-notation to define which plugins are to be used for the sources itself. May or may not be paired by the notion that AST editing is the basic form (instead of 'stream of characters' like 99.99% of all programming today), and most likely will require adapting these plugins to be written with IDEs in mind.
- A marriage between OSGi (i.e. runtime modularity), maven central (i.e. module repository), and gradle/ivy/maven (i.e. buildtime modularity) and better than all 3 combined, built into the language syntax. i.e. all you need to do is write "import guava.* from jigsaw://guava.google.com/guava/r8;" at the top of the file and the IDE will use one of the basic commands of the language's toolkit (just as basic as 'java' and 'jar') to resolve and download this dependency, and link it all up, sources included, in your IDE.
- Be quite close at least at-a-glance to java syntax, just like java syntax looked virtually 100% the same as C code if you didn't look too close and picked examples that fit well, such as algorithms.
- Yes, most likely this language _will_ have closures, even if only because excluding them means all the discussion will be about a perceived negative. Personally I do think java 1.1's anonymous inner classes were a mistake and should have been closures instead. It'll most likely also have collection literals and do away with a few annoyances.
- A solution for sharing objects/structs provided by one library, between 2 libraries that each are dependent on a different version of that library. i.e. you want to share a guava ImmutableList between 2 libraries, but library one is at r7, the other is at r8. May involve some sort of nifty 'view' concept where an API can also export a bunch of wrapper methods that make it look like different API, while being represented 'under the hood' by the same batch of fields/struct so it can be transferred. Could be used to fix collections API while remaining compatible with that same API well enough to be able to pass (java.next) lists around to methods that want java.util.Lists without hassle.
- Possibly will ship WITHOUT most of what we now consider a standard library, instead embracing the modularity concept fully and shipping instead with the knowledge that there's boatloads of libraries out there for you to import.... though I wonder if this will hit the right notes of trivially understood simplicity and power that are needed to become a new great language. I'm sure this part IS typically simple+powerful to fit, but it might not be obvious enough. Same goes for features to sanely upgrade libraries. If anything annoys me personally about the search for a new language is that the vast majority of them are blaming java for things that will happen to them in 10 years time too: Libraries that looked good then don't look so great now but changing it won't work because you really can NOT break backwards compatibility when you're that established. I can point at many scala libraries that seem like fine candidates to look downright "what the heck were they thinking". Not now, but in 10 years time. Just like java.util.Date, and the implicit mutability of java.util's collections, etc. Again a point which definitely leads to a simple+powerful language but might not be obvious enough. Would at least require some serious campaigning to make this point stick in the minds of the masses. (Probably with placations of "The only language ready for the future!" or some such).
- I _really_ doubt this is in practice simple+powerful, but it might look like it: parallelism and other fine-grained concurrency control built straight in the language. Some mix of parallel-by-default loops and Software Transactional Memory perhaps. It'll certainly look like a lightweight convincer even if it isn't, and looks is worth a lot.
- Ships out of the box with full IDE support. The vast majority of rank and file java programmers use Eclipse, IDEA, Oracle's builderwhatsit thing, or netbeans (in that order). Shows people you understand how they work.
Looking at that list, Gosu is a lot closer than fantom or scala... though probably not good enough either.
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
I'm in the UK, my spare time and energies are currently elsewhere,
perhaps in the autumn I will be looking to do something - before
Devoxx so that I can also get the maximum benefit of the Scala
presentations there too.
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
I have to disagree with this evaluation of Java, it most certainly DID remove a lot from C/C++ instead of simply porting the syntax wholesale.
Pointers and reference types spring immediately to mind, as do macros and templates. C++ pointers allow you to create higher-kinded functions and write in a much more functional style, Java abandoned this ability. You'll also find that Scala's collections are far more interoperable and closer to Java's than Java's are to collections in the STL.
So why did Scala not simply adopt Java's collections (which it can happily use, by the way). Simple, to drop the inherent mutability that pervades the Java collections API, to allow for declaration-site variance (instead of wildcards throughout your code), and to make it easy to add all the juicy higher-kinded methods that make the library so damned powerful
Scala. [in reference to: DSL features via compiler plugins instead of language features]
- A marriage between OSGi (i.e. runtime modularity), maven central (i.e. module repository), and gradle/ivy/maven (i.e. buildtime modularity) and better than all 3 combined, built into the language syntax. i.e. all you need to do is write "import guava.* from jigsaw://guava.google.com/guava/r8;" at the top of the file and the IDE will use one of the basic commands of the language's toolkit (just as basic as 'java' and 'jar') to resolve and download this dependency, and link it all up, sources included, in your IDE.Take a look at Scala-Modules, this is all very doable via standard DSL approaches. There are also ongoing efforts to modularise the language and core libraries.
Scala. Though most algorithms change significantly in appearance once you have closures available. This will be true of any Java successor. [re: scala looks just like java]
Make the syntax clean enough, and you don't need collection literals. This also makes it far, far easier to write new collection types that look natural. History is littered with examples of things being standardised in syntax and later discovered to be a bad practice, but impossible to then remove from the language. Such as checked exceptions...
- A solution for sharing objects/structs provided by one library, between 2 libraries that each are dependent on a different version of that library. i.e. you want to share a guava ImmutableList between 2 libraries, but library one is at r7, the other is at r8. May involve some sort of nifty 'view' concept where an API can also export a bunch of wrapper methods that make it look like different API, while being represented 'under the hood' by the same batch of fields/struct so it can be transferred. Could be used to fix collections API while remaining compatible with that same API well enough to be able to pass (java.next) lists around to methods that want java.util.Lists without hassle.Interesting... How would you propose such a mechanism should work? Sounds more like a requirement for library authors to me.
- Possibly will ship WITHOUT most of what we now consider a standard library,
Scala again :)
- I _really_ doubt this is in practice simple+powerful, but it might look like it: parallelism and other fine-grained concurrency control built straight in the language. Some mix of parallel-by-default loops and Software Transactional Memory perhaps. It'll certainly look like a lightweight convincer even if it isn't, and looks is worth a lot.Scala: Parallel collections in 2.9 (soon to be released)But this is all done as part of the standard library and not the core language syntax (as per your previous point...)
- Ships out of the box with full IDE support. The vast majority of rank and file java programmers use Eclipse, IDEA, Oracle's builderwhatsit thing, or netbeans (in that order). Shows people you understand how they work.The 2.9 Eclipse plugin for Scala is looking very sexy, and IntelliJ is already at full production strength. I can't comment on Netbeans.
Gosu certainly looks interesting and lightweight, offering many of Scala's nicer qualities. I think, though, that the killer feature in the future is going to be parallelism,
How does that dispute what I said, though? I think many would agree
that Java would have died had a few heavy weights in the industry not
backed it and kept it going. Isn't the most popular Java web
framework still struts?
Wow, that's some raving scala fanboyism again, Kevin. At the end you resort to outright lies. You didn't understand most of my points, apparently, so I'll attempt to clarify where I can.
On Tuesday, March 22, 2011 12:35:15 PM UTC+1, KWright wrote:I have to disagree with this evaluation of Java, it most certainly DID remove a lot from C/C++ instead of simply porting the syntax wholesale.But it did port the _SYNTAX_ wholesale, even down to the weird postfix array brackets and screwed up switch statements. It got rid of pointers, but at least in algorithmic examples you don't even see that, and no pointers was a clear bid for simplicity, and my theory is that making stuff seemingly simpler in an obvious way (regardless of what actually happens, its all about what it looks like) helps a lot.
Same goes for macros and templates which are primarily preprocessor concepts, and something generally considered overly complicated. In other words, if you're going to change, you should change in a way that includes a promise of "We've made this way simpler, just look at this snippet, isn't it obvious?". Whether or not it'll actually work out that way in practice. For java, it clearly did, at least in regards to preprocessor (not really needed due to a single standard platform) and pointers (that one's obvious).You can take for example some example crypto algorithm and copy it into a text file, rename it to java, fix main up so it returns void and not int, and clear out the header import, and it'll probably compile just like that with javac. There's absolutely no way the same treatment is going to end up making a scala-valid file when you start with either java or C code.
Pointers and reference types spring immediately to mind, as do macros and templates. C++ pointers allow you to create higher-kinded functions and write in a much more functional style, Java abandoned this ability. You'll also find that Scala's collections are far more interoperable and closer to Java's than Java's are to collections in the STL.Yes, but java already broke ALL pretense of being even remotely compatible with anything C related, that was one 'easy to switch' barrier they decided to forego. You don't have to be perfect, just good enough. Scala is missing a point here, because unlike java, it _COULD_ have attempted to be compatible (as its built on the JVM the option was there), but it isn't. (Programming to java.util.* is possible in Scala but then you're in a no-mans land where you get zero community support and leaky interop with both java and scala, i.e. the worst of both worlds. At best you can enter this nomans land to program up some bridges, but that's not exactly simple and hassle free).
See for example gosu, which has heavily invested in a language feature that amongst other things, at least in theory, can give you compatibility with java.util.* while also fixing some of those API's warts. They scored a point with that.So why did Scala not simply adopt Java's collections (which it can happily use, by the way). Simple, to drop the inherent mutability that pervades the Java collections API, to allow for declaration-site variance (instead of wildcards throughout your code), and to make it easy to add all the juicy higher-kinded methods that make the library so damned powerfulThat doesn't matter. They point is: They DIDNT copy them. Nor they did choose some middle road where scala takes a vanilla j.u.List and attempts to craft higher-kinded methods on top of that using some sort of extension mechanism. Unlike pointers and the preprocessor, java collections are not generally considered as overcomplicated. Possibly the API is considered a little underpowered, but fixing that is not nearly as convincing as simplifying matters.
The reason this is so important is because it makes it virtually impossible for scala to get a foot in the door of a normal programming shop. If vanilla scala straight out of the tutorials could be easily combined with existing java programs, then some enterprising early adopter could write some new feature in scala and stripe it into the build bundled up with java files. Someone else catches on and does the same thing. 4 years later, half the code base total and 99% of the code base under active development is scala code, and the java legacy bits at some point just get scrubbed out and there was much rejoicing. New projects or rewrites are done in scala.Except none of that will happen because you can't get that all-important foot in the door. Because nobody really used it 'in production', when the decision is made to from-scratch rewrite something or start a new project, scala is not seriously considered.Scala. [in reference to: DSL features via compiler plugins instead of language features]Don't make me laugh. Scala is hardly pluggable (if you think so, you haven't seen anything yet), and even if the few improvements it has made over java are taken as acceptable on this front, then that would make it suck more; scala caters to DSLs via flexible language constructs (optional semicolons, dots, and parens for method calls and the like, implicits, and so on and so forth), but these language constructs have disadvantages, mostly they complicate matters. A language that implements every single different route to the same end result is obviously going to be far too complicated for anyone to use. You have to make a choice here: Either DSL the language, or DSL the compiler via plugin architecture. You can do both but that doesn't get you to the next language. In passing you're also insinuating scala was designed with IDEs in mind - Which is so obviously false I'm not going to bother quoting. Also, plugging the compiler is never shown as example on any scala example I've ever seen, which means its completely irrelevant insofar as convincing the masses go.
- A marriage between OSGi (i.e. runtime modularity), maven central (i.e. module repository), and gradle/ivy/maven (i.e. buildtime modularity) and better than all 3 combined, built into the language syntax. i.e. all you need to do is write "import guava.* from jigsaw://guava.google.com/guava/r8;" at the top of the file and the IDE will use one of the basic commands of the language's toolkit (just as basic as 'java' and 'jar') to resolve and download this dependency, and link it all up, sources included, in your IDE.Take a look at Scala-Modules, this is all very doable via standard DSL approaches. There are also ongoing efforts to modularise the language and core libraries.There's no scala-centralized module download service shared by all consumers of anything scala related (compilers, IDE, programs written in scala). There's also no repository, there's no runtime modularity, and most of all its not built into the language, right there from the very first tutorial. Unlike, say, java's garbage collection or everything-with-OO-never-pointers nature. How the heck is anyone casually inspecting what this scala hubbub is all about going to figure out that it's going to magically solve all modularization problems (which it doesn't, but lets roll with your hypothetical fair weather scala fanboy outlook here and say that it'l all ponies and rainbows).
Scala. Though most algorithms change significantly in appearance once you have closures available. This will be true of any Java successor. [re: scala looks just like java]That's just not true at all. Scala code does not look like java code. All sorts of things have fundamentally changed. No 'return', no semicolons, no dots, no parens, different way of declaring methods, constructors changed completely, many syntax nooks and crannies updated. Contrast to java which knowingly went with inferior syntax constructs just because they would be familiar to C programmers, i.e. the 'switch' and 'for' syntax as well as postfix arrays. Gosling and co. didn't include that because they liked their styles, they did it because they prioritized being familiar above being more consistent.
If you think scala went through as many hoops as it could to be as familiar to java programmers as it could possibly be, you're... delusional. There are literally hundreds of syntax constructs in scala which are different from java, probably for its own consistency's sake better, but could have easily been written in a more java-like way.
Make the syntax clean enough, and you don't need collection literals. This also makes it far, far easier to write new collection types that look natural. History is littered with examples of things being standardised in syntax and later discovered to be a bad practice, but impossible to then remove from the language. Such as checked exceptions...Such as Scala's XML literals? Zing!
Checked exceptions can actually be removed from java in a heartbeat, without breaking backwards compatibility, so clearly not a valid example. Also, a syntax where you can make virtually every construct you can think of now or in the future a reality sounds great and nicely forward compatible, but in practice it also means its virtually impossible to tell, at a glance, what any code could possibly do. Flexible DSLy language features go hand in hand with confusing compiler errors and libraries that are utter rocket science to even journeyman programmers (lift, anybody?).
It's all very powerful, but not the kind of 'simple' that has immediate appeal to would-be switchers. Worse, these constructs give those who'd prefer more caution ample ammunition to point out problems. Such as trying to turn 2 lists of objects into a map, which is utter gobbledygook in scala. You can either do:Map((listA zip listB).toArray:_*)That's not a smiley at the end, that's cartoon swearing to make it work (specifically, to tell scala to treat that map as the full array of all varargs, not as the first vararg of an array of array of A,B tuples.Alternatively:(listA zip listB) toMap;With the semicolon all of a sudden mandatory, because otherwise the statement on the next line, if it is a valid expression (and virtually everything in scala is), is likely to be interpreted as the parameter to toMap, which is implicit and thus is not actually necessary.
Getting this wrong results in extremely obtuse compiler errors which no one but a scala expert is going to figure out. This is a problem that seems to be invisible to the scala experts.
That's the kind of 'complicated' that beginners are going to run into and is going to cause them to abandon it in favour of well-known java, wondering what could possibly have bewitched all those language experts that said switching would be a good idea.
- A solution for sharing objects/structs provided by one library, between 2 libraries that each are dependent on a different version of that library. i.e. you want to share a guava ImmutableList between 2 libraries, but library one is at r7, the other is at r8. May involve some sort of nifty 'view' concept where an API can also export a bunch of wrapper methods that make it look like different API, while being represented 'under the hood' by the same batch of fields/struct so it can be transferred. Could be used to fix collections API while remaining compatible with that same API well enough to be able to pass (java.next) lists around to methods that want java.util.Lists without hassle.Interesting... How would you propose such a mechanism should work? Sounds more like a requirement for library authors to me.Look at gosu, for example. Basically, you canonize wrappers as language features. Basically you say: Anytime anyone uses the type named "X", compile it down to type "Y", but make it look like it has a different API. Here's a bunch of methods that should be the API, and they all get access to the underlying type Y. For example, I could make a new java.util.Properties wrapper that is a real Properties under the hood but which actually acts as if it has a cleaned up simplified API, i.e. delete the deprecated methods, make it a proper Map<String, String>, add a print routine, and more. Even if a method is called that takes a CleanedupProperties and is handed a _subclass_ of Properties, this wrapper can still get the job done. You can probably add this to scala without too much hassle, but you have to choose: Either most of the scala-standard API is built as these wrappers, and authors are taught early in the process of learning the language how to build these, or you run into the usual problem with offering many ways to solve the same problem: The community chose way X, so all other ways are effectively useless and serve only to complicate matters.
It gets more complicated if you want to change the underlying structural data (i.e. the fields). For example, envisioning a way to make java.awt.Point immutable requires a lot more crazy stunts, but at least you could make a Point 'class' that is mostly immutable, i.e. will only end up changing if you pass it into code that uses the old API and that code makes changes to it.
- Possibly will ship WITHOUT most of what we now consider a standard library,Scala again :)Pure lies. Scala ships with a large and growing standard library. There is no way to import other libraries without writing up an sbt or maven pom.
- I _really_ doubt this is in practice simple+powerful, but it might look like it: parallelism and other fine-grained concurrency control built straight in the language. Some mix of parallel-by-default loops and Software Transactional Memory perhaps. It'll certainly look like a lightweight convincer even if it isn't, and looks is worth a lot.Scala: Parallel collections in 2.9 (soon to be released)But this is all done as part of the standard library and not the core language syntax (as per your previous point...)For once scala delivers, sort of, on this. But it's not endemic to scala, for example foldLeft remains completely sequential, cannot at all be parallelized. Also, scoring 1 point here doesn't really weigh up to the tens of points lost for making it all look far too complicated.
- Ships out of the box with full IDE support. The vast majority of rank and file java programmers use Eclipse, IDEA, Oracle's builderwhatsit thing, or netbeans (in that order). Shows people you understand how they work.The 2.9 Eclipse plugin for Scala is looking very sexy, and IntelliJ is already at full production strength. I can't comment on Netbeans.This helps, but its taken way too long. The last time I used the scala plugin (which admittedly wasn't 2.9), it still didn't work right so often I usually dropped down to the command line and compiled with scalac to be 100% certain this obscure illegible compiler error I was getting was truly a problem in my code and not a plugin bug. That's not a good sign.
Gosu certainly looks interesting and lightweight, offering many of Scala's nicer qualities. I think, though, that the killer feature in the future is going to be parallelism,See other thread of a while ago where I suggested parallelism is not a killer feature at all. Also, if that's the only serious convincer scala has, scala is in trouble, as its one of the most complicated ones on the docket, requiring massive changes to language style and APIs.... which scala indeed does have.
What was alarming and depressing about those Java projects I was reviewing was not that they were poorly designed. I expected that; design is, after all, difficult. No, the surprising thing was that somehow, against all odds, the developers had managed to wrestle these monstrous designs over the finish line. The sheer dogged determination it took to do so was impressive and horrifying. I would have given up in despair long before.The experience taught me a valuable lesson:Weak developers will move heaven and earth to do the wrong thing. You can’t limit the damage they do by locking up the sharp tools. They’ll just swing the blunt tools harder.
Repeated case studies have shown time and time again that imperative code is harder to reason about
, I defy you to find me a single person who's seriously looked into the question who won't also claim that this aspect of Java's collections is unnecessary complexity.
Don't make the mistake of thinking Java's collection framework is good design simply because of your own familiarity. Times have changed and problems have been discovered, but backward compatibility has become a ball-and-chain, preventing Java from removing problematic features, other JVM languages don't have this burden.
no semicolons: Scala has semicolons, they're just optional when it's obvious what's going on
no dots: Eh, since when? Scala uses dot notation for calling methods exactly as Java does
no parens: Same as dots.
Read through "Java Puzzlers" again, look at how many of those problems no longer apply to Scala...
It gets more complicated if you want to change the underlying structural data (i.e. the fields). For example, envisioning a way to make java.awt.Point immutable requires a lot more crazy stunts, but at least you could make a Point 'class' that is mostly immutable, i.e. will only end up changing if you pass it into code that uses the old API and that code makes changes to it.Ahh, yes. Such as the ability to change a public field into a method, for example. This is known as the universal access principal, and was another core design goal of Scala,
You repeatedly bring up the presence of folds as your main argument for the claim that Scala isn't ready for concurrency, but the truth of the matter is that folds aren't actually used very much at all in a great deal of Scala programming.
I'll leave you with a great snippet from Glen Vanderberg: http://www.vanderburg.org/blog/Software/Development/sharp_and_blunt.rdoc
On Tue, Mar 22, 2011 at 9:29 AM, Kevin Wright <kev.lee...@gmail.com> wrote:
Repeated case studies have shown time and time again that imperative code is harder to reason aboutCome on now. I was going to ask you for some evidence to back up this claim but the fact that there are millions of lines of code written in imperative style today is enough to prove this claim completely wrong.Can we improve over the imperative style? Of course. But assuming that the only way to do so is by switching to a functional, actor based or asynchronous style is just the illustration of how blinded by your Scala love you are.Personally, I find Actors and asynchronous/CP style much, much harder to reason about. It has some benefits and using such techniques is occasionally the best way to solve certain problems, but again, arguing that these techniques are an improvement over the current state of affairs with no drawbacks whatsoever is delusional.
, I defy you to find me a single person who's seriously looked into the question who won't also claim that this aspect of Java's collections is unnecessary complexity.Don't make the mistake of thinking Java's collection framework is good design simply because of your own familiarity. Times have changed and problems have been discovered, but backward compatibility has become a ball-and-chain, preventing Java from removing problematic features, other JVM languages don't have this burden.Overall, I think the Java collections are a pretty impressive piece of work, considering the constraints in which they were designed. They are easy to use, effective and fairly versatile. Java's accidental verbosity sometimes leads to more lines of code than I'd like to see, but I would definitely call Collections a resounding success overall (they even survived their retroactive generification, which is quite a feat).Scala's collections have some very interesting properties too but they haven't been out for an entire major version yet and they are already coming under heavy fire (read Tony Morris' blog or his rants on #scala to get an idea). That's not a good sign. The parallel collections also feature some interesting stuff but I think they have crossed the academic threshold too far to be of interest to mainstream Scala programmers.I also find it interesting that for a language that claims to have embraced the next killer feature, parallelism (something I completely disagree with, by the way, just like Rainier), it's necessary to resort to libraries to actually get some juice out of the nice properties of immutability instead of leveraging the language. I already mentioned in a couple of previous messages to this mailing-list that Scala-the-language does close to nothing to enforce immutability, and the new collections prove this point.In effect, we're not in a very different situation from Java's "ImmutableList.of()".
no semicolons: Scala has semicolons, they're just optional when it's obvious what's going onDo you even see the problem with this kind of statement?no dots: Eh, since when? Scala uses dot notation for calling methods exactly as Java doesNo it doesn't. Come on Kevin, seriously? You need to improve on the objectivity side of your statements if you want to be taken seriously.Here is Martin's "Scala tip of the day" from yesterday:" tip of the day: Avoid postfix operators except in a DSL. Use f.op, not f op. Much safer for semicolon inference"
no parens: Same as dots.Here is another tip from Martin, from a few days ago:"tip of the day: Never omit ()'s for methods that have side-effects."Kevin, I'm seriously beginning to wonder if you know Scala as well as you think you do.
Read through "Java Puzzlers" again, look at how many of those problems no longer apply to Scala...Do you seriously think that a book called "Scala Puzzlers" could not exist?I could write one just by taking random commits from the scalaz project.
It gets more complicated if you want to change the underlying structural data (i.e. the fields). For example, envisioning a way to make java.awt.Point immutable requires a lot more crazy stunts, but at least you could make a Point 'class' that is mostly immutable, i.e. will only end up changing if you pass it into code that uses the old API and that code makes changes to it.Ahh, yes. Such as the ability to change a public field into a method, for example. This is known as the universal access principal, and was another core design goal of Scala,Yes, this is great. As are traits and compact class declarations.
You repeatedly bring up the presence of folds as your main argument for the claim that Scala isn't ready for concurrency, but the truth of the matter is that folds aren't actually used very much at all in a great deal of Scala programming.Tying the concept of folds to a programming language is quite baffling. Folding is an algorithmic concept and it's something that you have to do on a regular basis, regardless of what kind of code you are writing or what language you are using. You iterate over a collection and you perform an operation that has some sort of side effect. Some people enjoy trying to wrap the operation in a monoid so they can say that their code is pure, others just use an accumulator and move on with their life.The bottom life is that from a practical standpoint, 1) folds are not parallelizable and 2) they are pretty easy to write in a non functional style.
I'll leave you with a great snippet from Glen Vanderberg: http://www.vanderburg.org/blog/Software/Development/sharp_and_blunt.rdocThat's a horrifyingly condescending quote making fun of people who actually ship software.
--
Cédric
I'll leave you with a great snippet from Glen Vanderberg: http://www.vanderburg.org/blog/Software/Development/sharp_and_blunt.rdocThat's a horrifyingly condescending quote making fun of people who actually ship software.Why, do you genuinely believe that Java prevents anyone from ever writing bad code by removing access to capabilities that would allow some people to write better code?
I can't even begin to understand how your response has anything to do with the observation I made about this quote.2011/3/22 Kevin Wright <kev.lee...@gmail.com>I'll leave you with a great snippet from Glen Vanderberg: http://www.vanderburg.org/blog/Software/Development/sharp_and_blunt.rdocThat's a horrifyingly condescending quote making fun of people who actually ship software.Why, do you genuinely believe that Java prevents anyone from ever writing bad code by removing access to capabilities that would allow some people to write better code?I expressed my concern that you like a quote calling programmers who ship software and who don't give up "weak".
"the developers had managed to wrestle these monstrous designs over the finish line. The sheer dogged determination it took to do so was impressive and horrifying. I would have given up [on such designs] in despair long before."
If anything, knowing that this guy would have given up long ago is what makes him weak in my eyes. Obviously, his attitude and condescension over others would be enough to put him instantly on my "no hire" list.
--
Cédric
With "weak" developers being those who are set in their ways, and don't change tactics even though they can see they're experiencing problems.If you were to interpret that statement as "I would have given up [on the overall project]", then we're in complete agreement. It *is* condescending when read that way.
--
Let me rephrase part of that exchange for a subject probably none of us is emotional about:"Repeated case studies have shown time and time again that driving on the left is safer""The fact that there are millions of cars driving on the right is enough to prove this claim completely wrong"Is the fallacy easier to see now?
On 22 Mar 2011 21:37, "Ricky Clarkson" <ricky.c...@gmail.com> wrote:
>
> Let me rephrase part of that exchange for a subject probably none of us is emotional about:
>
> "Repeated case studies have shown time and time again that driving on the left is safer"
>
It's true!
http://en.wikipedia.org/wiki/Right-_and_left-hand_traffic
I find the reasons for left vs. right to be especially fascinating, it all goes back to horses...
The unfamiliar always seems harder. But once familiar with both styles, it becomes a real pain having to read all the code between a variable's declaration and some usage, just in case it was mutated in the middle.
Declarative code is easier because it makes very obvious the bits you're interested in, allowing you to safely disregard the rest.
Right, and I'm claiming that the "next java" will have amusingly few
of the features you are calling out in your list. Not that they will
just be a subset.
And don't think I'm trying to downplay the features you listed. I
think that it is a good list. (I happen to side with Kevin in
thinking scala does a better job at them than you concede, but I agree
that it is debatable.) I just think market is more important than any
technical merits that many of us care about.
I guess my list would be this: The "next Java will be whichever JVM
language is used by a killer app backed by some heavy names."
Currently, it looks like the best bet for this is whatever you would
call the Android programming language. Failing that, I'm not sure I
see a "next java" ever happening, honestly.
This been my belief for a while. I, of course, have nothing to back
this up. :)
> Google adopts or makes a new programming language to replace java for
> android development to avoid some lawsuits, and via that route we'll get a
> java.next. Huh. Cool theory.
I simply meant more that I feel like Android is pulling in more new
"java" developers than any other technology out there at the moment.
For a long time, web development seemed to be the big pull to any
technology. Now, it appears that "app" development is the big pull
and that appears dominated by obj-c and java for Android. If someone
were to release a compelling dev kit for Android that had a different
language, I would imagine it would gain traction rather quickly.
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
I simply meant more that I feel like Android is pulling in more new
"java" developers than any other technology out there at the moment.
OK I did not say it -
(Sorry to post a link, but it is worth it.)
http://alarmingdevelopment.org/?p=562
Dick, I am looking at you too..
Here is what Cedric beust said..
http://beust.com/weblog/2011/02/23/from-scala-back-to-java/