[fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

Ben Grasset operator97 at gmail.com
Mon Jun 10 04:51:50 CEST 2019


On Sun, Jun 9, 2019 at 10:28 PM Dmitry Boyarintsev <
skalogryz.lists at gmail.com> wrote:

> Distantly? you're proposing to introduce a reference-to-type declaration
> within a parameter. Without giving it any name.
> Fine. But that would requires a type-casting within the code to the same
> type as has been declared within the parameter.
> Otherwise you're creating some type, that cannot be casted-to. Which is
> odd.
>
> 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.

On Sun, Jun 9, 2019 at 10:28 PM Dmitry Boyarintsev <
skalogryz.lists at gmail.com> wrote:

> t's kinda what language designers HAVE to do.
> It's nice just to throw out the "next-big-thing-cool-idea" out there and
> make yourself look smart.
> But you actually HAVE to think everything through.
> If you don't then your idea might not be so cool after all.
>

I have been programming in Pascal for decades and decades. This has *absolutely
nothing *to do with the stupid "oh look another person trying to add a
fancy new feature" thing that people insist on whining about any time
anyone suggests *anything at all* (despite the fact that the phenomenon
itself only nominally exists in any capacity.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190609/b7f0bf56/attachment.html>


More information about the fpc-devel mailing list