I am studying the so called "C# bible" (the book is C#7 in a nutshell) and I see that A LOT of things that there are...

I am studying the so called "C# bible" (the book is C#7 in a nutshell) and I see that A LOT of things that there are in delphi are also in C#. Like the File class has identical methods, same for the stream classes names (and the hierarchy), datetime libraries, stopwatch and so on. Well I find C# super powerful, so would it make sense if Delphi had:

- something like "auto" in C++ and "var" in C# (now java has "var" too). I find it very useful! It deduces automatically the type like "auto i = 5" or "var i = 5" gives the same result as "int i = 5"

- the += operator and the -= operator

- the possibility to have something like this: https://pastebin.com/WRi0hd3Q

I do not want to make Delphi a C# with a different syntax but I just think that these would be nice features!
Delphi has copied a lot from C# so it could copy these nice features as well! I do not know technical details but could these be implemented?
https://pastebin.com/WRi0hd3Q

Comments