HNHacker News
TopNewBestAskShowJobs

cconroy

321 karma · joined May 4, 2011

just an ape from Earth
submissionscomments
cconroy··on Closures – A Simple Explanation (Using Ruby)
Good examples of closures / first order functions in java is through a visitor; example below is like the ones in A Little Java, A Few Patterns

new Top(new Anchovy(), new Top(new Tuna(), new Top(new Lettuce(), new Bot()))) .accept( new RemVisitor(new Anhovy() );

This removes those smelly Anchovies from your tuna sandwich -- and can be implemented with a closure or not. If accept() method returns a new Top w/o Anchovies and RemoveVisitor stores what to remove in its field then it is a closure.

This book is cool for lisp programmers to learn programming with recursive objects like composites and decorators.

cconroy··on Kay on the Meaning of "Object-Oriented Programming"
What does Kay mean by late-binding? ... not the dynamic binding of overriding methods in a subclass or virtual functions (C++)? The last paragraphs compared smalltalk with lisp in this respect.
cconroy··on Ask HN: Why Would I Write Web Apps In Anything Besides PHP?
It is interesting to think of a language specifically designed for web apps as different from a general-purpose language. This would of never occurred to me unless I only knew PHP.

I suspect if you tried to make a good web app language it would look like ruby or python, and really good web app language -- one very scalable -- look like haskell or scheme.

But to answer your question directly there are too many benefits to mention and they are language specific. I think transitioning to ruby and rails environment would be rewarding. I myself like Scala much better than ruby even though it's static typing is painful at times, and choose the rails-like framework Play! (http://scala.playframework.org). The front page shows you examples of the language expressiveness.

← PreviousPage 5 of 5