<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 20, 2015 at 8:39 PM, Marcos Douglas <span dir="ltr"><<a href="mailto:md@delfire.net" target="_blank">md@delfire.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Mon, Jul 20, 2015 at 3:14 PM, Ralf Quint <<a href="mailto:freedos.la@gmail.com">freedos.la@gmail.com</a>> wrote:<br>
> [...] And quite frankly, what I have seen in object oriented code<br>
<span class="">> in recent years, I would rather take as a negative example of evolution, of<br>
> ways/things not to go/do...<br>
<br>
</span>That is true.<br>
Many programmers think that coding using object orientation only<br>
because they use an object-oriented language. They also think that<br>
using a more "cool" syntax makes your code more "professional".<br>
<br>
But some evolutions in a language could be a good thing, as Sven have said.<br>
<br></blockquote><div>Yes, so for example we currently have:</div><div><br></div><div>if not (X is TSomeClass) then ..</div><div>if not (5 in [1,2,3]) then ..</div><div><br></div><div>What is wrong with a language evolving to allow (in addition to the above)?:</div><div><br></div><div>if X is not TSomeClass then ..</div><div>if 5 not in [1,2,3] then ..</div><div><br></div><div>I'm not a compiler programmer, but it almost seems like laziness that the second case is not possible already? Maybe something is really hard with multi-word operators?</div><div><br></div><div>I like Pascal because it is more readable than Java, C#, Ruby, Haskell, etc. IMO the design philosophy should be: "if it is more readable it should be allowed".</div><div><br></div><div>Convenience should be added to this. Take for example type inference. If the compiler can easily figure out the type of a result, why should I have to declare a variable first with the appropriate type? Of course that means to allow var declarations inside the code block. Something I've always wanted to see in Pascal since my brief stint with C++ in the early 90s. The standard argument against is probably "that is unPascallish" or that it is moving away from strong typing. I disagree: if the compiler can figure things out before runtime you still have strong typing. So, for example, I would like to declare something like this anywhere inside a begin..end block:</div><div><br></div><div>var A := SomeClassInstance.SomeFunction;</div><div><br></div><div>It *looks* like JavaScript's (etc) weak typing but it is not. The compiler will catch any mischief that may follow with the variable A. We've eliminated a line of code that needs to be changed if the type of the function result changes. And to me it still looks very Pascallish..</div><div><br></div><div>I can carry on.. tuples can save lots of lines of code while at the same time making it more readable. How as that not "cool"? :-) (or functional for that matter!)</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>