Bubble Foundry


Posts tagged with: types

Some experiments with natural numbers in Scala without type class wizardry
Scala doesn’t have dependent types but I wanted to see if I could wrassle up something that would approximate it for non-negative natural numbers. I’ve posted my results on GitHub. Read more – ‘Some experiments with natural numbers in Scala without type class wizardry’.
Types in Python
There are many great things going for Python but I find its type system to be rather wonky. Most people will direct you to use the type() function to determine types: >>> type([]) <type 'list'> >>> type([]) == type(list) False >>> type([]) == type(list()) True >>> type([]).__name__ == 'list' True However, in everyday use isinstance() […] Read more – ‘Types in Python’.
Javascript Type Gotchas
typeof null // -> object null instanceof null // -> TypeError: Can't use instanceof on a non-object. true instanceof Boolean // -> false true == new Boolean(true) // -> true true === new Boolean(true) // -> false Needless to say, this is very annoying if you’re trying to be be careful with your types and […] Read more – ‘Javascript Type Gotchas’.