Why do Haskell numerical literals need to start and end with digits?

前端 未结 4 1051
误落风尘
误落风尘 2020-12-21 09:54

In The Haskell 98 Report it\'s said that

A floating literal must contain digits both before and after the decimal point; this ensures that a decimal p

4条回答
  •  一整个雨季
    2020-12-21 10:22

    I don't really seem much of a problem with allowing '9.' and '.7'. I think the current design is more of a reflection of the ideas of the original designers of Haskell.

提交回复
热议问题