[fpc-pascal] Syntax changes suggestions

Ryan Joseph ryan at thealchemistguild.com
Wed Jul 18 22:33:51 CEST 2018



> On Jul 18, 2018, at 1:46 PM, R0b0t1 <r030t1 at gmail.com> wrote:
> 
> You can make the function yourself. That you may have problems with
> typing are indicative that the language could use a more expressive
> type system, not that it was a good idea to create an intrinsic that
> could (potentially) ignore types.

I don’t remember what it did exactly. Like this maybe?

n = (x != 0) ? 10 : 20;

if x <> 0 then
  n := 10
else
  n := 20;

n := IfThen(x <> 0, 10, 20);

People are probably sick of doing that and wanted a more concise statement. I’ve even seen people do stuff like this because they’re fighting the language.

if x <> 0 then n := 10 else n := 20;

They probably wanted something like this:

n := if x <> 0 then 10 else 20;

Not too crazy in my opinion.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list