What novel features of Swift should I show off in an intro-to-Swift talk?


(Robert S Mozayeni) #1

Hello!

I’m going to give a relatively quick talk about Swift at my university’s hackathon <http://hackumbc.org/> this weekend. It won’t so much be a “Learn to Write Swift” talk, but rather a shallow review of some of the cool aspects of Swift that might entice a programmer to learn Swift on their own.

I would appreciate suggestions for what kinds of features to talk about, as well as specific code scenarios to best display those features. I’m not limiting the features to those exclusive to Swift. For instance, many developers haven’t encountered Functional Programming, so I might throw some FP into the talk.

My current list of possible features to go over:

- Type inference
- ARC
- Optionals
- Protocol Oriented Programming
- Enums (associated values; the ability to implement things like Optional/Result/Either)
- Pattern matching
- Functional features
- Tuples/multiple return values
- REPL

I’m trying to figure out how much of the talk I want to do in a Playground vs the online IBM Swift Sandbox. The latter, attendees can use to play with Swift regardless of their OS, and without having to install anything. Then again, playgrounds are really impressive. I might do a short demonstration on what Playgrounds can do, then switch to the IBM Sandbox so people can follow along with the subsequent examples.

Thank you!

Staying Swifty,
Robert Mozayeni


(Jeff Kelley) #2

If you have time, I’d try to add guard to that list.

Jeff Kelley

SlaunchaMan@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org <http://jeffkelley.org/>

···

On Mar 2, 2016, at 3:29 PM, Robert S Mozayeni via swift-users <swift-users@swift.org> wrote:

Hello!

I’m going to give a relatively quick talk about Swift at my university’s hackathon <http://hackumbc.org/> this weekend. It won’t so much be a “Learn to Write Swift” talk, but rather a shallow review of some of the cool aspects of Swift that might entice a programmer to learn Swift on their own.

I would appreciate suggestions for what kinds of features to talk about, as well as specific code scenarios to best display those features. I’m not limiting the features to those exclusive to Swift. For instance, many developers haven’t encountered Functional Programming, so I might throw some FP into the talk.

My current list of possible features to go over:

- Type inference
- ARC
- Optionals
- Protocol Oriented Programming
- Enums (associated values; the ability to implement things like Optional/Result/Either)
- Pattern matching
- Functional features
- Tuples/multiple return values
- REPL

I’m trying to figure out how much of the talk I want to do in a Playground vs the online IBM Swift Sandbox. The latter, attendees can use to play with Swift regardless of their OS, and without having to install anything. Then again, playgrounds are really impressive. I might do a short demonstration on what Playgrounds can do, then switch to the IBM Sandbox so people can follow along with the subsequent examples.

Thank you!

Staying Swifty,
Robert Mozayeni

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Peter Vertes) #3

Coincidentally I was just reading an article titled: “Seven Swift 2 enhancements every iOS developer will love”. I’m sure you would be able to draw some inspiration from it. But as per Jeff I would include the guard keyword and another one of my favorites: defer. Good luck with the talk…

-Pete

P.S.: Here’s the link for the article: http://www.infoworld.com/article/3027100/mobile-development/seven-swift-2-enhancements-every-ios-developer-will-love.html

···

On Mar 2, 2016, at 3:29 PM, Robert S Mozayeni via swift-users <swift-users@swift.org> wrote:

Hello!

I’m going to give a relatively quick talk about Swift at my university’s hackathon <http://hackumbc.org/> this weekend. It won’t so much be a “Learn to Write Swift” talk, but rather a shallow review of some of the cool aspects of Swift that might entice a programmer to learn Swift on their own.

I would appreciate suggestions for what kinds of features to talk about, as well as specific code scenarios to best display those features. I’m not limiting the features to those exclusive to Swift. For instance, many developers haven’t encountered Functional Programming, so I might throw some FP into the talk.

My current list of possible features to go over:

- Type inference
- ARC
- Optionals
- Protocol Oriented Programming
- Enums (associated values; the ability to implement things like Optional/Result/Either)
- Pattern matching
- Functional features
- Tuples/multiple return values
- REPL

I’m trying to figure out how much of the talk I want to do in a Playground vs the online IBM Swift Sandbox. The latter, attendees can use to play with Swift regardless of their OS, and without having to install anything. Then again, playgrounds are really impressive. I might do a short demonstration on what Playgrounds can do, then switch to the IBM Sandbox so people can follow along with the subsequent examples.

Thank you!

Staying Swifty,
Robert Mozayeni

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Chris Lattner) #4

Hello!

I’m going to give a relatively quick talk about Swift at my university’s hackathon <http://hackumbc.org/> this weekend. It won’t so much be a “Learn to Write Swift” talk, but rather a shallow review of some of the cool aspects of Swift that might entice a programmer to learn Swift on their own.

I would appreciate suggestions for what kinds of features to talk about, as well as specific code scenarios to best display those features. I’m not limiting the features to those exclusive to Swift. For instance, many developers haven’t encountered Functional Programming, so I might throw some FP into the talk.

My current list of possible features to go over:

I’m not sure what your student’s background is, but “extensions” are pretty cool, and atypical for the C family of languages.

-Chris

···

On Mar 2, 2016, at 12:29 PM, Robert S Mozayeni via swift-users <swift-users@swift.org> wrote:

- Type inference
- ARC
- Optionals
- Protocol Oriented Programming
- Enums (associated values; the ability to implement things like Optional/Result/Either)
- Pattern matching
- Functional features
- Tuples/multiple return values
- REPL

I’m trying to figure out how much of the talk I want to do in a Playground vs the online IBM Swift Sandbox. The latter, attendees can use to play with Swift regardless of their OS, and without having to install anything. Then again, playgrounds are really impressive. I might do a short demonstration on what Playgrounds can do, then switch to the IBM Sandbox so people can follow along with the subsequent examples.

Thank you!

Staying Swifty,
Robert Mozayeni

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Austin Zheng) #5

One possible topic might be support for COW value types. If you have the
time you could even demonstrate implementing something like a first-class
mini-BigNum type, complete with isUniquelyReferenced() and operator
overloading.

Austin

···

On Wed, Mar 2, 2016 at 12:30 PM, Jeff Kelley via swift-users < swift-users@swift.org> wrote:

If you have time, I’d try to add guard to that list.

Jeff Kelley

SlaunchaMan@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> |
jeffkelley.org

On Mar 2, 2016, at 3:29 PM, Robert S Mozayeni via swift-users < > swift-users@swift.org> wrote:

Hello!

I’m going to give a relatively quick talk about Swift at my university’s
hackathon <http://hackumbc.org/> this weekend. It won’t so much be a
“Learn to Write Swift” talk, but rather a shallow review of some of the
cool aspects of Swift that might entice a programmer to learn Swift on
their own.

I would appreciate suggestions for what kinds of features to talk about,
as well as specific code scenarios to best display those features. I’m not
limiting the features to those exclusive to Swift. For instance, many
developers haven’t encountered Functional Programming, so I might throw
some FP into the talk.

My current list of possible features to go over:

- Type inference
- ARC
- Optionals
- Protocol Oriented Programming
- Enums (associated values; the ability to implement things like
Optional/Result/Either)
- Pattern matching
- Functional features
- Tuples/multiple return values
- REPL

I’m trying to figure out how much of the talk I want to do in a Playground
vs the online IBM Swift Sandbox. The latter, attendees can use to play with
Swift regardless of their OS, and without having to install anything. Then
again, playgrounds are really impressive. I might do a short demonstration
on what Playgrounds can do, then switch to the IBM Sandbox so people can
follow along with the subsequent examples.

Thank you!

Staying Swifty,
Robert Mozayeni

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Austin Zheng) #6

Especially the retroactive modeling aspect. I'm always happier than I have any right to be when I add a custom method to Int or String.

···

On Mar 2, 2016, at 8:32 PM, Chris Lattner via swift-users <swift-users@swift.org> wrote:

On Mar 2, 2016, at 12:29 PM, Robert S Mozayeni via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:

Hello!

I’m going to give a relatively quick talk about Swift at my university’s hackathon <http://hackumbc.org/> this weekend. It won’t so much be a “Learn to Write Swift” talk, but rather a shallow review of some of the cool aspects of Swift that might entice a programmer to learn Swift on their own.

I would appreciate suggestions for what kinds of features to talk about, as well as specific code scenarios to best display those features. I’m not limiting the features to those exclusive to Swift. For instance, many developers haven’t encountered Functional Programming, so I might throw some FP into the talk.

My current list of possible features to go over:

I’m not sure what your student’s background is, but “extensions” are pretty cool, and atypical for the C family of languages.

-Chris

- Type inference
- ARC
- Optionals
- Protocol Oriented Programming
- Enums (associated values; the ability to implement things like Optional/Result/Either)
- Pattern matching
- Functional features
- Tuples/multiple return values
- REPL

I’m trying to figure out how much of the talk I want to do in a Playground vs the online IBM Swift Sandbox. The latter, attendees can use to play with Swift regardless of their OS, and without having to install anything. Then again, playgrounds are really impressive. I might do a short demonstration on what Playgrounds can do, then switch to the IBM Sandbox so people can follow along with the subsequent examples.

Thank you!

Staying Swifty,
Robert Mozayeni

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users


(Matt Whiteside) #7

One of the things I miss most when I have to go back to C/C++ are the function argument labels at the call site.

Matt

···

On Mar 2, 2016, at 20:34, Austin Zheng via swift-users <swift-users@swift.org> wrote:

Especially the retroactive modeling aspect. I'm always happier than I have any right to be when I add a custom method to Int or String.

On Mar 2, 2016, at 8:32 PM, Chris Lattner via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:

On Mar 2, 2016, at 12:29 PM, Robert S Mozayeni via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:

Hello!

I’m going to give a relatively quick talk about Swift at my university’s hackathon <http://hackumbc.org/> this weekend. It won’t so much be a “Learn to Write Swift” talk, but rather a shallow review of some of the cool aspects of Swift that might entice a programmer to learn Swift on their own.

I would appreciate suggestions for what kinds of features to talk about, as well as specific code scenarios to best display those features. I’m not limiting the features to those exclusive to Swift. For instance, many developers haven’t encountered Functional Programming, so I might throw some FP into the talk.

My current list of possible features to go over:

I’m not sure what your student’s background is, but “extensions” are pretty cool, and atypical for the C family of languages.

-Chris

- Type inference
- ARC
- Optionals
- Protocol Oriented Programming
- Enums (associated values; the ability to implement things like Optional/Result/Either)
- Pattern matching
- Functional features
- Tuples/multiple return values
- REPL

I’m trying to figure out how much of the talk I want to do in a Playground vs the online IBM Swift Sandbox. The latter, attendees can use to play with Swift regardless of their OS, and without having to install anything. Then again, playgrounds are really impressive. I might do a short demonstration on what Playgrounds can do, then switch to the IBM Sandbox so people can follow along with the subsequent examples.

Thank you!

Staying Swifty,
Robert Mozayeni

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users