4 ms·
Haskell has gotten really good at more or less telling you what to do, it's a pretty common technique while developing to have the compiler run in the backgroun
by tetrep 10y ago
Haskell has gotten really good at more or less telling you what to do, it's a pretty common technique while developing to have the compiler run in the background whenever you change a file[0]. I've found it to be great when developing because you can just let the compiler tell you what type you need to put somewhere, and you can use something like Hoogle[1] to find how you can get that type.
[0]: usually people use this: http://www.mew.org/~kazu/proj/ghc-mod/en/ghc-modi.html http://www.mew.org/~kazu/proj/ghc-mod/en/ghc-modi.html
[1]: http://hoogle.haskell.org/ http://hoogle.haskell.org/
- cfallin 10y agoI've heard that technique described as "type tetris". I find myself trusting the type system to guide me a lot in Rust too -- it's very nice!
- runeks 10y agoAt the end of that spectrum (moving away from values and towards types) are languages like Coq, where you have only types, no values, and it's the compiler that derives the implementation/values from the types you define. Like Haskell Servant[1], where you define your API as a type, and then you can derive functions from that type to query the API, because the type itself contains all the information necessary. Pretty fascinating stuff. [1] http://haskell-servant.readthedocs.io/en/stable/tutorial/ApiType.html http://haskell-servant.readthedocs.io/en/stable/tutorial/Api...
- cmrx64 10y agoCoq unifies terms and types, so that all you have a terms, but there's still a very concrete meaning of value: that which can be reduced no further (normalization, a property that the calculus of inductive constructions has).
- runeks 10y agohlint is also pretty good at giving advice: http://imgur.com/a/9oXd8 http://imgur.com/a/9oXd8
- thomasahle 10y agoWhat editor is that?
- flukus 10y agoIntelliJ IDEA