Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Established science CANNOT BE QUESTIONED! (Score 1) 719

There is quite a bit of work being done to understand where all of the heat is going, but that has been discussed on here before.

That's one way to describe it, and certainly some scientists are inventing some complex hypotheses for that purpose.

A more simple scenario is that the earth isn't heating as much as expected (which mainly means that the feedbacks aren't as significant as some scientists hoped).

Comment Re:Why bother? (Score 1) 421

This is subjective. But it certainly goes beyond "remembering whether to capitalize the first character of your methods and variables", at least if we're talking about idiomatic C# vs Java.

That's true, sometimes I forget and accidentally type 'foreach' instead of 'for.'

Seriously though, the differences between Java and C# are miniscule compared to the differences in other languages. I spent the evening reading A Method of Programming. No one will ever look at that and confuse it with either language.

Comment Re:Microsoft is adapting to a new role (Score 1) 421

There is one good reason for avoiding checked exceptions though. Interfaces. In Java it is required that either 1. all exceptions that might ever be thrown by implementations of an interface be declared at the interface decleration or 2. all exceptions be bundled in RuntimeExceptions to short circuit the checked exception mechanism anyway (with the potential side effect of ruining stack traces).

Just throw Exception, unless you have some specific behavior change that can happen if a different exception is thrown, in which case you can throw Exception AND the SocketException (to use your example). Problem solved. RuntimeExceptions won't be bundled with that.

As far as catching exceptions go, imo unless you are going to do something specific to deal with an exception, then catching it is bad coding practice.

That depends on the error handling strategy of your program. It is especially important if you need to release resources. Either way, it's good to let the callers know what to expect.

Comment Re:Why bother? (Score 1) 421

Ruby, Python, Node, and PHP are distinct, with distinct styles. C# and Java are so similar that you can forget which one you are looking at sometimes. The biggest difference in those languages on a day-to-day basis is remembering whether to capitalize the first character of your methods and variables.

Slashdot Top Deals

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...