3 ms·
Please do write about other rabbit holes too.. ..If not a long form article, a short compilation of the holes (and links if you can find the time to get them) w
by nandhinianand 6y ago
Please do write about other rabbit holes too.. ..If not a long form article, a short compilation of the holes (and links if you can find the time to get them) would be very useful.. I've been interested and flirting with haskell for a while, but become too time-poor the last 4-5 years to do anything even hobby level.
- alpaca128 6y agoI don't know Haskell, but I'm pretty certain that something I recently discovered also applies there: Dependent Types In short, it's a way to restrict the data types to such a degree that the type checker can do compile-time checks of array sizes and other interesting things, as those aspects are directly expressed as distinct types depending on each other. The principle requires a pretty powerful type system and is cumbersome to use, but I found it fascinating regardless.
- exdsq 6y agoCheck out type-driven development (there are books on using Idris for this) -- it blew my mind! You do what you're talking about to encode business logic that's checked at compile time.
- vram22 6y agoI had checked out F# for a while, some time earlier. IIRC, it has some features like that, for encoding business logic in code/types. Probably some other languages do too. I had mainly used Scott Wlaschin's site F# for Fun and Profit, and MS sites, for F#. Edit: Also had looked at OCaml, via Real World OCaml, and also much earlier, via INRIA / O'Reilly sites / books / software. F# may be based on OCaml. Both resources are free to read online.
- Jeff_Brown 6y agoErgonomic dependent types are probably coming to Haskell in a couple years. It already has them in a way but it's currently harder than it will be in the future. https://gitlab.haskell.org/ghc/ghc/-/wikis/dependent-haskell https://gitlab.haskell.org/ghc/ghc/-/wikis/dependent-haskell
- nandhinianand 6y agoHmm.. interesting.. i was and still am excited about the type inheritance. Alas I code with python for a living.. :-(
- nandhinianand 6y agoOoops i meant to say type inference.. Ah well fat fingers.. or is misconnected synapses between Broca's area and the motor cortex?? shrug whatever.