arturo icon indicating copy to clipboard operation
arturo copied to clipboard

[Types] Add new `extend` function?

Open github-actions[bot] opened this issue 11 months ago • 0 comments

[Types] Add new extend function? This would replace Collections\extend (see relevant comment there) and could be used for extending an existing user type. In a few words: let's say we have defined a type, with its methods and everything. Or if that type has been defined in an external package. How could we add extra methods to it? By "extending" it ;-)

https://github.com/arturo-lang/arturo/blob/4bed4542b3306aaeb55fe7d11f5193b2f90c3fef/src/library/Types.nim#L41

proc defineLibrary*() =

    # TODO(Types) Add new `extend` function?
    #  This would replace Collections\extend (see relevant comment there)
    #  and could be used for extending an existing user type. 
    #  In a few words: let's say we have `define`d a type, with its methods
    #  and everything. Or if that type has been defined in an external package.
    #  How could we add extra methods to it? By "extending" it ;-)
    #  labels: library, enhancement, open discussion

    #----------------------------
    # Functions
    #----------------------------

9bea3b6d34cb39ddc2892d06b558f1347e9dcc98

github-actions[bot] avatar Mar 15 '24 16:03 github-actions[bot]