Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Perl 6 shocking revelations #1

by toma (Vicar)
on Apr 30, 2008 at 06:19 UTC ( [id://683633] : note . print w/replies, xml ) Need Help??

in reply to Perl 6 shocking revelations #1

The paper starts off like a bug report. That is, just change the boxed text at the end of the first sections to the titles, and you have a bug report. Lots of computer books read this way, but it's not my favorite style.

Further down things go off track, and it looks like a language comparison followed by some really bizarre code that may or may not be written in Perl 6. You almost had me suckered into it, until I skimmed forward and saw your disclaimer at the end.

For example, the code uses '' as a "symbol to indicate higher-order type conformance". You mention that this is not in a Synopses, and yet you don't explicitly say that this is a new proposal. This, and the other "Concepts discussed in this paper that are not on the Synopses" sound to me like this is not a really a paper about the Perl 6 language.

If the paper is a proposal, I would advocate marking it as such. If it is a paper about how to use the Perl 6 type system, I suggest documenting Perl 6 as it stands.

I like the 2D/3D point example. Mentioning quaternions is cool. Working quaternion midpoint code would be very cool. This would be spherical linear interpolation, and no, inheriting the 2D code won't cut it.

It should work perfectly the first time! - toma

Replies are listed 'Best First'.
Re^2: Perl 6 shocking revelations #1
by John M. Dlugosz (Monsignor) on Apr 30, 2008 at 13:19 UTC
    It is indeed marked, at the top: "This is a first look at a working design for the Perl 6 type system. It has not been accepted or endorsed by anyone, but is being shown for first impressions and feedback." The status will evolve through subsequent drafts. I wanted a wider discussion than just the perl6-language group since everything there is quiet agreement "you work on your area" and not much discussion. The ideas of higher-order polymorphism have not been explained to outsiders, just kind of assumed as part of the requirements.

    Maybe you should start with the first page, so you won't be so surprised when you get to the last? Or do I need to put cute icons next to important paragraphs like with mass-market computer books? Maybe I'll change the font or the color.

      I read the note at the top, and thought that 'it has not been accepted' referred to your paper, not the Perl 6 type system itself. I assumed that Perl 6 has some sort of type system, and it is approved at some level. So it didn't occur to me to read it as 'this paper is a proposal to change the Perl 6 type system.'

      I would move the list of new and unapproved features from the bottom to the top.

      I also suggest this pattern for the first sections. That is, move the conclusion to the top of the section, and explain what you are getting at. This drops the 'shocking revelation' motif, but would be an easier read. The text and examples are interesting enough. It doesn't need additional drama, in my opinion.

      I think it would be interesting to continue demonstrating inheritance with the Complex and Quaternion examples that you hint at. You could show how they do or do not give correct answers when inheritance is used. What makes this interesting is that one would probably work, and the other probably wouldn't, which I think would make your point well.

      It should work perfectly the first time! - toma
        I assumed that Perl 6 has some sort of type system, and it is approved at some level. So it didn't occur to me to read it as 'this paper is a proposal to change the Perl 6 type system.'
        It's worse than that. If you grep the synopses, you'll find,
        • Perl 6 has an optional type system that helps you write safer code that performs better. The compiler is free to infer what type information it can from the types you supply, but will not complain about missing type information unless you ask it to.
        • A variable's type is a constraint indicating what sorts of values the variable may contain. More precisely, it's a promise that the object or objects contained in the variable are capable of responding to the methods of the indicated "role".
        • Junction types
        It is vague at best, with some interesting clues of requirements. It has not yet been designed, just talked about in the newsgroup.

        Thanks for the other suggestions.

        Do you have any code for quartnion I could rewrite in Perl 6 as the example?