Not in & is not lazarus / 64-FPC development ---------------------------------------------------------------------- bytebites · 2025-09-13 18:59 Delphi 13 introduced "not in" and "is not" operators, which are one more pain for the parser. ---------------------------------------------------------------------- AlexTP · 2025-09-13 21:53 'not in' allows to remove brackets-level: not (a in v_set). It is good idea. Same for other one, maybe. ---------------------------------------------------------------------- Bart · 2025-09-13 23:52 What's next: not =?, not '. 'not <' is the same as '>='. In these cases 'not' is unneeeded. ---------------------------------------------------------------------- Bart · 2025-09-14 20:09 Quote from: AlexTP on September 14, 2025, 02:35:51 pm'not <' is the same as '>='. In these cases 'not' is unneeeded. I was aware of this. I was just trying to express my dismay about this abomination. Bart ---------------------------------------------------------------------- Leledumbo · 2025-09-14 21:17 Just a syntactic sugar, has no real value. However, I've been on sugar free diet for almost 2 years now, never feel better, so I have no support for the idea. Maybe if someone is interested in implementing, keep it under {$mode delphi}. ---------------------------------------------------------------------- Warfley · 2025-09-14 21:44 The "is not" is certainly a breaking change, as the following is completely valid pascal (even though if you ever write something like this you should probably question your life choices): Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type  TTest =record end; function Test: TTest; begin end; operator not(x:TTest): TClass;begin  Result:=TStrings;end; begin  if TStringList.Create is not Test then    WriteLn('Oopsie');end. The not-in on the other hand would be easily implementable, even though it would be quite an unecessary change. If it can be overloaded seperately from the in operator it could be used to implement some more efficient lookups for hashsets or something something bloom filter, but outside a few edge cases it wouldn't serve much purpose Edit: Just fired up D12 and this also compiles as expected: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type  TTest = record    class operator LogicalNot(x: TTest): TClass;  end; class operator TTest.LogicalNot(x: TTest): TClass;begin  Result:=TStrings;end; function Test: TTest; begin end; begin  if TStringList.Create is not Test then    WriteLn('Oopsie');end. ---------------------------------------------------------------------- LeP · 2025-09-15 09:59 Quote from: Warfley on September 14, 2025, 11:44:58 pmEdit: Just fired up D12 and this also compiles as expected: This doesn't work anymore in D13.