What will be the impacts if Haskell uses “!” instead of keyword “not” as the operator of logical not? [on hold]

  • A+
Category:Languages

I'm a new Haskell learner. I do not know much about the syntax mechanism behind Haskell.

In some imperative programming languages, such as C/Java, the exclamation point "!" is used as logic not.

Meanwhile, Haskell use keyword "not" as "logical not". However, Haskell use "&&" and "||" as logical operators.

Obviously, Haskell avoids using "!" to express concepts of "not", e.g. "not equal" is "/=" but not "!=".

In another point of view, I guess, if the keyword "module" is changed to "package", nothing serious will happen except altering all "module" with "package" in all existing codes.

I wonder, if one changes the keyword "not" to "!" in Haskell, what will happen?

Complements:

  1. As pointed by @chi, i made a mistake. "not" is not a keyword, it is a library function.
  2. As pointed by @user202729, i did not tell my question clearly. I am wondering what will happen when "not" is replaced by "!". That is to say, when the founders design Haskell and they use "!" to work as logical not, MAYBE "!" cannot be used as array indexing. Then the founders try another way to index an element in array (with []? i don't know). Then something like chain-reacting goes on. Does this change Haskell much?

 


You can even try this if you are satisfied with a postfix operator, but this requires the use of the PostfixOperators language extension

{-# LANGUAGE PostfixOperators #-}  (!) = not  main = print (True !) -- False 

I find this to be quite reasonable, not.

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: