[Swift-devel] Changes to array closing semantics?
Tim Armstrong
tim.g.armstrong at gmail.com
Thu Nov 22 12:31:13 CST 2012
It'd be interesting to think about what Swift would look like if we did all
arrays construction with list comprehensions - could be an interesting
experiment.
Yes, I'm about to sign off and go eat massive amounts of food. Happy
turkey day everyone.
On Thu, Nov 22, 2012 at 11:49 AM, Ben Clifford <benc at hawaga.org.uk> wrote:
>
> On Thu, 22 Nov 2012, Tim Armstrong wrote:
>
> > I'm not sure if there a way to help users with potentially
> counter-intuitive behaviour, like a compiler
> > warning - aside from maybe documenting and explaining it better.
>
> My opinion (still) is that getting rid of piecewise assignment is the
> thing to do.
>
> The notation is initially appealing because you can say to users "yeah,
> its just like in fortran/c/java".
>
> But then you start loading on all this stuff about "oh mind you don't do
> this"; and on the implementation side you have to implement stuff to
> detect when these rules are broken; and its bandaid after bandaid, year
> after year.
>
> I think that syntax is always going to allow you to write something
> surprising - get rid of it!
>
> People pay me money to write haskell for them now, so I'm even more
> opinionated about it than before. In doing so I've also come to realise
> that using [] for reading is probably fine; its really the piecewise
> construction in this fashion that is the problem.
>
> ps aren't you all meant to be eating turkey?
>
> --
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20121122/2c417e8b/attachment.html>
More information about the Swift-devel
mailing list