On Wednesday, 8 March 2023 at 10:49:32 UTC, Markus wrote:
So, having no clue about D (just bought some books), I wanted to ask if nice looking code can become slow, in general. In the mentioned case it's just that I like the packaging of functions into some sort of scope (OOP) versus the flat C and Go stuff. I like OOP for this reason, but now I'm unsure whether I might stay out of creating classes at all.

Uh, hope you understand my vague question, sorry about that. I found D to be the right place because it's not missing any essential feature I know of.

Kind regards

If you write D like Java, it will be slow like Java - actually slower, because D's GC isn't as good.

If you remember to use structs for value types (no `class Vector3f`, `class Point` etc.), you should be fine.

Though as a general rule, don't worry about it too much. Even slow D is still fast.

Reply via email to