News for hackers. Stuff that matters.

CarlSmotricz

Re:Functional Programming For The Rest of Us on Wednesday March 21, 2012 @09:55AM (#3734373)
If that's true, then Scala was simply specified less precisely than Java. As lemming said, Scala is a massive superset of Java's functionality.

Off the top of my head, I can rattle off a slew of functionality in Scala that's not in Java:

* Regexp literals

* partial/curried functions

* for comprehension

* argument defaults

* case classes (and switches thereon)

* tuples

* combinators

* XML interpolation

* Mixins

* Fine-grained visibility

Caveat: I'm no Scala expert. Some of this may be in the libraries and not the language proper.

Now... what Java functionality can you name that's not in Scala?

Exciting! Thanks for the link.
The parentheses are only one hurdle that Clojure makes you jump over, though. The other is Functional Programming.

I read an article here or on Proggit a few weeks ago by a (semi-professional?) game programmer who reviewed his own attempts at writing a real-time arcade-type game (PacMan?) in a functional language. Yes, he got the thing working and it even performed decently but he was irritated that if he really stuck with the paradigm of not having alterable state, some small changes to his app's functionality would entail changes in all kinds of places in the source.

Happily, Clojure gives you explicitly alterable state and a bucketload of mechanisms for working with those. But still, after months of practice I still struggle to get my head wrapped around FP. Typical business software programmers (as I picture them) might have similar troubles.

Re:Inlu.st - new dating startup on Wednesday February 09, 2011 @10:50AM (#2197802)
To get to the (pre-) application, you have to click on "InLust" at the top left. It admittedly took me a few moments to discover this, it wasn't very obvious.
I agree that this feel-good article about the USA's astounding generosity should be taken with a grain of salt: http://yashwata.info/2010/07/15/charity1/
Re:The Henry Ford of Heart Surgery on Friday November 26, 2010 @11:05AM (#1942618)
> No, you can't just look a lifespan.

I can't? Is it not the purpose of health care to keep people alive?

It's just a little joke. There's no unwritten law that says smart people aren't allowed to crack jokes in serious discourse.

In case you need an explanation, the joke is based on the commonly held notion that men have trouble understanding women. A few people might consider that sexist, but it reflects more poorly on men than on women, and as a man I don't find it offensive.

There is no God.

(revorad almost got it right but blew the "the one thing" requirement)

Clojure. It's mildly exotic in being Lisp-y and functional, but efficient, clean and solidly supported by the gigabytes of Java library code that's available for every purpose and can be smoothly interfaced.

Lua. A tiny yet powerful language whose only data structure is the associative table. Can be learned in half a day.

Re:Lego robot solves any Rubik's cube in less than 12 seconds on Thursday September 02, 2010 @11:10AM (#1656370)
than\
Re:Ask HN: Languages in the "spirit of Ruby"? on Tuesday May 18, 2010 @04:48AM (#1356968)
I second gtani's suggestion of clojure. It's a lisp that takes some of the pain out of lisp by using fewer parentheses where possible, and different kinds of parentheses (round, square and squiggly) so it's a little easier to eyeball where groupings start and end. Also, good support and interconversion of highly useful data types: vector, hashmap and set, among other things.

It's very FP but you can mutate state explicitly if you insist. It runs on the JVM so performance is very good (much faster than Ruby and Groovy) and Java interop is excellent, even better than with Scala. So you have access to the whole wealth of Java library code.

A big advantage is the very strong concurrency support. Laziness and FP give you some multi-core goodness with no effort, and the STM functionality gives you cleaner and more foolproof inter-activity synchronization.

In other words, recommended.

Re:NASA Accused of manipulating climate data on Friday January 15, 2010 @08:00AM (#1054778)
They're claiming that the averaged temps will be completely different from other, non-averaged temps. Given what averaging is all about, I find this hard to believe. Something doesn't seem right here.