Promise: Constructor revisionism
Only 3 posts into the definition of the language and already I'm changing previously published specs. Well, that's the way it goes.
I'm currently writing the article about language level IoC which I eluded to previously, but the syntax effects I had not fully considered yet. The key concept, tho, is that there is no construction, there is only instance resolution, which
.new being a call on the Type not Class hinted at. But that does mean that what you get does not necessarily represent a new instance.
And beyond naming implications, the implications of what arguments passed into the resolution call mean is also ambiguous. The could be initialization values or they could be arguments to determine which instance of that Type to fetch (like in a Repository pattern). And if that's the case, the overloading this process becomes tricky as well, since it should access the
super class, which means it only makes sense in the construction paradigm.
Basically lots of syntactic implications I'm working through right now. The only thing that is certain is that
.new will not make it through that review process.
More about Promise
This is a post in an ongoing series of posts about designing a language. It may stay theoretical, it may become a prototype in implementation or it might become a full language. You can get a list of all posts about Promise, via the Promise category link at the top.