- From: samweinig <notifications@github.com>
- Date: Thu, 13 Apr 2017 12:46:45 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/issues/342/294003466@github.com>
The more I think about this, the more I worry this syntax for type annotations is going to lead to a lot of confusion for spec authors and implementors. The distinction between needing to write: void functionName([A] optional [B] long argument); vs. void functionName([A, B] long argument); just because the optional is there, and understanding that B will apply to the type, while A applies to the argument itself, is all a bit hard (this is also true for dictionary members, where 'required' can split things, and now, for return types, where 'static' would presumably split things, I may have left another one out). In the interest of covering the bases, where other syntaxes for type extended attributes considered? I can think of some mediocre ideas, that I admittedly have not fully considered in the face of the current grammar. Like, moving type extended attributes after the type. void functionName([A] long [B] argument); Or using a different delineator, perhaps repurposing the existing '<' & '>' if it is thought these would never be needed, or willing to have funky syntax for sequences / promises / records. void functionName([A] long<B\> argument); Or maybe braces? void functionName([A] long{B} argument); -- 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/342#issuecomment-294003466
Received on Thursday, 13 April 2017 19:47:17 UTC