[Swift-user] Re: a third tutorial question

Mihael Hategan hategan at mcs.anl.gov
Thu Oct 14 14:46:10 CDT 2010


On Thu, 2010-10-14 at 12:42 -0500, Daniel S. Katz wrote:
> Similarly, I notice that the type declaration of messagefile as a marker type (I think) has two forms.
> 
> In first.swift, I see:
> 
> type messagefile;  
> 
> In parameter.swift (the version in the swift repository), I see:
> 
> type messagefile {} 
> 
> In the Swift user guide when this concept is brought up, the first style is used.  Also, parameter.swift in the tutorial html page has the first format, even though the on-line code has the second format.
> 
> Does this matter?

No.

>   Which is preferred and why?

while (true) ;
while (true) {}

i.e. it is the programmer's preference.

Mihael




More information about the Swift-user mailing list