On Wed, Oct 27, 2021 at 10:06 PM Bart via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> You totally lost me here.
> IMHO there is no need for CreateExtende or similar new constructor.
>

Why not?


THis is what we currently have.
>
> TMask:
> constructor Create(const aMask: String; aCaseSensitive: Boolean;
> aOpcodesAllowed: TMaskOpCodes); virtual; overload;
>

I understood you will change constructor Create() to support the backwards
compatible syntax.
Now there is CreateLegacy() to make it easy and intuitive to use.
The same way a new CreateExtended() would make the new syntax easier to use.
Such a constructor is handy and intuitive especially when code completion
is used. A user sees alternative constructor names right away.
A sign of an intuitive well designed API is that you can select methods and
properties etc. with code completion by their names without referring much
to documentation. At least you then get an idea of what to search from the
documentation.


These __are__ the extended constructors for aal the fancy new/extended
> stuff.
> They are called by all the other constructors that only have the old
> parameters.
>
> So we have backwardscompatibility and extended capability just with
> all constructors named simply Create.
>

The idea was only to offer an intuitive API which gives a hint there is
something extended available, just like CreateLegacy() gave a hint there
is the good old legacy syntax available.

Juha
-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to