On 29 July 2010 17:59, Mario Fusco <[email protected]> wrote:

> > Which implies Java is only providing a low level core and expecting the
> > "ecosystem" to build usable libraries based on it.
> >
> > Yet, when looking at many of the libraries I use regularly, I get the
> > opposite impression.  It seems more common to take away stuff.
>
> I was mainly speaking about the syntax of the language instead of its
> API. I agree it could be verbose in many cases but I hope everybody
> here agree that it is not complex at all. Never.
>
> As for the API I don't mind a lot because either I like the native
> ones or I can find a great replacement in what I called the "java
> ecosystem". And in this last case I think there isn't anything wrong.
> For example:
>
> > fileutils takes away almost all of the declared exceptions that I
> honestly
> > never need in most scenarios
>
> I totally agree. I know that somebody here has a different point of
> view, but I think that checked exceptions have been one of the biggest
> mistake in the original language design.


Totally, and I'm very grateful that many of the newer JVM languages are
ditching them



> > stringutils takes away the need to explicitly test for nulls every third
> > line
>
> This is a bit more questionable. If you need to check for null every
> third line of code, maybe there is something that needs to be reviewed
> in your code.


Worse still, it's something to be reviewed in the code that calls mine...
Spring is particularly guilty in this regard,
though the issue of being able to supply null arguments when a string is
expected is widespread



> > google collections takes away mutability when it's not actually needed
>
> I like google collections as well. And if you use them ...
> [start_of_advertising] maybe you could be interested in the lambdaj
> collections too ( http://code.google.com/p/lambdaj/wiki/LambdaCollections
> ) [end_of_advertising] :)


Or just migrate a little further, all the way to Scala :)


> > jodatime is a complete replacement for Date/Calendar.  It doesn't build
> on
> > it but instead takes away an API that is, frankly, a pain in the
> proverbial
>
> Yes. The original java Date/Calendar is probably the most awful java
> API I have ever seen.


Folks, listen up here!

If you still don't get what all the fuss is about with functional
programming, look no further than JodaTime
Date/Calendar is clearly an imperative design.  Mutable, ugly,
non-thread-safe, and widely despised

JodaTime, on the other hand, is very obviously designed in a functional
style.
Immutable objects, thread safe, calculations performed my mapping one type
to another
(i.e. You can't take a DateTime and change the day of month it represents,
instead you add a specified number of days to yield a new DateTime instance)
It's almost universally recognised as being clean, elegant, and a pleasure
to use

now imagine you could write entire programs like that...

You're likely imagining Scala, or maybe clojure, it really depends on how
much you like LISP :)

> It's very hard to defend a core API as being foundational when so many of
> > the 3rd party libraries are subtractive!
> > Though it does reinforce the idea that Java is perhaps too verbose and
> laden
> > with boilerplate.
> > Really, Java isn't so simple as it's made out to be, it just feels that
> way
> > because it's the devil you know...
>
> Again Java syntax is more than simple: it is trivial.  And if you can
> find a good replacement for an API you don't like where is the
> problem?
>

Does Scala count as a replacement for Java's APIs?  The 2.8 collections
library is a joy to use.



> Bye,
> Mario
> @twitter: @mariofusco
>
> --
> 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]<javaposse%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>


-- 
Kevin Wright

mail/google talk: [email protected]
wave: [email protected]
skype: kev.lee.wright
twitter: @thecoda

-- 
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.

Reply via email to