Hacker News new | ask | show | jobs
by ubertaco 1371 days ago
I dunno, this sort of thing seems intuitive to me:

    @POST
    @Path("/widgets/{widgetId}")
    public Widget getWidgetById(@PathParam("widgetId") Long widgetId) {
        // ...
    }
...where the sort of `method_missing` magic that Rails uses is _far_ less intuitive. Since when can I just call a method that doesn't exist, and expect the language to contrive what it thinks is a sensible definition on the fly?
1 comments

> Since when can I just call a method that doesn't exist, and expect the language to contrive what it thinks is a sensible definition on the fly?

Since Smalltalk-76 introduced[1] doesNotUnderstand: ?

I understand you didn’t really ask a question, but then I didn’t really give an answer (though the article’s discussion is fairly interesting). I guess my point is that there’s a distinction between a facility one finds unintuitive and a facility that’s newfangled and (therefore) outrageous. Even when the first category probably includes a good number of outright stupid ones.

[1] http://worrydream.com/refs/Ingalls%20-%20The%20Evolution%20o..., §5.11