> As I recall it, macros where left out of the initial implementation. So you > have to wait for another Christmas Present :-)
The version of macros that was available in Rakudo when the 6.c spec was cut was released with the compiler; It's marked experimental and is therefore subject to change, but they are in there. On Thu, Sep 8, 2016 at 1:25 AM, Kaare Rasmussen <ka...@jasonic.dk> wrote: > Hi Joseph > > Welcome, and I hope you'll stick around. > > Now, I haven't had the time to dig into Perl 6 myself, only to poke at it > from time to time. But, while waiting for people who know something to > respond, I'll ask you to be a little concise in certain areas. >> >> * I can find no concise easy-to-understand explanation for how to define >> what other languages would call constructors. Instead there is a mess of >> bless, magic inside Mu, new, BUILD, BUILDALL... It's not clear when you >> should prefer to override BUILD or new or both. I also assume there are some >> benefits to teasing apart object construction this way, but right now I >> don't know what they are. This is also an area where I think there are older >> blog posts confusing the situation because they discuss semantics from an >> older version of Perl6. > > > I wonder what you miss from https://docs.perl6.org/language/classtut. To me, > it explains the hows and whys very thoroughly. Now, I now people have been > hard at work improving the documentation, so if you can point to what's > missing or unclear, I'm sure it will help a lot. >> >> >> * It would be nice for people coming from Python for a tutorial that >> explained the basic module importing, the scope of things imported, and how >> name collisions are avoided when importing from two modules that have the >> same sub. The official documentation is trying to distinguish a bunch of >> subtle and presumably useful for advanced users distinctions that are >> completely lost on a newcomer. I just want to know what is the equivalent of >> import, from foo import bar, and import foo as bar. > > > It sounds like "arh, do it yourself", but I'd like to say that, coming from > a Python background, you'd be the perfect person to do just that. At least > take notes and post them, so it can go into a tutorial of some kind. > >> * Coming from almost any other language the => operator is dark magic >> because of its implicit quoting of the left hand side. Likewise the implicit >> quoting done by <foo>. Some explanation of why this is done, and how you >> could write a sub or operator that does the same thing would probably go a >> long way towards making it less confusing. > > > The pair operator is explained here > https://docs.perl6.org/language/operators#index-entry-pair_constructor and > word quoting here https://docs.perl6.org/language/quoting#Word_quoting:_qw - > perhaps they're more Perl 5-like, but both are very handy features. Perhaps > you can expand a little as to what you'd like explained. Coming from Perl 5, > I'm certainly damaged in that respect. > >> * I haven't been able to find any guidance on when I should be using a >> role and when I should be using a class. The former seem to give you better >> error messages when you forget to define a method from a base role... So >> never use classes? I suspect it's more complicated than that. > > > I guess this is something everybody can have an opinion about. There are a > number of reasons to go one or the other way. Isn't it a topic for all > modern languages? > >> * Types feel like second-class citizens. Without knowing the details of >> the implementation it feels like the errors that Perl can statically detect >> is chosen at random. It's generally useful > > > I think your wording is misleading. The things that Perl 6 can detect when > compiling shouldn't be a matter of choice, but of what's possible. Perhaps > you can give some examples, I'm sure there are perfectly good reasons for > the way things are. If not, it may be a bug, and the compiler can be > improved. > >> argument constructors, are all pretty sweet as well. Macros look pretty >> promising although again I had trouble finding good tutorials. > > > As I recall it, macros where left out of the initial implementation. So you > have to wait for another Christmas Present :-) > > /kaare > -- Will "Coke" Coleda