I try to use the func keyword when defining methods, that way the compiler can guarantee that I have pure function with no side effects. func is just sugar for proc {.noSideEffect.}.
Hello! My name is Thomas and I'm a nerd. I like tech and gadgets and speculative fiction, and playing around with programming. It's not my day job, but I'm working on making it a side gig :)
I haven't gotten into the habit of doing that yet. I know I should and I think it's a great idea in general, but years of habits are hard to break and the func keyword is still a fairly recent addition to the language :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I try to use the
func
keyword when defining methods, that way the compiler can guarantee that I have pure function with no side effects.func
is just sugar forproc {.noSideEffect.}
.I haven't gotten into the habit of doing that yet. I know I should and I think it's a great idea in general, but years of habits are hard to break and the func keyword is still a fairly recent addition to the language :)