News for hackers. Stuff that matters.
Re:Basic Type-Level Programming in Haskell by pjmlp on Friday April 28, 2017 @12:33PM (#14220831)
This was one of the reasons I felled in love with Turbo Pascal back in the day.

Algol derived languages, while not as powerful as ML ones regarding the type system offer quite a few possibilities to ensure safer code via type definitions, ranges, enumerations and ADTs (Abstract Data Types not to confuse with Algebraic data types).

C++ also allows for this, but requires a bit of boilerplate with templates, classes and operator overloading, which is way more work than a few type declarations in Haskell or Idris.

Re:Basic Type-Level Programming in Haskell by lodi on Friday April 28, 2017 @02:38PM (#14221928)
Yes, this was exactly my feeling reading through the Idris book. In the same way that a few lines of elegant Haskell can sometimes describe functionality that takes all kinds of technically-works-but-only-the-author-understands-it C++ template abuse, a few lines of straightforward Idris can sometimes replace all kinds of Haskell "type family abuse".

all kinds of s can be elegantly described in a few lines of Haskell,