Silver/Swift - no try finally

This is quite strange to me, a language with no try finally and try catch. How is error handling done then?

You should direct your question to Apple, because only Swift has no exception handling. Silver has it as a language extension, see:

http://docs.elementscompiler.com/Silver/LanguageExtensions/ExceptionHandling/

While you’re there, ask them why they have no garbage collection either.

Thanks for the enlightenment. As usual nothing short of brilliance from RemObjects. As for directing question to Apple, I would say I am not on dope;-)

1 Like

@Sandeep this should help you answer the question as to why Swift has no Exception handling. Many modern languages are running away from this concept and using Type safety instead. Go from Google uses Type safety and avoids exception handling through try catch finally much like many other functional languages. Hope this helps!

Looks like Apple have come to their senses and restored exceptions in Swift 2.0.

Now if they only would bring back garbage collection…

They had probably read and learned here something about the features of a better swift language. :wink:

1 Like