3 ms·
I dunno, this sort of thing seems intuitive to me: @POST @Path("/widgets/{widgetId}") public Widget getWidgetById(@PathParam("widgetId") Long widge
by ubertaco 4y 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?
- mananaysiempre 4y ago> 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%20of%20Smalltalk.pdf http://worrydream.com/refs/Ingalls%20-%20The%20Evolution%20o..., §5.11