XRB’s Blog
Published in

XRB’s Blog

The Geekiest Hello World

Folks, I think that I have found (one of) the geekiest hello world out there. Implemented in Groovy using the dynamic interception of method calls. Here it goes:

class Hello {
Object invokeMethod(String name, Object arguments) {
System.out.println "hello $name!"
def hello = new Hello()
Which produce the following output:hello john!
hello you!
I suppose the same mechanism can be used with Ruby (and some other dynamic languages).




Random thoughts of a Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Patrick Jayet

Patrick Jayet

Polyglot (FR, DE, EN, ES), polyglot programmer (Java, Groovy, Ruby, Swift, Objective-C, Scala, Python, O’Caml) polyglot methodologist (Scrum, Kanban, Lean).

More from Medium

200 latest religion research paper topics to consider

Greta Thunberg and the Importance of a Trailblazing Role Model

The case for accountability online

The AI buzzword and our future savior