let post = Post.findByID(1)
if post != nil {
return post.title
} else {
return nil
}
Or, as a cool C-like would put it: let post = Post.findByID(1)
return post?.title
Just saying! let post = Post.findByID(1)
if post != nil {
return post.title
} else {
return nil
}
Or, as a cool C-like would put it: let post = Post.findByID(1)
return post?.title
Just saying!Example: https://github.com/FeepingCreature/fcc/blob/master/tests/tes...
For my language, I'll do some proper advertising on it once I figure out version two; v1 is very much a testbed for playing around with language design.