by Philippe Ribet <ribet@[EMAIL PROTECTED]
>
Apr 27, 2007 at 01:26 PM
Georg Bauhaus wrote:
> I guess this is about some reflection style factory
> programming? (Sometimes used to circumvent the need
> of specifying interfaces and classes before selecting
> one at run time, and having to compare strings and then:
>
> factory: JCLLDR
>
> if some_run_time_name.equals("EMPLOYEE") then
> Result ?= factory.make_employee(...)
> ...
> elseif ...
>
>
For such pattern, inspect on strings is valuable (performance and
simplicity):
inspect some_run_time_name
when "EMPLOYEE" then
Result ?= factory.make_employee(...)
when ...
end
Philippe Ribet