You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5990 Reporter:@alainfrisch Status: acknowledged (set by @damiendoligez on 2013-06-19T10:45:12Z) Resolution: open Priority: low Severity: feature Category: language features
Bug description
A common idiom when using objects and classes to define customizable iterators is the following:
let o = object
inherit generic_iterator as super
val path = []
method! foo x = {< path = x.name :: path >} # super_foo x
method super_foo = super # foo
end
i.e. one wants to call a method from a super class on a modified version of self (using functional object update). I'm wondering whether it would make sense to have a new language construction allowing such a call directly without going through a "trampoline" method like above; something like:
let o = object
inherit generic_iterator as super
val path = []
method! foo x = {< super with path = x.name :: path >} # foo x
end
The text was updated successfully, but these errors were encountered:
I don't know whether @alainfrisch is still wondering 7 years later, but if he is, I would suggest an RFC would be the next step if this is to be taken forward.
Original bug ID: 5990
Reporter: @alainfrisch
Status: acknowledged (set by @damiendoligez on 2013-06-19T10:45:12Z)
Resolution: open
Priority: low
Severity: feature
Category: language features
Bug description
A common idiom when using objects and classes to define customizable iterators is the following:
i.e. one wants to call a method from a super class on a modified version of self (using functional object update). I'm wondering whether it would make sense to have a new language construction allowing such a call directly without going through a "trampoline" method like above; something like:
The text was updated successfully, but these errors were encountered: