sinstructor (n)
Computer code in any object-oriented program that defines new members of an object instance outside of its constructor, resulting in unnecessary confusion and forgotten variables.
class Vehicle: # a happy constructor def __init__(self, wheel_count): self.wheel_count = wheel_count # end __init__ # end Vehicle motorbike = Vehicle(wheel_count=2) # CAUTION: SINSTRUCTOR AHEAD motorbike.color = '#ff0000'
// a happy constructor (sort of) function Vehicle(wheel_count) { this.wheel_count = wheel_count } let motorbike = new Vehicle(2) // CAUTION: SINSTRUCTOR AHEAD motorbike.color = '#ff0000'
Is this a new term? I derived it by taking constructor (with) and switching it to sinstructor (without).
Top comments (0)