Can service stuff (like giveme's) be merged into normal classes? ================================================================ Super-simple solution with default values ----------------------------------------- Perhaps add a keyword for implicit parameters: param int x = 0 int y constructor int half_y code this.y = 2 * half_y end This allows (type, name, default-value) to be specified. That would be enough for many cases, but it feels a bit too limiting. More powerful syntaxes ---------------------- # Current syntax: # The good part is that it's not possible to "sneak in" some # capability somewhere else (but that can be prevented with normal # fields also). giveme int x = param "-x,--x-value" 0 end # This has two types, which can be redundant. int x from CliParam "-x,--x-value" 0 # This syntax is compact, but how intuitive is the distinction # between `:` and `=` ? # Also, `:` is used in many languages for indicating a type. int x : param "-x,--x-value" 0 # Better than the above? Somewhat intuitive also. int x from param "-x,--x-value" 0 HttpRequest req from default Replace constructors with giveme's? ----------------------------------- For example: # Definition of `SomeType` giveme File f end data long filepos end entry initialize code filepos = 0 end # Usage entry main code File f = new f.open "test.txt" SomeType st = new st.f = f st.init end # Usage, with implicit(!) creation on first use: entry main code File f f.open "test.txt" SomeType st st.f = f st.init end Or even replace both with typestates: # Definition of `SomeType` data File f when initialized long filepos end entry initialize transition initialized code filepos = 0 end # Usage entry main code SomeType st end Or, even more general: data after created File f after initialized long filepos end func initialize transition created to initialized code filepos = 0 end