Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> One potential solution would be to allow attaching a pragma to the `IsLine` and `IsDoc` classes to request that GHC aggressively specialize all definitions that use them.

I'd love to see this as an actual feature request. As the article says C++ and Rust both already do this as part of the language definition, and I can see this is just a straightforward change to make abstractions more "zero-cost" so to speak (not including compile time costs).



Not sure what those classes are but that is called superspecialization and JHC can do it with a compiler flag. I thought GHC also could, in at least some situations or if you use {#- inline -#}




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: