Re: postfix ++ being 'weird' unless you're already familiar with it. But of course. Why do you think java was such a success, especially 'in the enterprise'? Because it LOOKS and feels a little bit like C++.
Anyone who knows both C++ and Java knows that the languages are in fact not even in the same city, let alone the same ballpark. The similarities are mostly superficial. And yet, this was an important driver. I used to think it was because of trivialities (the pointy haired boss thought it was just a minor change, the actual developers knew better), but a while ago I refined this to: It actually does matter. Those little things do make the learning curve much more manageable. Makes switching from the old mainstream to the new one an easy and gradual process. Re: functional being 'big' - oh, sure. You won't get an argument from me for this. I just don't think scala is the best that the programming world can come up with, by a long shot / possibly its not too late and scala can come out with a backwards-compatibility-breaking new release that has intrinsic support for sane API and language syntax updates (so that it's the last time compatibility is ever broken). Re: TIMTOWDI: Wait, we're comparing Scala to Java now? Well, duh, of course it comes out looking quite decent. Java's clogged with a decade of mistakes that can't really be erased properly because, due to being an enterprise heavy language, a python3k-esque restart just won't fly. Heck, even python3k is crashing and burning in the community, so imagine what had happened if java just up and broke compatibility. This is one of the reasons why I think a new, modern language -really- should add API and language migration facilities (This is possible, but its a really hard problem to solve properly. Totally worth it, though - in today's world you can not break stuff, the community just won't tolerate it very well). More to the point about TIMTOWDI: Sure, you can't avoid it entirely, but you certainly can use it as a rule of thumb. The ruby has_key/key/member/include example highlights that just because you can't avoid it entirely, doesn't mean you should then not even think about it. Clearly Matz should have picked one (or if there was a -really- -REALLY- good reason, two, tops) instead of just giving up and adding every word he could think of. Scala doesn't really go quite that far in ridiculousness, but if foldLeft warrants an operator, then where do you draw the line? academics, strictly functional programming fans, and programming language hackers love folds and it makes perfect sense to turn it into an operator. Joe Q. average programmer? Not so much. As Ruben mentioned, being concise is not really relevant. being clear, and making trivial those things that weren't trivial before, are much, -much- more important. Scala puts far too much emphasis on the 'look ma!' department - short snippets of code that, once you take half an hour to decode the whole thing, make you sit in awe of its zen-like perfection. Neat trick, but enterprise folk just don't care, and neither do I. All we really need is a clearer focus on immutables (which scala sort of botched with immutables that weren't really immutable under the hood and caused race conditions, but fortunately those are being fixed now), get rid of the null mechanism (which scala doesn't really do properly either), have closures (score one for scala), define as much of the language as is reasonable in (core) libraries (but don't do it just because of ideology, it has to make sense - mostly score one for scala), solve the versioning problem once and for all (zero points for java and scala), and most importantly of all, wrap this up in a nice 'familiar' package with C-like syntax that works mostly as an imperative execution environment (in the sense that instructions are mostly run one at a time), that has -excellent- tool support (you could do far far better than java's, and at least scala's much more consistent adherence to typing systems means that part of it is better suited to tools. Good). That's it. Scala only covers half of that base and adds a whole lot of cruft. My intention is NOT to bash scala. In fact, not being all that popular in the enterprise means there's a lot less pressure on the developers of the language. However, if the enterprise market is your goal (and to be fair, they could use some enlightening, really), then scala isn't nearly as good as what could be, and overkill to boot. On Dec 21, 6:08 pm, Gabriel Claramunt <[email protected]> wrote: > On Dec 21, 8:19 am, "Mark Volkmann" <[email protected]> wrote: > > > > > On Sun, Dec 21, 2008 at 2:27 AM, Jorge Ortiz <[email protected]> wrote: > > ... > > I was involved in a discussion similar to this on another mailing list > > recently. I don't agree with the argument that it's okay for a > > language to have lots of syntax features because "if you don't want > > them, don't use them". The problem is that even if you don't use them, > > you still have to understand ALL of them because you'll have to read > > code written by others that do use them. This is true even if your > > company has standards that preclude them because you'll still need to > > read code that other people outside your company wrote as you are > > learning about the language. > > > To give an example from Ruby, here are the methods that tell you if a > > Hash (a Ruby map) contains a given key: has_key?, key?, include? and > > member?. These are aliases for each other. The good news is that you > > can pick the one that sounds best to you. The bad news is that you > > have to remember that they all do the same thing because others will > > use a combination of all them. This is TIMTOWDI gone awry! > > > -- > > R. Mark Volkmann > > Object Computing, Inc. > > But this is a matter of "choosing your own poison": > how many ways do you have to increment a variable in Java? how many > ways do you have to select between different options? how many ways do > you have to iterate over a list? > I believe the ternary operator, post increment, increment-and- > assignment, etc, don't look extremely weird to us because we're > already familiar with them, otherwise they're as odd as /: > I don't think any language can escape TIMTOWDI without getting > EXTREMELY restrictive. > One interesting thing about Scala is that many oddities like /: are > just method names enabled by the syntax and not encoded as a > particular case in the core language. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
