AW: AW: P6FC
[snip] PS: But before reinventing a wheel, i would like to suggest to adopt the .NET/Java object hierarchy. uhm. either I am completely wrong or you are totally out of track. I really don't understand what you're talking about :-) Urgs. Hopefully i didn't trapped into a dunghill ? But let me dig deeper into it. Here an example class Hashtable from .NET Framework Class Library: System.Collections Namespace Classes Class Description HashtableRepresents a collection of key-and-value pairs that are organized based on the hash code of the key. [C#] public class Hashtable : IDictionary, ICollection, IEnumerable, ISerializable, IDeserializationCallback, ICloneable anyway, on http://dada.perl.it/p6fc.html you find now a pretty GraphViz image accompanied by the XML data source (I'm Let me grab your suggestion for the example Hash: Hash isa Type Type isa Object What i intended is to go and copy the .NET/Java object/interface/inheritance hierarchy (s.a.). So Hash isa IDictionary, ICollection, IEnumerable, ISerializable, IDeserializationCallback, ICloneable etc.. digging up the references right now) and the script I used to produce the diagram. any (possibly meaningful) feedback will be very appreciated. cheers, Aldo Murat
AW: P6FC
[snip] effort on properties), so I started to put down a tentative class hierarchy of the Perl6 language (I call it P6FC for Perl6 Foundation Classes, but the name may (should? :-) very well change). A very good idea, but i am afraid that this ML isnt the right audience. PS: But before reinventing a wheel, i would like to suggest to adopt the .NET/Java object hierarchy. Murat
AW: Language Discussion Summaries
to provide a feeling for the weight of opinion, e.g., most people felt this way, some people felt differently, etc. One should trace back who was of what opinion. So my suggestion would be Discussion: Foo feature Want it:Person A, Person B, Person C, Person D Reject it: Person E, Person F, Person G, Person H Neutral:Person I So posters should also may try to give a clean statement on there final posts how they feal about the feature. Like I think that, but this is Vote: reject this feature. Murat
AW: Language Discussion Summaries
Thats a great idea. Murat
AW: Sabbatical from the list
It is likely that I will start reading again after A6 and E6 Sorry for uninformedness, but what is A6 and E6 ? Any versioning of p6 dev releases ? Murat
AW: AW: Sabbatical from the list
Apocalypse 6 and Exgenesis 6. Please do a search on perl.com for 1-5. s/en// Exegesis \Ex`e*gesis\, n.; pl. Exegeses. [NL., fr.Gr. ?,fr. ? to explain, interpret; ? out + ? to guide, lead, akin, to ? to lead. See Agent.] 1. Exposition; explanation; especially, a critical explanation of a text or portion of Scripture. Luke Ahhh.. .then it is good news that damian is off for some time to work on A6 to E6. Silly me, thought it would be another language which he is now working on ;) like P6, but A6 and E6 ! Thx thx, Murat
AW: Multimethod/multisub thought...
Strange. I think parameters to subroutines are in list context unless stated otherwise. -Scott I agree. Do we miss something ? Murat
AW: my int( 1..31 ) $var ?
It's also far slower. Constructing a 31-element list, junctionizing it, This might well be done at compile-time. And/or, lazily. So the cost of these two steps is likely to be negligible. then testing against each element vs. 2 numeric comparisons. Yes. That's a significant cost in this case. My example was bad. I intended something with more behind it. print creditcard if $var == CreditCard( 'VISA' ); wich should do a mod10 on $var and then match a regex or something. I think one could say CreditCard( 'VISA' ) is then the property. And after reading further seeing it could be smart matched like: print creditcard if $var ~~ CreditCard( 'VISA' ); Brought to a point: Properties could be also smart matched. Murat
AW: my int( 1..31 ) $var ?
my $var = 0; # or my $var = 0; # or my int $var = 0; # or my num $var = 0; # all 4 cases should print is integer print is integer if int $var == $var; This should work as a more generic method to test Integer *value*, rather than type, which IMHO is more useful (and more commonly wanted). I agree. And i found an interesting thread about that in comp.object http://groups.google.de/groups?hl=delr=ie=UTF-8oe=UTF-8threadm=1990S ep28.181057.16740%40odi.comrnum=5prev=/groups%3Fq%3DVariable%2BTypes%2 BVs%2BValue%2BTypes%26hl%3Dde%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3 D1990Sep28.181057.16740%2540odi.com%26rnum%3D5 Murat
AW: AW: nag Exegesis 2
where the distance grows with property-syntax-complexity. Oh, *that's* what you're concerned about? Then you're just not thinking in enough simultaneous dimensions: my int ($pre, $in, $post) is constant = (0,1, 2); This could been written faster in a single line, without decorating with extra newline+tab+tab+tab+tab: my constant int ($pre, $in, $post) = ( 0, 1, 2 ); or even: my int ($one,$two, $three, $four, $five, $six, $seven ) is Prop('camel', 'perl', 'camel', 'perl' ) = (0, 1, 2, 3, 4, 5, 6 ); dito. However, I have to say that I consider it a questionable practice to declare multiple constants in a single statement. Which makes much of this discussion moot from my point of view. I intended to address property syntax in general (where constant is just an example). So please don't proof me wrong with just taking a very primitive example. My believe is to clear something fogged by syntax. Back to natural reading: my wise uncles ( john, james, jim and tony ) are ( 42, 77, 32, 34 ). is a template for my property type ($john, $james, $jim, $tony ) = ( 42, 77, 32, 34 ); could be in real world application for making statistics about average age of webshop users: my Customer('WebShop') AGE ( $john, $james, $jim, $tony ) = ( 42, 77, 32, 34 ); Murat
AW: AW: nag Exegesis 2
Yes, but my int $foo is constant; Is self-explanatory for many language-speakers. If I recall, the set of cross-language-programmers is a proper subset of the set of language-speakers. It is clear which is clearer :). You do proof by best case scenario. In my previous posting i showed how this can become complicated to read when the list grows. To language-speakers: Why isn't my example language-speaker conform: my wise uncles ( john, james, jim and tony ) are ( 42, 77, 32, 34 ). is a template for my property type ($john, $james, $jim, $tony ) = ( 42, 77, 32, 34 ); could be in real world: my Application('Bricolage') USER ( $john, $james, $jim, $tony ) = ( 'john camel', 'james content', 'jim parrot', 'tony perl' ; Excerpt: why don't catch two mosquitos with one snatch... easy c++/java and language-speaker migration. Murat
AW: my int( 1..31 ) $var ?
Why should you care? Perl 6 isn't going to be that strictly typed, is it? Not even optional ? Murat
AW: AW: AW: nag Exegesis 2
And that shows precisely why Perl 6 does it the other way. Prepending extended properties like that makes the declaration almost unreadable. Because it separates the I shoot in my own foot. My example was extremly bad. Give me a better try: (1) my size(4), human DNA ($alpha, $beta, $gamma, $delta ) = ( 'atgc', 'ctga', 'aatt', 'ccaa' ); is so perfect, vs (2) my DNA ($alpha, $beta, $gamma, $delta) is human, size(4) = ( 'atgc', 'ctga', 'aatt', 'ccaa' ); which is so prone to overlook the eucaryotic property during i.e. debugging hassle. Why do code beautify (2) when (1) so crystal clear without it. And (1) is so close to natural language. BTW: are multiple properties separated with ',' ? This was my last try, promise! Murat
nag Exegesis 2
In the name of the bum (and c++-used eyes), i have some small criticism about the type and property syntax. Exegesis 2 - Any variables to declare? suggests: my int ($pre, $in, $post) is constant = (0..2); Two things type and property that belong so together are visually so disrupted, which hurts. Additionally it is so confusing for a mainly c++/java/c# that he would mixup perl property with his c++ object declaration (resulting in a hard learning curve during p6 basics). While the type int is more the object he would have expected. My suggestion for alternativ syntax: my constant int ($pre, $in, $post) = (0..2); my int is constant ($pre, $in, $post) = (0..2); This also protects from overlooking somewhere trailing properties in growing variable lists, like in: my int ($one, $two, $three, $four, $five, $six, $seven, $eight, $nine, $ten) is constant = (0..9); or complex property collections my int ($one, $two, $three, $four, $five, $six, $seven ) is Prop( 'camel', 'perl', 'camel', 'perl' ) = (0..X); In alternativ syntax: my constant int ($one, $two, $three, $four, $five, $six, $seven, $eight, $nine, $ten) = (0..X); here i had just looked in the head and see whats it. my int Prop( 'camel', 'perl', 'camel', 'perl' ) ($one, $two, $three, $four, $five, $six, $seven ) = (0..6); here i had just looked at the tail and can count how many vars to initialize (more like perl5, nothing disturbing inbetween). Addition: I have an idea ;) Also i think one could recycle decleration is for testing values in non-declerational-context. What if i have a propertyless variable and want to test whether its would suffice a property's spirit. When is would result in a boolean value i could write my unloading perl6 like: my ($var, $a); print this is a month day if $var is Any(1..31); print this is a valid email if $var is Email( 'mxcheck' ); print debug: var was constant if $var is constant; print 'MasterCard' if $a is CreditCard( 'MASTER' ); print 'VISA'if $a is CreditCard( 'VISA' ); print 'i am confused' if $a is SocialNumber( 'US' ); boolean expr Greetings, Murat PS: Sorry for opening a new thread, but after rereading my last stupid question i realized that i wasn't using perl6-talk. So i reread apo/exe and reconfigured my whole intention ;)