Mailing List Archive

1 2  View All
Re: Data checks semantics [ In reply to ]
Hi there,

On Sun, 28 May 2023, Diab Jerius wrote:
> On 5/28/23 10:40, G.W. Haywood via perl5-porters wrote:

>> .. "does anybody care?" ... It's my view that, to a first and very
>> likely a second approximation, nobody does.
>
> Type::Tiny has 477 reverse dependencies on CPAN. I would say that to a first
> approximation a lot of people care.

Ah, some useful numbers at last.

Can you drill down a bit? Say, how many distinct authors?

--

73,
Ged.
Re: Data checks semantics [ In reply to ]
On Tue, May 30, 2023 at 10:14?PM G.W. Haywood via perl5-porters <
perl5-porters@perl.org> wrote:


> > Type::Tiny has 477 reverse dependencies on CPAN. I would say that to a
> first
> > approximation a lot of people care.
>
> Ah, some useful numbers at last.
>
> Can you drill down a bit? Say, how many distinct authors?


Who cares?

I get that not everyone will use data checks, but does it matter how many
are using Type::Tiny? What's the cut off? Twenty-three or more distinct
authors and it's a worthwhile project? Our clients use Type::Tiny (even
before we get there!) frequently because it saves them a lot of grief. If
you have followed along various conversations about previous
conversations about data checks (often referred to as "types," and that's
been a source of contention), people support the idea, though there are
arguments over interface and semantics. There is a minority, like you, who
don't want them. That's fine. Don't use them.

Some might remember the objections to signatures. People routinely said
"let Perl be Perl" or "programmers just need to learn to read code" when it
came to all the ways you could screw up reading @_, but signatures provided
such a huge benefit for such a tiny syntax that they won. That's why
Type::Tiny is so popular. That's why using isa => ... in Moo/se is so
popular. That's why Typescript is one of the fastest growing programming
languages[1], despite it being built on Javascript, which astonishingly
like Perl when you dig into it.

We won't get a Typescript. I'm not proposing that. I'm proposing something
which a ton of Perl devs have wanted for decades.

Best,
Ovid

1.
https://visualstudiomagazine.com/articles/2023/02/02/jetbrains-survey.aspx
Re: Data checks semantics [ In reply to ]
> We won't get a Typescript. I'm not proposing that. I'm proposing something
> which a ton of Perl devs have wanted for decades.
>

I wouldn't mind few Typescript features "inspired by Typescript",
especially their type utils:

to have utility (predefined and user) to declare check as transformation of
another check, eg:
- Partial [ Check - (most likely Dict) ] - every part of parameter check
will become Optional [ orig check + Undef ]

- Primitive [ Check ] - every part of parameter check will become its
primitive

- Callback [ Check, Argument Checks ... ] - transform parameter check into
check describing function
sub :returns(Check) (Argument Checks ...)

as well as capability to express:
- Check A is Check B (Dict) where few keys are modified (eg: change user =>
Str to user => User_Instance)
- Check A is Check B (Dict) with few keys added, eg: check A = B + Dict [
request_id => Str ]

(though it may be little bit more complex for milestone 1)


> Best,
> Ovid
>
> 1.
> https://visualstudiomagazine.com/articles/2023/02/02/jetbrains-survey.aspx
>
>
>
>
Re: Data checks semantics [ In reply to ]
On Sat, May 27, 2023 at 9:43?PM Elvin Aslanov <rwp.primary@gmail.com> wrote:

> Of course, we want data checks.
> Ovid, maybe you can create another GitHub repository similar to Corinna
> (Ovid/Cor) and document the syntax?
> I think the syntax came before the implementation for feature 'class' as
> well.
>

Elvin, thanks. I'd be thinking about that for a while. I have a private
repo at https://github.com/Ovid/data-checks. I've just updated the README
extensively. If anyone would like to participate, please send me your
github name.

For now, I'd like to keep it a private repo to help manage expectations.
Later, I'm happy to make the repository public. (Yes, I know that everyone
can read P5P) ????

Because it's a private repo, it doesn't have a Wiki. Please feel free to
post in the discussions.

Best,
Ovid
Re: Data checks semantics [ In reply to ]
Yes, I'd like to participate.

My GitHub handle: rwp0

I think it would be better to create a public GH organization, and involve
interested people there (on various such repositories).

Thanks

On Wed, May 31, 2023 at 11:22?AM Ovid <curtis.poe@gmail.com> wrote:

> On Sat, May 27, 2023 at 9:43?PM Elvin Aslanov <rwp.primary@gmail.com>
> wrote:
>
>> Of course, we want data checks.
>> Ovid, maybe you can create another GitHub repository similar to Corinna
>> (Ovid/Cor) and document the syntax?
>> I think the syntax came before the implementation for feature 'class' as
>> well.
>>
>
> Elvin, thanks. I'd be thinking about that for a while. I have a private
> repo at https://github.com/Ovid/data-checks. I've just updated the README
> extensively. If anyone would like to participate, please send me your
> github name.
>
> For now, I'd like to keep it a private repo to help manage expectations.
> Later, I'm happy to make the repository public. (Yes, I know that everyone
> can read P5P) ????
>
> Because it's a private repo, it doesn't have a Wiki. Please feel free to
> post in the discussions.
>
> Best,
> Ovid
>
Re: Data checks semantics [ In reply to ]
On Wed, May 31, 2023 at 12:16?PM Elvin Aslanov <rwp.primary@gmail.com>
wrote:

> Yes, I'd like to participate.
>
> My GitHub handle: rwp0
>
> I think it would be better to create a public GH organization, and involve
> interested people there (on various such repositories).
>

I've added you, Elvin.

I want to open this repository to the public, but not yet. I'd rather the
key parties involved have a chance to discuss this and understand the
trade-offs before the inevitable political mess it will become.

Best,
Ovid

1 2  View All