Rui Carlos Posted June 2, 2014 at 07:43 PM Report Share #557964 Posted June 2, 2014 at 07:43 PM Apple's used Objective-C as its programming language of choice for right around twenty years now, but it's brought something new to its yearly developer conference: Swift, a new language of its own making. Apple' describes its new lingua franca as "Objective-C without the C," but it keeps (and improves on) the speed of its progenitors. In other words, apps built in Swift should run even smoother and faster than counterparts built with the tried and true Objective-C. According to Cupertino, Swift can be used to craft anything from social networking apps to 3D games. Fonte: http://www.engadget.com/2014/06/02/apple-swift-programming-language/ E aqui está mais uma linguagem de programação... Estive a ver por alto o manual que a Apple já disponibilizou, e pareceu-me que será uma linguagem bem mais fácil de aprender do Objective-C para o programador comum, na medida em que parece mais próxima do C. O manual pode ser encontrado aqui: https://itunes.apple.com/us/book/swift-programming-language/id881256329 Rui Carlos Gonçalves Link to comment Share on other sites More sharing options...
KTachyon Posted June 2, 2014 at 08:29 PM Report Share #557972 Posted June 2, 2014 at 08:29 PM (edited) Por acaso está mais longe do C. Pode ser utilizada com Objective-C e C, aparentemente. Ainda estou para ver como, visto que ainda estou a dar os primeiros toques com Swift. Para já vejo conceitos de Javascript e Python, mas ainda só estou nas primeiras 100 páginas do livro. Também se nota algum paradigma funcional. EDIT: Já agora, ainda não vi como é feita a compilação, mas é possível que se possa compilar em Linux e Windows, tal como o Objective-C (estou a assumir alguma coisa, visto que não sei ainda como é que é feita a integração com o LLVM). Edited June 2, 2014 at 08:31 PM by KTachyon “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
Rui Carlos Posted June 2, 2014 at 09:11 PM Author Report Share #557984 Posted June 2, 2014 at 09:11 PM Por acaso está mais longe do C. Pareceu-me mais próxima, mas também me foquei essencialmente na declaração e chamada de funções. Em todo o caso, continuo a achar que será bem mais fácil de aprender a sua sintaxe do que a do Objective C (pelo menos para mim foi 😄 ). Rui Carlos Gonçalves Link to comment Share on other sites More sharing options...
KTachyon Posted June 3, 2014 at 01:49 AM Report Share #558023 Posted June 3, 2014 at 01:49 AM Já dei a volta ao livro. Existem muitos conceitos de Objective-C na linguagem, mas disfarçados por outra sintaxe. Existem algumas coisas que estão verdadeiramente bem disfarçadas. Basicamente, nenhum tipo primitivo é um tipo primitivo. São tudo objectos. E, tal como no Objective-C, é possível estender a funcionalidade. Isto faz com que seja possível fazer coisas do género: extension Int { func repetitions(task: () -> ()) { for i in 0..self { task() } } } 3.repetitions({println("Hello!")}) Já agora, não há Garbage Collection. É tudo ARC, o que implica fazer a gestão de retain cycles, como sempre. “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
nelsonr Posted June 5, 2014 at 11:16 AM Report Share #558298 Posted June 5, 2014 at 11:16 AM Swift Programming Language Part 1 https://www.youtube.com/embed/c8BGQ3CfPBs?feature=oembed Swift Programming Language Part 2 (Functions) https://www.youtube.com/embed/ioR12RPBY0k?feature=oembed Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now