February 23, 2013
On Saturday, 23 February 2013 at 16:44:59 UTC, Nick Sabalausky wrote:
(...)
> Anyone still using Java is just so last decade ;)

I've managed to dodge Java all these years, but I just started a college which teach Java. Even after using it only for a couple of thousand lines of code, I understand the hatred.. Feels like I'm in a straitjacket. Yes, it might be easy to learn, but damn it's verbose!
February 23, 2013
On 2/23/13 7:02 AM, deadalnix wrote:
> On Saturday, 23 February 2013 at 11:21:06 UTC, Russel Winder wrote:
>> Gradle makes no pretence as being either declarative or iterative, but
>> embraces both. As much of a specification is as declarative as possible,
>> but where imperative is needed it is available as Gradle specifications
>> are Groovy scripts with the Gradle internal DSL.
>>
>
> Do you have some link I can read about this ? This sounds like a very
> nice project !

I love Gradle!  Official site at http://www.gradle.org, with very good docs including getting started tutorials.

In practice I've found it to be concise and readable compared to Ant/Maven, and (almost ridiculously) easily extended when necessary. IMO if you're doing Java builds it's the hands-down winner.
February 23, 2013
On Sat, Feb 23, 2013 at 05:57:23PM +0100, simendsjo wrote:
> On Saturday, 23 February 2013 at 16:44:59 UTC, Nick Sabalausky
> wrote:
> (...)
> >Anyone still using Java is just so last decade ;)
> 
> I've managed to dodge Java all these years, but I just started a college which teach Java. Even after using it only for a couple of thousand lines of code, I understand the hatred.. Feels like I'm in a straitjacket. Yes, it might be easy to learn, but damn it's verbose!

That was my reaction too, when I first starting learning Java. And that is still my reaction today.

It's not a *bad* language per se. In fact, a lot of it is quite ideal. Or rather, idealistic, should I say. Unfortunately, that makes it a pain to map to messy real-world situations -- you end up with a truckload of wrappers and incrediblyLongAndVerboseIdentifiers just so the language can remain "pure". As for being a straitjacketed language, this IOCCC entry says it best:

	http://www.ioccc.org/2005/chia/chia.c

;-)


T

-- 
He who sacrifices functionality for ease of use, loses both and deserves neither. -- Slashdotter
February 23, 2013
On Sat, 2013-02-23 at 17:57 +0100, simendsjo wrote:
> On Saturday, 23 February 2013 at 16:44:59 UTC, Nick Sabalausky
> wrote:
> (...)
> > Anyone still using Java is just so last decade ;)

:-)

> I've managed to dodge Java all these years, but I just started a college which teach Java. Even after using it only for a couple of thousand lines of code, I understand the hatred.. Feels like I'm in a straitjacket. Yes, it might be easy to learn, but damn it's verbose!

Java 8 will be a revolution in Java much, much bigger than Java 5. It will either make Java a renewed and refreshed language, a joy to use, or it will be the end of the road. Javas 9, 10, 11, and 12 are planned but may be irrelevant.

In the mean time Groovy already has everything that Java is seeking to include.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


February 23, 2013
23-Feb-2013 21:17, H. S. Teoh пишет:
> On Sat, Feb 23, 2013 at 05:57:23PM +0100, simendsjo wrote:
>> On Saturday, 23 February 2013 at 16:44:59 UTC, Nick Sabalausky
>> wrote:
>> (...)
>>> Anyone still using Java is just so last decade ;)
>>
>> I've managed to dodge Java all these years, but I just started a
>> college which teach Java. Even after using it only for a couple of
>> thousand lines of code, I understand the hatred.. Feels like I'm in
>> a straitjacket. Yes, it might be easy to learn, but damn it's
>> verbose!
>
> That was my reaction too, when I first starting learning Java. And that
> is still my reaction today.
>

Aye. To my chagrin I have to work with Java quite a lot since late 2012.

I have to say that no amount of provided out of the box nice libraries and top-notch GC help alleviate the dire need for plain value-types and some kind of terseness (rows of static final int xyz = blah; to define a bunch of constants). With Java version being 5 or 6 (as is usually the case in production ATM) there is basically not a single construct to avoid horrible duplication of information on each line.

There are few shortcuts in Java 7, and even more stuff in Java 8 but all of it is coming horribly too late and doesn't fix the "big picture". Plus that has to propagate into the  mainstream.

> It's not a *bad* language per se. In fact, a lot of it is quite ideal.
> Or rather, idealistic, should I say. Unfortunately, that makes it a pain
> to map to messy real-world situations -- you end up with a truckload of
> wrappers and incrediblyLongAndVerboseIdentifiers just so the language
> can remain "pure". As for being a straitjacketed language, this IOCCC
> entry says it best:
>
> 	http://www.ioccc.org/2005/chia/chia.c


-- 
Dmitry Olshansky
February 23, 2013
On Saturday, 23 February 2013 at 16:57:24 UTC, simendsjo wrote:
> On Saturday, 23 February 2013 at 16:44:59 UTC, Nick Sabalausky wrote:
> (...)
>> Anyone still using Java is just so last decade ;)
>
> I've managed to dodge Java all these years, but I just started a college which teach Java. Even after using it only for a couple of thousand lines of code, I understand the hatred.. Feels like I'm in a straitjacket. Yes, it might be easy to learn, but damn it's verbose!

The whole trick with java, is that your IDE write most of the verbosity for you. This a whole new set of programming techniques to master.
February 23, 2013
23-Feb-2013 22:08, deadalnix пишет:
> On Saturday, 23 February 2013 at 16:57:24 UTC, simendsjo wrote:
>> On Saturday, 23 February 2013 at 16:44:59 UTC, Nick Sabalausky wrote:
>> (...)
>>> Anyone still using Java is just so last decade ;)
>>
>> I've managed to dodge Java all these years, but I just started a
>> college which teach Java. Even after using it only for a couple of
>> thousand lines of code, I understand the hatred.. Feels like I'm in a
>> straitjacket. Yes, it might be easy to learn, but damn it's verbose!
>
> The whole trick with java, is that your IDE write most of the verbosity
> for you. This a whole new set of programming techniques to master.

It doesn't help *reading* this verbosity.

-- 
Dmitry Olshansky
February 23, 2013
On Sat, 2013-02-23 at 21:44 +0400, Dmitry Olshansky wrote: […]
> I have to say that no amount of provided out of the box nice libraries and top-notch GC help alleviate the dire need for plain value-types and some kind of terseness (rows of static final int xyz = blah; to define a bunch of constants). With Java version being 5 or 6 (as is usually the case in production ATM) there is basically not a single construct to avoid horrible duplication of information on each line.

Maybe in Java 1.4, 8 years ago a plethora of public static final int constants, but these days seeing that implies a bad design, a complete lack of updating/refactoring of the software to modern Java features, or simple laziness. Java 5 introduced more than generics.

The G1 GC is a significant improvements to Java.

Java supports value types, albeit as objects on the heap. Give me an example of the problem so we can approach this with more than waffly statements.

Far too few programmers use the final keyword properly/effectively.

> There are few shortcuts in Java 7, and even more stuff in Java 8 but all of it is coming horribly too late and doesn't fix the "big picture". Plus that has to propagate into the  mainstream.

This is Java's serious problem. There are still people using Java 1.4.2 because they can't be bothered to update to Java 5 let alone 7.

[…]

I have many problems with Java, it is very verbose, but it needs to be criticized in a fair manner not in a "slag off" way. Clearly everyone on this list is going to prefer D over Java, but that is not permission to use inappropriate argumentation.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


February 23, 2013
On Sat, 2013-02-23 at 22:24 +0400, Dmitry Olshansky wrote: […]
> It doesn't help *reading* this verbosity.

Very, very true.

Sadly, D has some arcane bits that make it equally difficult to read D code. For example:

example.filter!isLongEnough().array()

Why ! in one place and . in the others, it is all just calling a method on something.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


February 23, 2013
On Sat, Feb 23, 2013 at 06:42:43PM +0000, Russel Winder wrote:
> On Sat, 2013-02-23 at 22:24 +0400, Dmitry Olshansky wrote: […]
> > It doesn't help *reading* this verbosity.
> 
> Very, very true.
> 
> Sadly, D has some arcane bits that make it equally difficult to read D code. For example:
> 
> example.filter!isLongEnough().array()
> 
> Why ! in one place and . in the others, it is all just calling a method on something.
[...]

One of the worst offenders in D is the is-expression. Not only are the meaning of the arguments mysterious and manifold, they also have non-obvious intents:

	void myGenericFunction(T,U,V)(T t, U u, V v)
		if (is(T) && is(typeof(T.a)) &&
			is(U : int) && is (V _ : W[X], W, X) &&
			is(typeof(T.expectedMember)) &&
			is(typeof(T.expectedMember())) &&
			is(typeof(T.expectedMember() : V))
			// ^ Completely opaque unless you stare at it
			// long enough.
		)
	{
		// Lisp fans would love the level of parentheses in this
		// next line:
		static if (isInputRange!(typeof(T.expectedMember())))
			dotDotDotMagic(t,u,v);
		else
			moreDotDotDotMagic(t,u,v);
	}


T

-- 
"Holy war is an oxymoron." -- Lazarus Long