Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-21 Thread Kevin Wright
If I could just recommend this book right now: http://pragprog.com/titles/ahptl/pragmatic-thinking-and-learning Amongst other thinks, it refers quite extensively to the Dreyfus Model: http://en.wikipedia.org/wiki/Dreyfus_model_of_skill_acquisition In particular, there's a section where it discusse

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Josh Berry
On Mon, Sep 20, 2010 at 2:49 PM, Reinier Zwitserloot wrote: > Indeed, it is very related. In that it's stupid. There's great value > in debating which style is best, but once the pros and cons are > weighed, there's far more benefit in everyone standardizing on the > same thing than everyone going

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Reinier Zwitserloot
Indeed, it is very related. In that it's stupid. There's great value in debating which style is best, but once the pros and cons are weighed, there's far more benefit in everyone standardizing on the same thing than everyone going off and doing their own thing. That's all *IF* there is no real bene

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Reinier Zwitserloot
"louse up" is british slang for screw up. I thought it was apt, what with the term "bug" being related :P Some formatting (most, really) can be used with care to aid readability. Screwing up indents is not generally one of them. Nor is re-ordering the import list, or switching between same-line op

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Kevin Wright
I know... shocking, isn't it? This analogy certainly has some sticking power :) On 20 September 2010 18:54, Russel Winder wrote: > On Mon, 2010-09-20 at 16:35 +0100, Kevin Wright wrote: > > Just look into the variety of music notation: > > http://en.wikipedia.org/wiki/Musical_notation > > So t

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Russel Winder
On Mon, 2010-09-20 at 16:35 +0100, Kevin Wright wrote: > Just look into the variety of music notation: > http://en.wikipedia.org/wiki/Musical_notation So the USPTO issues patents on musical notations as well as software. I guess the obvious response is: good grief! -- Russel.

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Kevin Wright
Just look into the variety of music notation: http://en.wikipedia.org/wiki/Musical_notation Believe me, there's a lot of bickering over this. Should it be "classic european" or tablature style for guitar, or maybe just chord names and a rhythm? What

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Josh Berry
On Mon, Sep 20, 2010 at 10:14 AM, Reinier Zwitserloot wrote: > I have no idea how any of this is related to giving programmers the > ability to bicker endlessly about pointless trivialities such as tabs. > v spaces, and/or the strange notion that giving programmers the > ability to louse up their

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Reinier Zwitserloot
I have no idea how any of this is related to giving programmers the ability to bicker endlessly about pointless trivialities such as tabs. v spaces, and/or the strange notion that giving programmers the ability to louse up their indents is more important than generating useful and localized error m

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Josh Berry
On Mon, Sep 20, 2010 at 2:34 AM, Reinier Zwitserloot wrote: > I don't think he invented it. For those who have an interest in it, a > better alternative is, instead of declaring that you return "A", > instead forget A and declare that you return "RuntimeException". Then, > advise people to use: >

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Amarjeet Singh
An anything recursive is trance. On Mon, Sep 20, 2010 at 7:32 AM, Kevin Wright wrote: > EPFL is Swiss, Martin is German... > > On 20 September 2010 12:12, Miroslav Pokorny > wrote: >> >> >> On Mon, Sep 20, 2010 at 8:37 PM, Kevin Wright >> wrote: >>> >>> Not just jazz, but all music! >>> Functio

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Kevin Wright
EPFL is Swiss, Martin is German... On 20 September 2010 12:12, Miroslav Pokorny wrote: > > > On Mon, Sep 20, 2010 at 8:37 PM, Kevin Wright wrote: > >> Not just jazz, but all music! >> >> Functional programming is classical, web front-ends are pop, PHP is >> Britney Spears, Ruby is closer to Rock

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Miroslav Pokorny
On Mon, Sep 20, 2010 at 8:37 PM, Kevin Wright wrote: > Not just jazz, but all music! > > Functional programming is classical, web front-ends are pop, PHP is Britney > Spears, Ruby is closer to Rock. > Scala was almost certainly written by Beethoven, Clojure was probably Satie > > As an analogy, it

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Kevin Wright
I always imagined Coq more as coming from a string quartet. On 20 September 2010 11:49, Ricky Clarkson wrote: > Perl would surely be heavy metal (almost line noise). > > I'd have put Ruby in as prog rock; you either love it or wonder what's > wrong with the guy's keyboard. > > Java's a three-cho

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Ricky Clarkson
Perl would surely be heavy metal (almost line noise). I'd have put Ruby in as prog rock; you either love it or wonder what's wrong with the guy's keyboard. Java's a three-chord trick, Coq is a performing arts piece (again, you wonder what's wrong with the guy's keyboard). On Mon, Sep 20, 2010 at

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Kevin Wright
Not just jazz, but all music! Functional programming is classical, web front-ends are pop, PHP is Britney Spears, Ruby is closer to Rock. Scala was almost certainly written by Beethoven, Clojure was probably Satie As an analogy, it has a lot of potential... On 20 September 2010 10:10, Ricky Cla

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-20 Thread Ricky Clarkson
Reinier, You must understand that this is subjective. As usual, if discussed to a limit we'd just end up debating the meaning of various terms. Programming is, yes, about making the computer do something, but beyond a very small scale one needs to be able to read existing code. At that point th

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Reinier Zwitserloot
I don't think he invented it. For those who have an interest in it, a better alternative is, instead of declaring that you return "A", instead forget A and declare that you return "RuntimeException". Then, advise people to use: throw sneakyThrows(new IOException()); instead of James's: return sn

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Reinier Zwitserloot
You're equating english or jazz to programming? That seems, in a word, ridiculous. The simile would be in trying to codify what kinds of _programs_ you could write. That would indeed be a very bad idea. Trying to codify _how_ you write them is something programming languages do pretty much by defi

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Josh Suereth
the val does not evaluate to (), the compiler actually adds the () after the val definition. It's a workaround for situation where you assign to a value in a code block. It removes the need for () at the end of an expression that does so. (I know I'm late on this conversation). - Josh On Fri,

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Steel City Phantom
I happen to like javas package system. It's simple and absolute. I like that. That issue is actually one of my biggest complaints about c# trying to organize code in that is a nightmare to me. To many ways to screw up in my opinion On Sunday, September 19, 2010, Josh Berry wrote: > > > 2010/9/19

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Josh Berry
Yeah, Specs has been the example that I've used to show people "literate specifications." And, I realize there are some rather enjoyable "literate" programs in Java. James Iry's wonderful chucking example is rather fun. http://james-iry.blogspot.com/2010/08/on-removing-java-checked-exceptions-by.

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Kevin Wright
You should check out ScalaTest, or Cucumber in Ruby, or Spock in Groovy. I know there are similar frameworks in other languages - just can't remember the names right now! For some reason, test frameworks seem to be a hotbed of innovation for all this literate DSL'y stuff On 19 September 2010 1

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Josh Berry
2010/9/19 Cédric Beust ♔ > I've found Java to be remarkably style impervious in the sense that I can > read Java code using all kinds of different styles (different indentations, > different brace placements, different namings for fields or variables, > etc...) and not be bothered by it for more

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Kevin Wright
Totally, I'll just read what I'm given - or reformat in an IDE if it's *really* bad (e.g. written with a different tab size other than 4) I'm also finding that the guideline 2 space indents in Scala is a nice visual reminder as to which language I'm working in, more than once I've found myself typ

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Cédric Beust ♔
I've found Java to be remarkably style impervious in the sense that I can read Java code using all kinds of different styles (different indentations, different brace placements, different namings for fields or variables, etc...) and not be bothered by it for more than a few seconds. I can't say th

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread B Smith-Mannschott
On Sun, Sep 19, 2010 at 18:03, Josh Berry wrote: > > > On Sun, Sep 19, 2010 at 1:43 AM, Reinier Zwitserloot > wrote: > >> I usually get funny looks and stares when I argue this, but in my >> opinion a good programming language _defines_ style rules. > > > > Meh. I think it is a waste of time to

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Josh Berry
On Sun, Sep 19, 2010 at 1:43 AM, Reinier Zwitserloot wrote: > I usually get funny looks and stares when I argue this, but in my > opinion a good programming language _defines_ style rules. Meh. I think it is a waste of time to worry about most of the style rules. Not to mention, style is such

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Kevin Wright
Not quite as seamlessly, but both Eclipse and IntelliJ now do a reasonable job of import management. On 19 September 2010 13:57, Graham Allan wrote: > You're right about that, it's not optimal, and given the choice I'd opt for > less crap. But, having said that, it's so far down the list of prio

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Graham Allan
You're right about that, it's not optimal, and given the choice I'd opt for less crap. But, having said that, it's so far down the list of priorities for switching languages that it's not even worth mentioning. Out of interest, do the Scala tools (such as the Eclipse plugin) handle imports as s

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-19 Thread Kevin Wright
Behind the scenes, this is a form of dataflow concurrency, delimited continuations being the secret sauce that makes it all work. (if you're familiar with continuations in Jetty 7, you'll have a broad idea of the technique) So, yes, threads are involved, but not in the way you imagine. On 19 Sept

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Reinier Zwitserloot
I usually get funny looks and stares when I argue this, but in my opinion a good programming language _defines_ style rules. The language spec should say what indent one should use. Don't like it? Tough. Suck it up. The benefits of the entire community using the same style outweigh any individual's

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Reinier Zwitserloot
Huh? What does the EDT have to do with property binding? On Sep 18, 11:21 pm, Kevin Wright wrote: > The best part of this approach is that streams can be composed and filtered, > so you could take window.height, and subtract splitbar.position to yield a > new stream > (operator overloading and cl

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Josh Berry
On Sat, Sep 18, 2010 at 5:58 PM, Miroslav Pokorny < miroslav.poko...@gmail.com> wrote: > On Sun, Sep 19, 2010 at 3:52 AM, Kevin Wright wrote: > >> I have to agree with this, counting preamble at the top of a file is >> totally relevant when comparing two implementations of an algorithm. >> >> > Wh

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
Read on, it was a typo... Was meant to be "irrelevant" On 18 September 2010 22:58, Miroslav Pokorny wrote: > On Sun, Sep 19, 2010 at 3:52 AM, Kevin Wright wrote: > >> I have to agree with this, counting preamble at the top of a file is >> totally relevant when comparing two implementations of an

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Miroslav Pokorny
On Sun, Sep 19, 2010 at 3:52 AM, Kevin Wright wrote: > I have to agree with this, counting preamble at the top of a file is > totally relevant when comparing two implementations of an algorithm. > > Why would anyone count or care about imports. Most IDEs fold or hide them and adding them is almost

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
As an representation of quantities that interact and change over time, the properties/observers/events model is far from being the only game in town. Anyone who's run into issues with the event dispatch thread can attest to weaknesses in the approach. There's a brilliant (if lengthy) presentation

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Ricky Clarkson
I agree that the metric isn't very good alone. However, I'm sure having a block of crap at the top of every file that you ignore (but tools read) isn't optimal. Scala goes a little way to making those less necessary to fold, but not all the way. On Sat, Sep 18, 2010 at 6:36 PM, Graham Allan wrot

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Reinier Zwitserloot
Indeed, Tor. Properties doesn't just mean "nice sugar so I can make x = 0 really mean setX(0)". It also means seamless support for propagating changes, including the ability to bind two properties together. I find JavaFX's solution particularly elegant, and when we get around to adding property su

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
*faceslap* Well corrected that man. 2010/9/18 Cédric Beust ♔ > > > On Sat, Sep 18, 2010 at 10:52 AM, Kevin Wright > wrote: > >> I have to agree with this, counting preamble at the top of a file is >> totally relevant when comparing two implementations of an algorithm. > > > You probably meant

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Cédric Beust ♔
On Sat, Sep 18, 2010 at 10:52 AM, Kevin Wright wrote: > I have to agree with this, counting preamble at the top of a file is > totally relevant when comparing two implementations of an algorithm. You probably meant "irrelevant" above? I agree with Tor that imports are all but invisible in JVM p

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
I have to agree with this, counting preamble at the top of a file is totally relevant when comparing two implementations of an algorithm. But there is a place for metrics, including NCSS and cyclomatic complexity, and there are times when *something* needs to be measured in comparing approaches. E

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Tor Norbye
Right. Just to expand a bit further on this: A field plus a getter and setter isn't -really- what we mean when we say we want -proper- property support in the language. Think of a GUI component instead, such as as a slider. I want -client- code to be able to do this: slider.min = 0; slid

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Graham Allan
If anyone was in any doubt that the LOC metric viewed in isolation is meaningless, I'd nominate this example as proof. Not that I'm taking either side in the Java/Scala debate, but the last time I had to manually add, or edit an import declaration, or read through the list of imports, was abou

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Cédric Beust ♔
On Sat, Sep 18, 2010 at 2:46 AM, Viktor Klang wrote: > I'm going to stop read the JavaPosse ML if the level of reasoning isn't > improved. I think just skipping all the discussions that compare Java to Scala should bring the signal back up. Language zealots have that effect on discussions :-(

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Cédric Beust ♔
On Sat, Sep 18, 2010 at 1:30 AM, Steel City Phantom wrote: > you can implement that today in java. its very easy to do so as well, > heres how > > public class haha { > public String name; > } > > there, now you can do your a.name = foo. not very hard. > Please reread my post more carefully.

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
Which brings us full circle, back to the claim that Scala is more programmer-oriented than Java! As a programmer, that list would motivate me to work for a company the uses Scala As an employer, it would motivate me to hire Scala developers On 18 September 2010 14:17, Reinier Zwitserloot wrote:

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Reinier Zwitserloot
You have "utmost confidence" in the numbers? See, saying things like that makes me discount your personal experience as irrelevant, because it must be very flawed. How can you have utmost confidence in a secret, one-sided, clearly non-scientific comparison done by people who are _extremely_ biased

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
Just to clarify, my point was that Lombok and Scala's case classes make the *implementation* of accessors and equality methods invisible, not the *presence* of these characteristics. I must also hold you to your own definition, as we're not even discussing the same thing if a moving target is invo

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Ricky Clarkson
1 : 3 is quite conservative. 1 : 5 is more realistic. You only need to look at your own examples of Java+Lombok to appreciate that case classes make a massive LOC difference. Type inference ends up removing a few imports per file, too, as you don't need to import a type if all you would use it f

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Reinier Zwitserloot
On Sep 18, 10:31 am, Kevin Wright wrote: > > Speaking personally, no, I get annoyed having to manually *read* them.  The > first form really is much easier. > Not to me. > > Of course it is, it removes the manual task of maintaining accessors, > constructors, and equality/hashcode methods. > Thu

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
It's difficult to find give hard evidence here, but not because it doesn't exist. 30% reduction seems to be the most quoted number when comparing idiomatic Scala to idiomatic Java, and this definitely matches my own experience. So where does the figure come from? Presentations mostly, by figures s

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Russel Winder
On Sat, 2010-09-18 at 11:46 +0200, Viktor Klang wrote: [ . . . ] > There's too much opinions and too little facts in this thread, which > makes it for some quite sad reading. > I'm going to stop read the JavaPosse ML if the level of reasoning > isn't improved. Here, here. Made up number do not t

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Viktor Klang
On Sat, Sep 18, 2010 at 10:25 AM, Reinier Zwitserloot wrote: > A 1 : 3 reduction in LOC? Don't make preposterous claims. > > 1 : 3 rates is what happens when you rewrite a project, from scratch, > now knowing exactly what you've learned. That's obviously not a fair > comparison. > > In my own expe

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Steel City Phantom
maybe im just becoming that old grumpy c++ coder in the corner cubicle of every company ive ever worked for that believes his language is the bomb and nothing else will do. kevin, i personally prefer the first immutable example you gave. maybe its because ive been doing it so long it just comes n

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
On 18 September 2010 10:01, Kevin Wright wrote: > > > This is the same approach that Scala takes, but with Scala all the > construction and copy logic is built in: > > case class Haha(firstName : String, lastName : String) { > val name = firstName + " " + lastName > } > > > I can actually go a b

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
Using the first form you'd have: a.firstName a.lastName a.getName() You've complicated matters by now having two styles for accessing properties, it also has the issue that someone could still access `name` instead of `getName()` The historic solution in Java is to make all fields private and ad

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Steel City Phantom
>The client has a requirement that we must be able to sort haha instances based on their surnames. >Now update that definition so that `a.name` is a concatenation of `a.firstName` and `a.lastName`, I want >to be able to continue using it as ` a.name` though. ok, you got that one. but whats the d

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
The client has a requirement that we must be able to sort haha instances based on their surnames. Now update that definition so that `a.name` is a concatenation of `a.firstName` and `a.lastName`, I want to be able to continue using it as ` a.name` though. On 18 September 2010 09:30, Steel City

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Steel City Phantom
>This observation is irrelevant unless you meant that choice of >language has absolutely no bearing on the likelyhood that your code > ends up readable, which I find hard to swallow. thats exactly what im saying. crappy scala code is just as hard to read as crappy java code as is crappy c# code,

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
On 18 September 2010 09:22, Reinier Zwitserloot wrote: > > I'm not sure why you find this so important. Why is "a.name = foo" so > much nicer than "a.setName(foo)"? Doesn't this entire line of arguing > boil down to: I get annoyed having to manually write "getX" and "setX" > methods? Speaking p

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Steel City Phantom
> The longer version: > > I want to be able to write "a.name = foo" and not have to worry about > implementing a getter and a setter until the day where I actually need one. > When I do, I just implement it and all clients automatically get redirected > through that getter/setter. you can implemen

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Reinier Zwitserloot
This observation is irrelevant unless you meant that choice of language has absolutely no bearing on the likelyhood that your code ends up readable, which I find hard to swallow. On Sep 18, 9:58 am, Steel City Phantom wrote: > >gs/write/read/p > >Reading code is far, far more important than writ

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Reinier Zwitserloot
A 1 : 3 reduction in LOC? Don't make preposterous claims. 1 : 3 rates is what happens when you rewrite a project, from scratch, now knowing exactly what you've learned. That's obviously not a fair comparison. In my own experience, Scala code tends to be about ~85% to ~90% of the lines that java s

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Reinier Zwitserloot
On Sep 18, 5:42 am, Cédric Beust ♔ wrote: > > I think Lombok is a non-starter for a lot of organizations just because it's > basically its own compiler. > No it isn't. It's probably a nonstarter if you use IDEs other than Eclipse and NetBeans, sure, but, "its own compiler"? How so? The language g

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Steel City Phantom
>Do you say this whenever someone struggles to read your code? Or do you believe >in making your own code readable, and respect a language that helps you to do so? absolutely i do. i have zero problem admitting i have put out some really crappy code in my day. but its not the languages fault th

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
On 18 September 2010 08:58, Steel City Phantom wrote: > >gs/write/read/p > > >Reading code is far, far more important than writing it. > > >Perhaps we should redefine the acronym WORA to be "write once, read > >anytime" and use it as a mantra for source code development? (Except > >that Sun, now

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Steel City Phantom
>gs/write/read/p >Reading code is far, far more important than writing it. >Perhaps we should redefine the acronym WORA to be "write once, read >anytime" and use it as a mantra for source code development? (Except >that Sun, now Oracle, probably has a copyright, trademark or patent on >WORA.) w

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
+100, I couldn't agree more On 18 September 2010 08:37, Russel Winder wrote: > On Fri, 2010-09-17 at 20:53 -0700, Cédric Beust ♔ wrote: > [ . . . ] > > > > The debate is a bit more complex than that. The question you should > > ask yourself is: "Is this syntactical sugar making it easier to wri

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Kevin Wright
Every summary I've seen for a project converted from Java to Scala reports, at minimum, a 1 : 3 reduction in LOC. If this isn't from making invisible / automating trivial detail (as per your definition of higher level) then where's all the code going? It can't *all* be in the semicolons! On 18

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-18 Thread Russel Winder
On Fri, 2010-09-17 at 20:53 -0700, Cédric Beust ♔ wrote: [ . . . ] > > The debate is a bit more complex than that. The question you should > ask yourself is: "Is this syntactical sugar making it easier to write > code in that language?". gs/write/read/p Reading code is far, far more important th

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Miroslav Pokorny
Firstly I said syntactical sugar as an argument against only properties. But really is scala so much better because of "xxx.property" as opposed to "xxx.property()". On the other hand closures are actually a bit more expressive with something new. Sure maybe underneath theres a lot of synthesized s

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Cédric Beust ♔
It's amazing how many times I read "it's just syntactical sugar" as if this should put an end to the argument. C is syntactical sugar around assembly language. Most of the time, languages are nothing but syntactical sugar over older languages. The debate is a bit more complex than that. The quest

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Cédric Beust ♔
On Fri, Sep 17, 2010 at 8:27 PM, Reinier Zwitserloot wrote: > Well, all I can say is: Check out Project Lombok :) > I think Lombok is a non-starter for a lot of organizations just because it's basically its own compiler. > Even properties is a vague term. Maybe, so let's be concrete: properti

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Miroslav Pokorny
Properties are in the end syntactical sugar, they dont add any real behaviour differences on top of a getter/setter. Why does it even matter, when with most modern IDEs, writing there are minimal keystrokes counts to type in a getter or setter. If one does the right and makes all their objects immu

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Reinier Zwitserloot
Well, all I can say is: Check out Project Lombok :) Even properties is a vague term. Which pick-n-mix from this selection of properties (heh) of what folks tend to mean when they say "properties" are you interested in: 1. Simple syntax, or even completely automated, generation of getX and setX(T)

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Reinier Zwitserloot
Ah, that was it; variable declarations are expressions but their value isn't what you might think. I knew there was some reason for not trying to use them as one. Your extends example doesn't make any sense to me. It's the same in java: interface X { int property(); } class Y implements X {

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Casper Bang
> now as far as developer friendly, all you have to do is look at spring.  i > quit using it years ago because its just to damn ridiculously complicated. >  i started realizing i could just code the problem by hand on my own faster > than i could figure out some poorly documented over featured, ove

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Kevin Wright
I can say with all honesty that I have never worked with cobol. I did a little pascal once, but quickly distanced myself from it at the first given opportunity. :) As a Java developer for over 12 years, it only took me about one year of *properly* using Scala for Java to feel like a foreign langu

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Cédric Beust ♔
I agree with everything you said except this particular point: On Fri, Sep 17, 2010 at 8:18 AM, Reinier Zwitserloot wrote: > In any java library that isn't completely worthless, the code is > "getField()". If you get annoyed at writing out the accessor, use > lombok. Claiming that as a benefit to

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Kevin Wright
precedence rules are catching you out here, you need the braces: def x = { val y = 5 } It also works just fine in compiled code On 17 September 2010 17:19, Ricky Clarkson wrote: > That's an interpreter illusion; a variable declaration is not actually a > value, otherwise you would be able to w

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Steel City Phantom
i am so bored with this subject that i wish people would just drop it. java is not developer friendly? are you serious? on this subject, its not java that isn't developer friendly, its the supporting libraries that suck. my god even with auto code generators hibernate blows as far as friendly.

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Ricky Clarkson
That's an interpreter illusion; a variable declaration is not actually a value, otherwise you would be able to write: def x = val y = 5 On Fri, Sep 17, 2010 at 4:50 PM, Kevin Wright wrote: > > > > > On 17 September 2010 16:18, Reinier Zwitserloot wrote: > >> Correction: In java, as in scala, all

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Kevin Wright
On 17 September 2010 16:18, Reinier Zwitserloot wrote: > Correction: In java, as in scala, all expressions "return" a value > (not really the right term, that. Expressions *have* a value is closer > to the mark). It's just that in scala more things are expressions. > Like "if": Expression in scal

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Reinier Zwitserloot
Correction: In java, as in scala, all expressions "return" a value (not really the right term, that. Expressions *have* a value is closer to the mark). It's just that in scala more things are expressions. Like "if": Expression in scala, statement in java. Not ALL things in scala are expressions. Va

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Kevin Wright
I'm recently taking the position that it's impossible to state which of two languages is "simpler", the term is just too heavily overloaded. Just pick your definition and it's trivial to show that assembly is simpler than LISP, or vice-versa, but you've still achieved nothing. If we use the term

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Kevin Wright
Java-the-platform posse? :) Given the recent Apple announcement, I guess this might even include iOS now, if you allow for cross-compilation... On 17 September 2010 06:52, Dominic Mitchell wrote: > On Fri, Sep 17, 2010 at 3:13 AM, Miroslav Pokorny < > miroslav.poko...@gmail.com> wrote: > >> It

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Ricky Clarkson
I agree that optional empty parameter lists are a bad idea, but for slightly different reasons. If, as in Python, Scala made foo always just refer to something, and foo() always call something, that would simplify some syntax, probably even making the standalone _ unnecessary (val referenceToPrint

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Reinier Zwitserloot
That just sounds like equating "simple" to "less verbose". For example, with optional () for args-less method calls, you get a number of things which one might deem "simpler": - Less characters to type and read - The ability to not have to care about whether the doClick member is a method or a

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-17 Thread Ricky Clarkson
Reinier, You want a definition of simple? Ok, some code is more simple than some other code if it contains fewer tokens that are outside the domain. E.g., Cobol's ADD 1 TO AGE GIVING AGE is not as simple as C's age++. Java's SwingUtilities.invokeLater(new Runnable() { public void run() { button

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-16 Thread Dominic Mitchell
On Fri, Sep 17, 2010 at 3:13 AM, Miroslav Pokorny < miroslav.poko...@gmail.com> wrote: > It seems to me that people focus too much on the language and forget about > the libraries and what not. > True. But is this the Java Posse, or the JDK Posse? :) -Dom -- You received this message because

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-16 Thread Miroslav Pokorny
It seems to me that people focus too much on the language and forget about the libraries and what not. Nearly every example is very concentrated on showing a terser way of passing a closure and so on. It also seems to me that people forget all the great libs that are easily usable from java and ign

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-16 Thread Reinier Zwitserloot
The plan by Oracle is to take the current planned features for JDK7 and cut these in half. Whatever's done or nearly done goes in JDK7, which can then be released much sooner (later than the planning, but those paying attention to it have known for a while now that it was a deadline nobody took ser

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-16 Thread Reinier Zwitserloot
On Sep 16, 6:22 am, Sean Griffin wrote: > 1. People say Scala is complex, but the actual examples that attempt > to prove this complexity are rare. No they aren't. > Features that support *writing* > DSLs are often used as those examples.  I've done a fair amount of > Scala development.  I hav

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-16 Thread Kevin Wright
+1 If you're going to adopt a higher-level language, then it does seem odd that you'd not embrace some of the best it has to offer. Just consider other features beyond the "cleaner Java" list: partial functions, deep function/object integration, xml literals, implicits, higher-kinded types, extrac

Re: [The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-15 Thread Ricky Clarkson
Reinier, A number of DSL-heavy Scala libraries provide a more conventional API too. I think this makes sense at least for those who are only touching on that domain, not using it a lot. I'd rather there was some way of importing the methods as implicit conversions or something than the library w

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-15 Thread Vince O'Sullivan
On Sep 16, 4:42 am, Reinier Zwitserloot wrote: > ...will be coming in the now > accelerated JDK7... What are you referring to by "accelerated"? All I seem to read about JDK7 is delays. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-15 Thread Sean Griffin
There's a fundamental difference between writing a library and consuming a library. My point was two-fold: 1. People say Scala is complex, but the actual examples that attempt to prove this complexity are rare. Features that support *writing* DSLs are often used as those examples. I've done a fa

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-15 Thread Reinier Zwitserloot
This argumentation of "If you don't like the DSL stuff don't use it" isn't convincing, at least not for me. You can't just throw out half of a language. I have to look at code written by others. I want to use libraries that say "for Scala" (or even: "For JVM"). I don't want to wait for a library t

[The Java Posse] Re: Blog Post: Java is deliberately not programmer-orientated

2010-09-15 Thread Sean Griffin
I ran across that blog post in my searches a few days ago, but I only read the first couple paragraphs at the time. I fully agree that the title is misleading with a subtle point that: 1. If used as a slant toward sarcasm is a point most will miss or 2. If stated as a true opinion, it's one I don'

  1   2   >