Property features

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

Property features

21 Apr 2018, 00:08

Properties are a class related Syntax that provides a nice alternative for meta functions.
It also allows developers to refactor code more easily after it has been written.
Generally I always found them lacking in the sense that there are some issues that you will have when using them - which always made not using them and using methods instead easier for me.
With the latest updates of functionality provided by Lexikos - which implements many features people dreamed to use for quite a while ( Thank you lexikos ) I think it would be neccessary to mention the problems I see and how to fix them:
  • AutoHotkeys Objects are very dynamic - that is their strength. Using meta-functions and alike you can even create very complex custom inheritance schemes.
    For example you could even have a single object inheriting from multiple parent classes and make it similar to python.
    However that possibility is limited by properties - while you can emulate custom inheritance for meta-methods and normal keys perfectly you cannot emulate that behaviour for properties.
    You cannot tell a specific property that it should apply itself to a specific object with specific parameters.
    Also it is very difficult to built the code that emulates an AutoHotkey look-up following any of the specific meta-events.
    So I would like to ask for functionality that can trigger meta-events with a object it gets triggered for and a base that gets looked-up for a resulting action responding to the event:

    Code: Select all

    ObjEventGet( this, base )
    ObjEventSet( this, base, value )
    ObjEventCall( this, parameters* )

  • Properties that have been gotten with the use of ObjRawGet or the "for-loop" can't be identified as such - for debugging it might be useful to have an isProperty function which either returns true/false or some kind of additional information
  • There is no equivalent for __Call in properties
Recommends AHK Studio

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 7 guests