World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Steeve 29-May-2009 [14615] | or do you want our programms looks like C or Java ones |
Maxim 29-May-2009 [14616x3] | map-each isn't long. the 'each part is classification, and adds intent and meaning to what the function does. |
steeve, this isn't a noun prefix. | |
that is a big difference. | |
Steeve 29-May-2009 [14619] | they-like-long-names |
Maxim 29-May-2009 [14620] | map in this context is a verb. |
Steeve 29-May-2009 [14621] | REMOVE*, MAP* Is that not enough ? |
Maxim 29-May-2009 [14622] | personnaly I'd prefer the use of 'EVERY instead of 'EACH |
Steeve 29-May-2009 [14623] | i vote for '* |
Maxim 29-May-2009 [14624x2] | more explicit that it traverses the WHOLE series to its end. |
much better to include a totaly obcure character... sure steeve. assembly style code is much better than C. | |
BrianH 29-May-2009 [14626] | Steeve, if you want short wording then the question is whether the MAP-EACH block builder or the MAP map! constructor would be called more often. In mezzanine code creating map! values if more frequent than the use of the current MAP function. |
Janko 29-May-2009 [14627] | aha, I didn't see the reason for *-EACH ... that makes good sense.. I like it! |
Steeve 29-May-2009 [14628] | '* is not obscur as convention, it's used by other languages too |
Maxim 29-May-2009 [14629x2] | rebol IS NOT another language... that was my point. thanks for pushing it ;-) |
but in any case, REBOL style usually uses the '* as a notation for "pointer" or "reference to", | |
Steeve 29-May-2009 [14631] | uh ? in your dream i guess |
BrianH 29-May-2009 [14632x3] | (more lost messages and dropouts) |
Steeve, REBOL gets its speed of programming by preferring unshifted characters to speed typing of code, and English-like naming to speed reading. The syntax and naming conventions of REBOL were carefully chosen for good reason. | |
Steeve, other languages that use the * convention use it differently from each other. C-like languages use it for pointers. REBOL uses it for keeping the original definition of redefined words, like COPY* (not for pointers or references, Maxim, because those are implicit). The only language in major use that uses * to mean do-many-or-all is Regular Expressions. | |
Maxim 29-May-2009 [14635x3] | brianH to me, a reference in rebol is not the same as a reference in C. semantically they are equivalent, even if technically they are implemented differently. |
note the use of equivalent... over... "the same" | |
meaning, keeping a reference to some data. which is why we never use a-word* to store scalar values for example, but we will sometimes use them for copies of series, and words. | |
BrianH 29-May-2009 [14638x2] | All assigned non-immediate values are references in REBOL, implicitly :) |
bbl | |
Maxim 29-May-2009 [14640x2] | I know ;-) |
why is why reference, in REBOL, has a different meaning to me. if all words are references in C terms, then that concept has its own meaning in REBOL terms... IMHO. | |
Steeve 29-May-2009 [14642] | Brian, don't lecture me, I know those obvious things too (Bad habit) I just think '* is as good as -EACH and shorter. So '* is the winner. |
Maxim 29-May-2009 [14643x2] | '* doesn't mean anything. so its pointles... so you'd rather have acronyms for cunction names... just make it totally cryptic? ' * ' isn't english for any thing. rebol doesn't name things in CS terms, it uses readable english. |
cunction = function | |
Steeve 29-May-2009 [14645] | English doesn't mean anything to me :) |
Pekr 29-May-2009 [14646x2] | guys, chill out :-) How often will you use map-each so that it will irritate you? Well, I do care for naming conventions too, but I have my reservations for where imo architecture goes wrong, like using read-text, load-plugin and similar stuff .... |
Steeve :-) | |
Maxim 29-May-2009 [14648] | quoi? ;-) |
Janko 29-May-2009 [14649] | speak for yourself ... I will use it many times :) |
Izkata 29-May-2009 [14650x2] | I prefer just "map", but if there's going to be a name change, I think "map-each" is best - not only is it consistent with foreach, remove-each, etc, it's shorter than "map-every" or other alternatives, and feels like more natural English to me. And I use my map all over the place |
if nothing else, at least keep "map" in the name. Part of the reason I dislike "accumulate" for fold - it's harder to find, coming from another language | |
Steeve 29-May-2009 [14652] | Yes, map is useful. Maxim, map this "baillon" on your mouth :-) |
Pekr 29-May-2009 [14653] | Izkata: it is not consistent with foreach, it would have to be for-each then :-) |
Janko 29-May-2009 [14654] | my vote now: map-each , filter-each (isn't remove-each reverse in meaning) , fold-each (accumulate - I never know how to type this word) ... and something like find-each would also be very nice to have |
Steeve 29-May-2009 [14655] | Wow, what hemorrhage... Why don't you add -EACH everywhere we deal with series then ? |
Janko 29-May-2009 [14656] | Steeve .. do you say this to me because of find-each :) .. I mean a fing that uses block of code to determine what to find .. like: find-each x numbers [ x > 3 ] ... in same manner as map/fold/filter work |
Pekr 29-May-2009 [14657] | I also wanted change-each :-) |
Steeve 29-May-2009 [14658] | i propose a new fork for rebol. REBOL-EACH |
Janko 29-May-2009 [14659x2] | hehe :) |
fact is that find with a codeblock as criterium would be very usefull .. maybe it already exists under some other name? I remember someone proposing it not a long ago too | |
BrianH 29-May-2009 [14661] | Pekr, the FOR* functions have their own naming convention, and for historical reasons "-" isn't included. |
Janko 29-May-2009 [14662x2] | I use map reduce and seek at jsgoo and I can do a lot of stuff with those (an appy inject for dictionaries) .. let's say you want to check if users with username and password exists in a block of users: find-each U users [ all [ equal? U/user user equal? U/pwd pwd ] ] ... much cleaner and more error prone than with foreach IMHO ( and these functions show intent of why you are looping through block of users ) |
(seek is similar to what here would be find-each for example) | |
BrianH 29-May-2009 [14664] | Steeve, the *EACH functions have a really specific calling convention and all have the same bind/copy overhead for the code block. The other series functions have neither of thoise characteristics. |
older newer | first last |