Make bound funcs consistent with func objects

Propose new features and changes
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Make bound funcs consistent with func objects

01 Jul 2017, 06:21

just me wrote:After you changed the topic we are talking about "Make bound funcs consistent with func objects". I read this as "Let the BoundFunc object support the methods/properties of the current Func object". But now it seems that you want to change the implementation of Func objects to include the functions of BoundFunc objects, do you?
I don'tknow how you reached either conclusion. They are both wrong. What I wanted was consistency. How we reach consistency in the end is completely open. Also I haven't said anything about changing the func object itself so far. Consistency is when 2 things can be treated exactly alike for their respective contexts.
I still don't get what you want to achieve with the changes and why you think it wouldn't require changes in existing scripts.
Adding an additional syntax towards an object never breaks current code. It is safe to let isFunc return 1 if bound funcs are consistent with func objects. These covers all changes I want to make.
As to why I want to do this change. a) consistency simplifies the language and makes it easier to learn and easier to use.

It still seems like I haven't been able to convey what I actually want bound funcs to do:

Code: Select all

BFO := Func("Function").bind( "Bound Param" )
;BFO should behave just like func( "BFO" ) in every aspect except for .Name

BFO(Text){
	Title := "Bound Param"
	MsgBox, 0, , Title: %Title% - Text: %Text%
}

Function(Title, Text) {
	MsgBox, 0, , Title: %Title% - Text: %Text%
}
Recommends AHK Studio

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 18 guests