hauleth,
@hauleth@fosstodon.org avatar

So I was nerdsniped by @PragTob to implement defconst for Elixir. It is a simple macro that looks like a function, but is evaluated at compile time to provide runtime constant.

https://github.com/hauleth/defconst

I have added defonce that will lazily evaluate code during first call as an icing on that cake.

Available on Hex as defconstant because of naming clash

https://hex.pm/packages/defconstant

#elixirstatus

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • JUstTest
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • megavids
  • lostlight
  • All magazines