DEV Community

Alec Larson
Alec Larson

Posted on • Updated on

Nim Notes

Stuff to remember when developing in Nim.

This post will be updated over time.

 

  • Using raise with Defect cannot be caught when --panics:on is used

 

  • You can cast noSideEffect pragma:
  {.cast(noSideEffect).}:
    # code goes here
Enter fullscreen mode Exit fullscreen mode

 

  • Almost always prefer {.inline.} over template, as it lets the C compiler decide when it's best to inline a proc

Top comments (1)

Collapse
 
dmisener profile image
Dennis Misener

Appreciate the notes…. Keep em coming :-)