[Haskell-beginners] question on typeclasses and applicatives

Alec Benzer alecbenzer at gmail.com
Thu Sep 2 20:11:22 EDT 2010

On Thu, Sep 2, 2010 at 6:49 PM, Daniel Fischer <daniel.is.fischer at web.de> wrote:
> On Friday 03 September 2010 00:17:22, Alec Benzer wrote:
>> I guess I'm still sort of confused or perturbed with why it's disabled
>> by default. If the compiler has the ability to do it and there are no
>> problems with doing it, why not just allow it without requiring you to
>> pass a flag to the compiler?
> It's disabled by default because the language standard laid down different
> rules. Generally, compiler writers tend to avoid enabling too much non-
> standard behaviour by default (though chapter 12 of the GHC user's guide
> lists a couple of deviations). However, often there's useful stuff that
> goes against the standard (well, it seemed to be a good idea at the time),
> so many compilers offer extensions to go beyond the standard.

I guess I would then be concerned with why they didn't allow it in the
standard (though I guess "well, it seemed to be a good idea at the
time" answers that).

I think I also would want to avoid doing things not in the language
standard on principle, since my instinct would tell me that if only a
particular compiler implements, I shouldn't use it because it'll
produce non-standard code. Though this sort of comes comes from C/C++
where there are different compilers on different platforms, but I
guess with haskell people pretty much use ghc everywhere?

More information about the Beginners mailing list