On Sun, Jun 9, 2019 at 10:52 PM Ben Grasset <operato...@gmail.com> wrote:

> On Sun, Jun 9, 2019 at 10:28 PM Dmitry Boyarintsev <
> skalogryz.li...@gmail.com> wrote:
>
>> So if you're fan of having ^Integer as a parameter type, then you pretty
>> much self-declaring to be a fan of (^Integer)(varname) as well.
>>
>
> This is.... completely ludicrous, to say the very least. "PSomething:
> ^TSomeType" declared in a method signature would behave *completely
> identically in every way *to how "var PSomething: ^TSomeType" *already
> behaves right now*, as far as using it inside the scope of the method
> body is concerned. It introduces *nothing* that does not already exist.
>
> The functionality I'm suggesting is *utterly trivial. *If you don't think
> so, it's likely you don't really quite get what I'm actually talking about.
>

You've been told before. Variable types are not the same as parameter types.

The "utterly trivial" is in fact a change to the language syntax.
Where currently, a parameter is:
  [modifier] parameter_name [ : [array of] {type_identifier, const}]]
You're proposing to do it as:
  [modifier] parameter_name [ : [array of] {[^]type_identifier, const}]]

treating "^" as a special rule to pass a reference to a type (because "^"
cannot be a part of identifier).

Adding a new exception never hurts anyone.

thanks,
Dmitry
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to