Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    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!


That is how it's done in Swift. Are you saying there are C languages that do the same thing?


Well, mine does ( https://github.com/FeepingCreature/fcc ). I don't think it's very widespread, sadly.

Example: https://github.com/FeepingCreature/fcc/blob/master/tests/tes...


Nice! If you want it to be, you should add some information and examples. Or a simple website, even.


No I mean the syntax. :)

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: