Re: Naming of new lazy versions of existing Phobos functions

2014-07-21 Thread Dicebot via Digitalmars-d
On Sunday, 20 July 2014 at 10:19:10 UTC, Jonathan M Davis wrote: Do we really want to be naming functions which aren't properties with adjectives instead of verbs? Yes. We have parens for denoting functions. Oh wait.

Re: Naming of new lazy versions of existing Phobos functions

2014-07-21 Thread Tobias Pankrath via Digitalmars-d
Do we really want to be naming functions which aren't properties with adjectives instead of verbs? That seems very wrong to me. I'd much rather see stuff like setExt or setExtLazy than withExtension or extensionSet. Function names are supposed to be verbs unless they're emulating variables.

Re: Naming of new lazy versions of existing Phobos functions

2014-07-21 Thread Yota via Digitalmars-d
On Friday, 18 July 2014 at 20:35:33 UTC, Walter Bright wrote: On 7/18/2014 12:40 PM, Tourist wrote: Are you planning to deprecate the non-lazy functions at some (maybe very distant) point? No. Phobos has already gone through multiple rounds of renaming/deprecation, all at considerable

Re: Naming of new lazy versions of existing Phobos functions

2014-07-20 Thread Jonathan M Davis via Digitalmars-d
On Saturday, 19 July 2014 at 00:05:55 UTC, Brad Anderson wrote: To summarize what I think are the best ideas so far: std.string -- EagerLazy - capitalize capitalized center centered detabdetabbed entab

Re: Naming of new lazy versions of existing Phobos functions

2014-07-19 Thread Gary Willoughby via Digitalmars-d
On Saturday, 19 July 2014 at 00:05:55 UTC, Brad Anderson wrote: To summarize what I think are the best ideas so far: std.string -- EagerLazy - capitalize capitalized center centered detabdetabbed entab

Re: Naming of new lazy versions of existing Phobos functions

2014-07-19 Thread Dicebot via Digitalmars-d
On Saturday, 19 July 2014 at 00:05:55 UTC, Brad Anderson wrote: To summarize what I think are the best ideas so far: std.string -- EagerLazy - capitalize capitalized center centered detabdetabbed entab

Re: Naming of new lazy versions of existing Phobos functions

2014-07-19 Thread Dmitry Olshansky via Digitalmars-d
19-Jul-2014 04:05, Brad Anderson пишет: To summarize what I think are the best ideas so far: std.string -- EagerLazy - capitalize capitalized center centered detabdetabbed entabentabbed format

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Walter Bright via Digitalmars-d
On 7/17/2014 3:59 PM, Brad Anderson wrote: Walter's prototype[1] for removing allocations from a phobos function (std.path.setExtension) got hung up on the naming of the function. It couldn't keep the same name because it differed only by return type. Walter doesn't like explicitly naming them

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Brad Anderson via Digitalmars-d
On Friday, 18 July 2014 at 08:48:08 UTC, Walter Bright wrote: [...] Since there are a lot of existing lazy algorithms in Phobos that do not follow this naming convention, either the convention is pointless or we go through yet another round of changing Phobos names and breaking everyone's

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Brad Anderson via Digitalmars-d
On Friday, 18 July 2014 at 17:59:05 UTC, Brad Anderson wrote: - abbrev : abbreviated: withAbbrev abbrev actually doesn't belong in this list. I probably included a few others mistakenly too.

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Ali Çehreli via Digitalmars-d
On 07/18/2014 10:59 AM, Brad Anderson wrote: maybe use the past participle on the ones with verbs. I vote 100% for past participle, 20% for with. - abbrev : abbreviated: withAbbrev Haha! We can't keep it abbreviated anymore though. Wait, what? :p - removechars:

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread H. S. Teoh via Digitalmars-d
On Fri, Jul 18, 2014 at 05:59:03PM +, Brad Anderson via Digitalmars-d wrote: [...] Yeah, I agree. I'd hate having a with prefix on everything. Yeah, with doesn't fit everywhere, only in some places. I think withExtension (or withExt) is a very good choice of name. It may apply to a few other

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Walter Bright via Digitalmars-d
On 7/18/2014 10:59 AM, Brad Anderson wrote: What do you think? I'd leaven that proposal with the observation that functions are likely to be lexically sorted by name. Hence, like functions should lexicographically be adjacent to each other. setExtension and withExtension will be widely

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Meta via Digitalmars-d
On Friday, 18 July 2014 at 17:59:05 UTC, Brad Anderson wrote: On Friday, 18 July 2014 at 08:48:08 UTC, Walter Bright wrote: [...] Since there are a lot of existing lazy algorithms in Phobos that do not follow this naming convention, either the convention is pointless or we go through yet

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Tourist via Digitalmars-d
On Thursday, 17 July 2014 at 22:59:27 UTC, Brad Anderson wrote: Walter's prototype[1] for removing allocations from a phobos function (std.path.setExtension) got hung up on the naming of the function. It couldn't keep the same name because it differed only by return type. Walter doesn't like

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Brad Anderson via Digitalmars-d
On Friday, 18 July 2014 at 18:49:13 UTC, H. S. Teoh via Digitalmars-d wrote: [...] I think it's a fool's errand to try to invent a single system of naming that's blindly applied across the board. We should have some guiding principles for common cases (like withXxx, xxxOf, verbed, etc.) for

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Walter Bright via Digitalmars-d
On 7/18/2014 12:40 PM, Tourist wrote: Are you planning to deprecate the non-lazy functions at some (maybe very distant) point? No. Phobos has already gone through multiple rounds of renaming/deprecation, all at considerable disruption. Each one was supposed to be worth it and the last time.

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Brad Anderson via Digitalmars-d
On Friday, 18 July 2014 at 19:00:56 UTC, Walter Bright wrote: On 7/18/2014 10:59 AM, Brad Anderson wrote: What do you think? I'd leaven that proposal with the observation that functions are likely to be lexically sorted by name. Hence, like functions should lexicographically be adjacent to

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Brad Anderson via Digitalmars-d
On Friday, 18 July 2014 at 20:35:33 UTC, Walter Bright wrote: General comment (not particularly directed at Tourist): There is no such thing as the perfect set of names and the perfect naming convention. These discussions about which of car, auto, vehicle is more intuitive give the illusion

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread H. S. Teoh via Digitalmars-d
On Fri, Jul 18, 2014 at 09:14:44PM +, Brad Anderson via Digitalmars-d wrote: On Friday, 18 July 2014 at 20:35:33 UTC, Walter Bright wrote: [...] I find these interminable naming threads to be frustrating and an impediment to progress on issues with Phobos that actually matter, like making

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Walter Bright via Digitalmars-d
On 7/18/2014 2:14 PM, Brad Anderson wrote: It's kind of weird that you'd say that because you seem to be pretty strongly opinionated about the naming. It's not just this one, it comes up again and again, always spawning long debates, and accomplishing next to nothing. I find these

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Brad Anderson via Digitalmars-d
On Friday, 18 July 2014 at 22:37:26 UTC, Walter Bright wrote: On 7/18/2014 2:14 PM, Brad Anderson wrote: It's kind of weird that you'd say that because you seem to be pretty strongly opinionated about the naming. It's not just this one, it comes up again and again, always spawning long

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Brad Anderson via Digitalmars-d
To summarize what I think are the best ideas so far: std.string -- EagerLazy - capitalize capitalized center centered detabdetabbed entabentabbed format formatted leftJustify

Re: Naming of new lazy versions of existing Phobos functions

2014-07-18 Thread Timon Gehr via Digitalmars-d
On 07/18/2014 09:23 PM, Meta wrote: On Friday, 18 July 2014 at 17:59:05 UTC, Brad Anderson wrote: On Friday, 18 July 2014 at 08:48:08 UTC, Walter Bright wrote: [...] Since there are a lot of existing lazy algorithms in Phobos that do not follow this naming convention, either the convention is

Naming of new lazy versions of existing Phobos functions

2014-07-17 Thread Brad Anderson via Digitalmars-d
Walter's prototype[1] for removing allocations from a phobos function (std.path.setExtension) got hung up on the naming of the function. It couldn't keep the same name because it differed only by return type. Walter doesn't like explicitly naming them as lazy because existing lazy functions

Re: Naming of new lazy versions of existing Phobos functions

2014-07-17 Thread H. S. Teoh via Digitalmars-d
On Thu, Jul 17, 2014 at 10:59:26PM +, Brad Anderson via Digitalmars-d wrote: [...] I find the with prefix particularly attractive. It implies the lazy behavior, is short, and reads well when chained with other calls. Hypothetical example I gave in the Pull Request comments: auto