On Wed, Jul 22, 2015 at 7:43 PM, Jonas Maebe <jonas.ma...@elis.ugent.be> wrote:
> On 22/07/15 19:24, Paul van Helden wrote: > > What is wrong with a language evolving to allow (in addition to the > above)?: > > > > if X is not TSomeClass then .. > > if 5 not in [1,2,3] then .. > > > > I'm not a compiler programmer, but it almost seems like laziness that > > the second case is not possible already? > > If the "not" operator is overloaded in TSomeClass, "not TSomeClass" can > be a valid expression in itself. "not in" could never be anything else, > but consistency is also very important. > > Additionally, keeping the compiler fast and maintainable (and able to > produce sensible error messages when syntax errors are found) conflicts > with arbitrary word orders. Calling that laziness is a bit blunt. > Well, apologies for using the word "laziness". I simply meant that to someone who doesn't understand the complexities of compiler programming it seems as (almost) such. I still believe (in my ignorance) that it shouldn't be all that hard to have multi word operators like in SQL, but what do I know. I have personally found little use for operator overloading and I would be happy to have such restricted to things other than "not" or "not is". > > IMO the design philosophy should be: "if it is more readable it > > should be allowed". > > Allowing multiple ways to say the same thing generally does not increase > readability, even if in isolation it can look fine. > > There are always multiple ways to say the same thing, and especially in programming, so I don't understand your point. Perhaps I can try to explain myself: The only reason I have stuck with Pascal for more than two decades is because of the way the written language *looks*. I find it pleasing compared to other languages. So please understand my arguments as coming from that perspective. I may be wrong technically or practically, but this is how I feel and I am sure there are others that feel the same.
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel