Well, in my book, a thing without a representation isn't really a 'literal', which to me implies some degree of WYSIWYG :)<br><div class="gmail_quote"><div dir="ltr">On Sun, Jul 10, 2016 at 23:56 Erica Sadun <<a href="mailto:erica@ericasadun.com">erica@ericasadun.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On Jul 10, 2016, at 10:30 PM, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>> wrote:<br>
><br>
> Questions/comments--<br>
><br>
> What's your use case for these?<br>
><br>
> For proposed literals like `point`, I'm having trouble visualizing how that could be literally represented. Since the difference between one point and another is its coordinate, would we just see a point floating on the screen?<br>
><br>
> Something like `size` seems ill-suited for literal representation, as opposed to a shape (e.g. rectangle). Why is it a two-dimensional size anyway? Also, since literals have no type, is there any scenario in which a `size` literal of a certain width and height and a `point` literal with a certain x and y coordinate are meaningfully different?<br>
><br>
> Finally, several of these look like string literals with types. For instance, `unicode` seems to reflect a desire to refer to characters by their official names. Perhaps that could be proposed instead as a new escaping syntax for strings? Something like `let string = "\u{{DOG FACE}}"` might be pretty handy.<br>
<br>
It doesn't have to be "represented". It can be used as `#literal.point(x: 3.5, y: 2.0)` without any "pretty" picture.<br>
<br>
A literal offers a typeless universal value that can be interpreted by a conforming type as a representation of itself, so you can have:<br>
<br>
let x: CGPoint = #literal.point(x: 3.5, y: 2.0)<br>
let x: NSPoint = #literal.point(x: 3.5, y: 2.0)<br>
let x: float2 = #literal.point(x: 3.5, y: 2.0)<br>
<br>
-- E<br>
<br>
<br>
</blockquote></div>