Wish to directly recognize the second brace { as object literal instead of a block-begin in double brace {{, to fully support "Keyword parameter" calling.
Currently, we have to write to avoid error:
Code: Select all
; AHK VSERION: 2.0.0
ob:=Cl()
func1()
{
(0),{base:ob,para1:3,para2:5}.f()
,{base:ob,para1:8,para2:9}.f()
}
func1()
class Cl{
prpt1:='0'
f(){
OutputDebug(this.prpt1 . this.para1 . this.para2)
}
}
Code: Select all
ob:=Cl()
func1()
{
{base:ob,para1:3,para2:5}.f()
,{base:ob,para1:8,para2:9}.f()
}
func1()
class Cl{
prpt1:='0'
f(){
OutputDebug(this.prpt1 . this.para1 . this.para2)
}
}
The usage in the above code is a little like keyword parameters in Python but far more powerful and flexible than keyword parameters as it's object. Object Oriented Programming can reduce the use of parameters but it even goes one step further to avoid parameters through OOP. You are truly much worth to achieve this enhancement and make OO in V2 more convenient. The Object Oriented Programming in V2 will get reinforced. It can be promoted for heavy use.
It is the last struggle.