
#14812: Dot-Notation for Flipped Function Application -------------------------------------+------------------------------------- Reporter: tepan | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by svenpanne): Just to reiterate a few points: The fact that `Foo.bar` is a single entity is a ''lexical'' issue, as you can see in the Haskell report (https://www.haskell.org/onlinereport/haskell2010/haskellch10.html#x17-177000..., look for ''modid''). Of course whitespace is relevant on that level. The initial proposal (https://mail.haskell.org/pipermail/libraries/2001-February/000258.html) already mentions that this syntax effectively steals some syntax with previously different semantics, but the consensus was that this is not nice, but OK: Hierarchical names are a big win and chaining constructors with dots but without whitespace was considered sufficiently rare. Your proposal would steal yet another syntax and give it completely different semantics for a very low benefit: `foo.bar` is currently semantically equivalent to `foo . bar`, and you propose to change that to `bar $ foo`. I bet this will break lots of code, and one should have a very, very good reason to do that. Emulating some surface syntax from a different programming paradigm is not really enough for that. Furthermore, you would introduce syntactic ambiguity for `Foo.bar`, because one can't distinguish module names and constructor names on the lexical level. This needs to be resolved to the meaning "hierarchical name", but obscure, non-regular things like this are warts in any language design, so plesase let's not do this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14812#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler