> On Jan 13, 2015, at 9:25 AM, Domenic Denicola <d...@domenic.me> wrote:
> 
> From: Boris Zbarsky [mailto:bzbar...@mit.edu] 
> 
>> But it also means that user-space code that has to create an HTML element 
>> generically now has to go through document.createElement instead of being 
>> able to do |new HTMLElement("a")|, right?
> 
> That seems totally fine to me though. The idea of a string-based factory for 
> when you don't know what constructor you want to use has precedent all over 
> software design.

I agree. It's unusual for a constructor of a super class to automatically 
instantiate an arbitrary subclass based on its arguments. And we usually solve 
that convenience problem by introducing a factory class/function.

- R. Niwa

Reply via email to