Ramblings on Imba

Sometimes coherent thoughts about the programming language Imba
    extend tag element
    	def setHandler name, params, ctx
    		let key = "on" + name
    		if params isa Array
    			if params[0] isa Object
    				let target = params[0]
    				let method = params[1]
    				let handler = do target[method].call(target)
    				self[key] = handler
    		elif params isa String
    			let handler = do
    				let target = ctx
    				for item in params.split(".")
    					if target[item] isa Function
    # Creating a to-do list app in Imba
    
    var items = [
    	{title: "Remember milk"}
    	{title: "Create screencast"}
    ]
    
    tag TodoItem < li
    	
    	def ontap e
    		data:completed = true
    		self
    		
    	def render