public class foo{ public string bar = "moo."; public static int baz = 6; public static genFoo(string initValue) => foo { local foo rtn = new foo; rtn.bar = initValue; return(rtn); }}public static main()=>void{ local foo Foo = new foo; Foo = foo.genFoo("bleat."); print Foo.bar; // bleat. print foo.baz; // 6}
This turned out to be one of those things that looks simple and should be simple, but is just a pain to implement. Even though it's 'working' now, I'm marginally afraid to do anything more complex than the example code. I can practically hear the bugs crawling about in the hackery used to get it working.
That leaves 'this' methods and generics (and the inevitable debuggery from this mess) in this batch of cleanup. Far too much. I must continue the focus on making little hard examples work. One tiny step at a time.