Questions about object construction

2020-07-31 Thread TheSpydog
I've been looking into what it would take to implement constructor autocomplete. It seems that in order to summon suggestions for constructors we'd need to somehow activate a "sug" suggestion from a "con" trigger (pressing "(" or ","), and then filter the results for just the fields. Does this s

Questions about object construction

2020-07-31 Thread TheSpydog
Thanks for the advice! I'm coming from a primarily C# background so I recognize the importance of information hiding. Good to know how it's done in Nim! My primary interest for object construction in Nim is for external C APIs that use lots of structs (such as Vulkan and sokol_gfx). I really lik

Questions about object construction

2020-07-22 Thread TheSpydog
Thanks for providing that example code! I was wondering how to create an immutable object without construction syntax, and that's a very simple solution.

Questions about object construction

2020-07-22 Thread TheSpydog
Ah, good to know, thanks! Yes, suggesting the field names after '(' and ',' is exactly what I had in mind.

Questions about object construction

2020-07-21 Thread TheSpydog
Hi all! I filed [an issue](https://github.com/nim-lang/Nim/issues/13554) on Github a few months ago about the lack of nimsuggest autocompletion for object constructors. I was really surprised that I couldn't find any similar issues or forum posts on this topic. To me it seems like the lack of au