Why (or why not) are existential types considered bad practice in functional programming?
What are some techniques I might use to consistently refactor code removing the reliance on existential types? Typically these are used to disqualify undesired constructions of your type as well as to allow consumption with a minimal of knowledge about the given type (or so is my understanding).
Is changing the type of a variable partway through a procedure in a dynamically typed language bad style?
In Python (and occasionally PHP) where variables do not have fixed types, I’ll frequently perform ‘type transformations’ on a variable part-way through my code’s logic. I’m not (necessarily) talking about simple casts, but about functions that change the type of a variable while leaving it basically representing the same value or data.
Would it make sense to use objects (instead of primitive types) for everything in C++?
During a recent project I’ve been working on, I’ve had to use a lot of functions that kind of look like this:
Formal definition of “concepts / type system” for parametric types – Where to start?
I would be interested in formally defining (and consequently demonstrating) a “type system” for, well, a type system. More specifically, I would like to explore the idea of what C++ calls concepts for my bachelor’s thesis. How would one go about defining such system (formally) ? It’s basically a meta-language for generic programming I suppose, but all the material I’ve found so far is basically bound to syntax of a specific programming language.
Formal definition of “concepts / type system” for parametric types – Where to start?
I would be interested in formally defining (and consequently demonstrating) a “type system” for, well, a type system. More specifically, I would like to explore the idea of what C++ calls concepts for my bachelor’s thesis. How would one go about defining such system (formally) ? It’s basically a meta-language for generic programming I suppose, but all the material I’ve found so far is basically bound to syntax of a specific programming language.
Can compilers check whether certain axioms hold for a user defined type?
Suppose the following type is defined (C++ syntax, can be conceptually applied to any statically typed language.)
Can compilers check whether certain axioms hold for a user defined type?
Suppose the following type is defined (C++ syntax, can be conceptually applied to any statically typed language.)
Can compilers check whether certain axioms hold for a user defined type?
Suppose the following type is defined (C++ syntax, can be conceptually applied to any statically typed language.)
Maths needed to understand theory behind Haskell’s type system?
Recently, I’ve become deeply interested in Haskell.
Maths needed to understand theory behind Haskell’s type system?
Recently, I’ve become deeply interested in Haskell.