Questions tagged [design-patterns]
The design-patterns tag has no summary.
3 questions
2
votes
1
answer
334
views
Handling two different ways to write `else if`?
In Universities, students spend a lot of time correcting syntax errors.
For purposes of a thought experiment, suppose that a new language was developed that supported multiple syntaxi.
For a simple ...
4
votes
4
answers
759
views
Architecture for overriding "trait" implementations many times in different contexts?
I just asked this question about Rust: Is it possible to create a default trait implementation in Rust, and then override that trait implementation somewhere else? My problem is, in my custom lang, I ...
5
votes
2
answers
204
views
Is it necessary to provide singleton as language keywords?
Background
The singleton pattern is a widely used design pattern in the OOP language.
I'm considering adding a built-in singleton declaration to my language.
In Scala and Kotlin, we can use ...