id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	lang	patch	platform
2178	Parrot lacks a boolean type	lucian		"And instead, boolean contexts fall back to expecting ints. This is not semantically correct, and leads to issues, especially when trying to expose a HLL's object system to the rest of parrot.


In my specific case, I implemented get_bool on Python objects, but Rosella's is_true and winxed's if coerce to int. Rosella and Winxed are doing the least wrong thing possible with that they've got.

Implementing get_integer to return 0 for false, 1 for true and the value for Python ints is simply incorrect. At least in python 0 is falsy, which makes it possible to have this workaround, in other languages it would be required to simply not implement get_bool or get_integer, to not break things.


The workaround in Winxed is the ternary operator (bla ? 1 : 0), which ends up calling bla.get_bool."	bug	new	normal		core	3.6.0	medium						
