timotheecour / D_vs_nim

comparison of D vs nim
Apache License 2.0
62 stars 14 forks source link

My changes #20

Closed metagn closed 6 years ago

timotheecour commented 6 years ago

excellent changes, thanks! I'm curious, I seem to be able to use finally: and in place of defer: ; not sure what difference it would make

metagn commented 6 years ago

I couldn't find documentation about finally: without try:, and since the forum post linked was in 2013 i thought it was an outdated feature in contrast to defer: which is explained using try/finally in the manual

timotheecour commented 6 years ago

@hlaaftana I added 2 scope guard entries: scope(success) and scope(failure), do you know the nim equivalents?

EDIT: /cc @hlaaftana

I couldn't find documentation about finally: without try:

indeed, it gives: Warning: use 'defer'; standalone 'finally' is deprecated [Deprecated]

metagn commented 6 years ago

I don't know if there are any