655 reputation
416
bio website
location Israel
age 26
visits member for 2 years, 9 months
seen 5 hours ago

1d
awarded  Nice Question
2d
awarded  Custodian
2d
reviewed Approve Is higher-rank parametric polymorphism useful?
2d
accepted When designing a data structure, should I implement very inefficient operations for convenience?
2d
accepted Is higher-rank parametric polymorphism useful?
2d
accepted What is the reason of using an interface versus a generically constrained type
Mar
26
accepted Implicit optimization versus explicit optimization
Mar
25
awarded  Good Question
Mar
25
comment When designing a data structure, should I implement very inefficient operations for convenience?
That's what I think too. No, there is absolutely no way for them to do it. I'm more interested about your answer to the other problem, and also about the ways I might use to avoid surprising the user.
Mar
25
asked When designing a data structure, should I implement very inefficient operations for convenience?
Mar
24
comment Is there a reason to have a bottom type in a programming language?
That doesn't mean it makes more sense to have a bottom type though, just that it makes sense to annotate functions on whether they return or not as part of the language. Actually, since functions can fail to return due to different reasons, it seems to be better to encode the reason in some way instead of using a catch-all term, kind of like the relatively recent concept of annotating functions based on their side effects.
Mar
24
comment Is there a reason to have a bottom type in a programming language?
@PeterLeFanuLumsdaine That is exactly what being a type constructor means. It just means it's a type with a kind different from *.
Mar
24
comment Is there a reason to have a bottom type in a programming language?
@TheodoreNorvell In languages with a bottom type, the bottom type has no values at all, and the same is true in type theory. Here is a list of sources: goo.gl/8CizpA. Of course languages can call anything they like a bottom type and have values of it, but the general consensus is that the type is uninhabited. The quality of being a subtype to all types isn't restricted to a bottom type though.
Mar
24
comment Is there a reason to have a bottom type in a programming language?
I agree on the subject of void and unit types. They don't consistently fall into any category. I like to think of void as a unit type from a philosophical point of view, because I like to think of functions as always having return types (it makes them more consistent), and thus functions that return must always return a value. In practice their implementation makes them different and inconsistent.
Mar
24
comment Is there a reason to have a bottom type in a programming language?
@BasileStarynkevitch, yes, I'm talking about a bottom type.
Mar
24
awarded  Notable Question
Mar
24
awarded  Nice Question
Mar
24
awarded  Popular Question
Mar
24
asked Is there a reason to have a bottom type in a programming language?
Mar
23
comment Why do you need higher kinds?
Also, I am quite certain type classes aren't directly related to higher-kinded types. Scala has higher-kinded types, but not type classes, and you could restrict type classes to types with the kind * without making them unusable. It's definitely true that type classes are very powerful when working with higher-kinded types, though.