<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 1, 2016 at 4:47 PM, Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</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 01.02.2016 20:33, Marcos Douglas wrote:<br>
> On Mon, Feb 1, 2016 at 5:06 PM, David Butler <<a href="mailto:djbutler@gmail.com">djbutler@gmail.com</a>> wrote:<br>
>> Speaking personally, the reason why I like Pascal syntax over C is exactly<br>
>> because it isn't short. I prefer the verbosity of Pascal rather than<br>
>> "cryptic" syntax of the C family. e.g. Pascal uses "function" not "func",<br>
>> "procedure" not "proc", "if then else" not "if ()", etc. Using short C-like<br>
>> syntax in Pascal goes against the long established style of Pascal.<br>
><br>
> +1<br>
><br>
> IMHO we can't use "IfThen" (or iif, IfThenElse, etc) as if it were a<br>
> real function, because it is not.<br>
><br>
> So, according to the "spirit of Pascal, what do you think about this?<br>
><br>
><br>
> V := inline If Condition then ThenExpr else ElseExpr;<br>
><br>
><br>
> Only "inline" keyword will be introduced.<br>
> But I don't know if will be more hard to implement this.<br>
<br>
If we would go the route of such an if-expression instead of an<br>
intrinsic then just leave away the "inline". That's absolutely not<br>
needed... (Note: implementation wouldn't be hard at all)</blockquote></div><div><br></div><div>When you format this code (e.g using Ctrl+D) the result is a very ugly syntax:</div><div><br></div><div><div>var</div><div> S: string;<br></div><div> B: Boolen = True;<br></div><div>begin</div><div> S :=</div><div> if B then</div><div> 'A'</div><div> else</div><div> 'B';</div><div>end;</div></div><div><br></div><div>And I think that it breaks compatibility with many Pascal syntax beautifier. IMHO Iif() (or something like this) sounds better.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Silvio Clécio</div></div></div>
</div></div>