Regarding the proposed Binray Literals Deprecation

Don Allen donaldcallen at gmail.com
Wed Sep 21 19:22:00 UTC 2022


On Sunday, 18 September 2022 at 22:45:17 UTC, Timon Gehr wrote:
> On 18.09.22 14:47, Don Allen wrote:
>> ...
>> 
>> An extension offered by one compiler, off by default, is not 
>> the same as inclusion in the official language definition. The 
>> official Haskell language does not include binary literals.
>
> In practice, this is just not how Haskell works. It's really 
> common for Haskell code to rely on at least some GHC extensions 
> (including GHC itself).

You are missing my point. In any language -- C, Haskell, what 
have you -- some compilers will implement extensions, such as the 
nested functions in C introduced by gcc. The essential point is 
that just because some compiler implements an extension, there is 
no guarantee that extension will make it into the official 
language definition, therefore you use that extension at the risk 
of writing non-portable, non-future-proofed code. Haskell is no 
different in that respect from any other language. That is true 
can be found in a number of hits you turn up when you search for 
'haskell language extensions'.

Whether it is common or not for "Haskell code to rely on *at 
least some* GHC extensions" is not the issue. The issue is 
whether those extensions eventually become an official part of 
the language. Some do, some don't, or some do in revised form.

You can have the last word if you like; I'm done with this 
thread, which has long since crossed the ad nauseam threshold.


More information about the Digitalmars-d mailing list