Type | Wish | Status | dismissed | Date | 25-Feb-2009 03:14 |
---|---|---|---|---|---|
Version | alpha 35 | Category | Unspecified | Submitted by | PeterWood |
Platform | All | Severity | trivial | Priority | low |
Summary | Rename what-dir to what-dir? |
---|---|
Description | The naming of what-dir is not consistent with other Rebol "query" words such as equal?, length?, value?, tail? etc.. |
Example code |
Assigned to | n/a | Fixed in | - | Last Update | 5-Mar-2014 10:11 |
---|
Comments | |
---|---|
(0000474)
BrianH 25-Feb-2009 14:53 |
You make an interesting point...
All of the non-logic! *? functions take an argument, so they are questions about something; WHAT-DIR doesn't take an argument. There are many functions that return information that don't have a trailing ?. But all of this isn't an official guideline. I think that WHAT-DIR was named that because DIR was used too often as a variable, DIR? was already a query function, and CURRENT-DIR was too long (Carl prefers shorter names). Since WHAT-DIR existed in R2 it's a legacy function. This request provides a good counter-point to bug #666: In general, we haven't been renaming legacy functions in R3. Instead, we have been adding the new name as a new word assigned to the same function value, and keeping the old word too. For example, in the file mezzanines source: ls: :list-dir pwd: :what-dir rm: :delete mkdir: :make-dir We are trying to keep our breaks in compatibility of legacy functions limited to semantic changes, removed or changed options and such, and only when necessary (see #666). Some legacy functions have been removed altogether. None have been renamed yet - except as in the example above, with the old name still there. We discuss the naming of new functions in R3 chat 1098 (R3/Language/Naming). It can get pretty lively there :) |
(0002988)
PeterWood 24-Dec-2010 16:00 |
After reading recent discussions about R3/GUI functions names, I can see that adding a ? to the name what-dir isn't a good idea. However, what-dir seems so inelegant - the word what simply demands a ?
this-dir would have been a better name from my point of view. |
(0003523)
BrianH 27-Feb-2013 00:55 |
See #1818 for a more detailed discussion of the *? naming convention and when it is appropriate (it's not appropriate in some of the cases where it is used already). WHAT-DIR isn't really used in conditional expressions, so it wouldn't really be appropriate to add a ? to the end of it. We can't just add a ? to the end of every function that returns information, or else it would make the *? naming convention meaningless and annoying. |
Date | User | Field | Action | Change |
---|---|---|---|---|
5-Mar-2014 10:11 | BrianH | Status | Modified | reviewed => dismissed |
5-Mar-2014 10:11 | BrianH | Category | Modified | => Unspecified |
27-Feb-2013 00:55 | BrianH | Comment : 0003523 | Modified | - |
27-Feb-2013 00:55 | BrianH | Comment : 0003523 | Added | - |
31-Jan-2011 12:28 | Ladislav | Comment : 0003002 | Removed | - |
11-Jan-2011 10:31 | Ladislav | Comment : 0003002 | Modified | - |
11-Jan-2011 10:27 | Ladislav | Comment : 0003002 | Modified | - |
11-Jan-2011 10:14 | Ladislav | Comment : 0003002 | Added | - |
24-Dec-2010 16:00 | PeterWood | Comment : 0002988 | Added | - |
25-Feb-2009 15:15 | BrianH | Priority | Modified | normal => low |
25-Feb-2009 15:15 | BrianH | Status | Modified | submitted => reviewed |
25-Feb-2009 15:15 | BrianH | Severity | Modified | minor => trivial |
25-Feb-2009 15:13 | BrianH | Comment : 0000474 | Modified | - |
25-Feb-2009 15:06 | BrianH | Comment : 0000474 | Modified | - |
25-Feb-2009 15:02 | BrianH | Comment : 0000474 | Modified | - |
25-Feb-2009 14:53 | BrianH | Comment : 0000474 | Added | - |
25-Feb-2009 04:24 | PeterWood | Description | Modified | - |
25-Feb-2009 03:14 | PeterWood | Description | Modified | - |
25-Feb-2009 03:14 | PeterWood | Ticket | Added | - |