Re: [heycam/webidl] Add an informative section on overloads vs. unions/optional (#307)

Oh, and I agree that there are overload uses that are probably somewhat silly.  Still in CanvasDrawPath, this:

    void stroke();
    void stroke(Path2D path);

can totally be written as `void stroke(optional Path2D path);` as long as you're cool with `stroke(undefined)` not throwing.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/307#issuecomment-279467501

Received on Monday, 13 February 2017 17:50:20 UTC