Re: What’s your favorite programming language and why?

2019-12-19 Thread gyohng
Like: * Python: Code looks clean, gets stuff done quickly, easy to hire people * JavaScript: Performant (thanks to browser wars), runs everywhere, Babel+Typescript/Flow make it bearable Dislike: * C++: bloated, messed up, pays too much attention to useless stuff and yet cannot easily t

Re: Attaching finalizers to ref types (is there a better way?)

2019-10-13 Thread gyohng
Thanks. This looks good, I'll use it.

Re: Attaching finalizers to ref types (is there a better way?)

2019-10-13 Thread gyohng
Though this technically does it, it doesn't seem to be more elegant though, as it relies on having two types? (thus declaring members for one, then using another one for instantiation) Granted, finalisers most often are required for internal types that do not refer external OS structures, but s

Attaching finalizers to ref types (is there a better way?)

2019-10-12 Thread gyohng
Hello, I was looking into creating genuine ref types with finalisers. Is there a way to attach a finalizer to a type without using new(...) ? It seems that Nim is attaching a finaliser statically, but only does that if new() is mentioned somewhere in the program. This is what I found to be work