3 ms·
This is another flaw that PureScript fixes: No language pragmas.
by taylorfausak 10y ago
This is another flaw that PureScript fixes: No language pragmas.
- DanWaterworth 10y agoI don't think this is a flaw, in fact I think it neatly solves the problem of how to extend the language without committing to a design too eagerly and provides a platform for experimentation. There are pragmas that GHC implements that are now widely held to be problematic, but we wouldn't know this without an implementation, and using pragmas, we are realistically able to deprecate and remove these extensions.
- taylorfausak 10y agoVery few extensions have been deprecated: http://hackage.haskell.org/package/Cabal-1.24.0.0/docs/src/Language.Haskell.Extension.html#deprecatedExtensions http://hackage.haskell.org/package/Cabal-1.24.0.0/docs/src/L... Convenient, widely-used extensions that have been around for a long time aren't yet part of the language standard: https://prime.haskell.org/ticket/67 https://prime.haskell.org/ticket/67
- DanWaterworth 10y agoThat's not anywhere near a complete list of deprecated extensions and there are others that have been completely removed from the language [1]. It's unfortunate that ScopedTypeVariables hasn't been standardised, but there hasn't been a new standard since 2010, so it's not hugely surprising. https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory
- taylorfausak 10y agoThanks for that link! I haven't seen that wiki page before. Even so, only 4 extensions have been removed. I know others are de facto deprecated, like Rank2Types. I picked scoped type variables as an example because it's been in GHC since version 6.4. That was released in March 2005, so it had plenty of time to make it into the Haskell2010 language standard.
- DanWaterworth 10y agoI'd expect either Rank2Types or RankNTypes to be included in Haskell', you may be thinking of ImpredicativeTypes. Wow, I did not realize ScopedTypeVariables had been around for so long.
- taylorfausak 10y agoSorry, I meant that you pretty much always want RankNTypes instead of Rank2Types. My fault for not specifying.
- tome 10y agoDoes PureScript have some alternative approach to growing the language? Or is your comment suffixed with an implicit "for now"? :)
- taylorfausak 10y agoMy impression is that PureScript aims to not be configurable. For example, the compiler does not allow you to disable warnings. Other tools, like `psa`, can do that, but the base language is always the same. Specifically related to language extensions, there is this wiki page: https://github.com/purescript/purescript/wiki/Differences-from-Haskell/22c1c11a49fef2190fd8dc787f42123a0227d3ea#extensions https://github.com/purescript/purescript/wiki/Differences-fr... > The PureScript compiler does not support GHC-like language extensions.