3
I’m trying to compile a class people.swift
for Terminal
macosx
class People
{
let name:String = ""
let age:Int = 0
init(name:String, age:Int)
{
self.name = name
self.age = age
}
let anyPeople = People.init(name:"Jaum", age:23)
println("O \(anyPeople.name) tem \(anyPeople.age) anos.")
}
The command I’m giving is ./swift -emit-executable people.swift
But the following mistake is making
people.swift:13:5: error: expected declaration
println("O \(anyPeople.name) tem \(anyPeople.age) anos.")
^
I haven’t studied Swift yet (it’s here on my list!), but there may be code loose like this within the class?
– bfavaretto
IMHO [tag:Swift-language] seems terrible to me. Why not simply [tag:Swift]?
– helderdarocha
@helderdarocha I had created [tag:Swift] but after looking at Soen I saw that they use the language ending on that tag.
– iTSangar
I’m back to the original tag that was created...
– iTSangar
They use it because there were already questions about the other language 'Swift', which hardly anyone will use around here. There is also a wide discussion on the goal. The way it walks should be 'Swift' and 'Swift-language' as synonyms.
– helderdarocha
There’s a vote on the Soen goal. [tag:Swift] is winning: http://meta.stackoverflow.com/questions/259995/tag-name-poll-swift-apple-swift-swift-swift-language?cb=1
– helderdarocha