[Swift-devel] file declaration inside foreach
Yong Zhao
yongzh at cs.uchicago.edu
Wed Apr 25 11:13:11 CDT 2007
without step 1..2 is fine, but the syntactic sugar does not give you type
info. So you need to figure out whether it is integer or float or sth
else.
with step info, what do you make it, 1..2..1? 1..2:1? so I was using the
matlab style. Maybe we can simplify it without the [] around.
So we have
int i[] = 1:2:1;
Yong.
On Wed, 25 Apr 2007, Mihael Hategan wrote:
>
>
> On Wed, 25 Apr 2007, Ben Clifford wrote:
>
> >
> >
> > On Tue, 24 Apr 2007, Mihael Hategan wrote:
> >
> > > I would though like to see for i in 1..2 working though.
> >
> > that should be relatively straight-forward syntactic sugar, but I don't
> > particularly like introducing it as a special case for foreach - it should
> > be a synonym everywhere for [1:2:1] if introduced. But bleugh, [1:2] is
> > only one character more than 1..2
>
> About that. Why are we using 1:2? It's not exactly intuitive.
>
> >
> > --
> >
> >
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>
More information about the Swift-devel
mailing list