DEV Community

Alec Larson
Alec Larson

Posted on • Edited on

2 1

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 :-)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay