March 09, 2012
On Thu, Mar 08, 2012 at 08:48:43PM -0800, Jonathan M Davis wrote: [...]
> I really don't think that Phobos is really any more quirky or inconsistent than your average standard library. It's not perfect, but it isn't particularly inconsistent either.

In fact, in spite of its present shortcomings, Phobos as a whole is a lot *more* consistent than, say, your average C library.


> We'll continue to make improvement to it (primarily by adding new stuff), but it's increasingly costly to make breaking changes. And, on the whole, it's not like what we have is horrible. The biggest problems involve whole modules (which are generally older) which need to be redesigned, and those will happen.

Personally, I can't wait for the day std.io merges, and std.stream and std.stdio are deprecated. The current std.stream/std.stdio dichotomy just makes no sense at all. Plus, a significant part of std.stdio needs to be tweaked to use Ranges anyway.


> But minor stuff like tweaking function names doesn't really buy us enough to be worth it anymore. If a function changes sufficiently to merit a full replacement, then maybe we can change its name and phase out the old one (e.g. if we change the functions in std.string which take patterns to take regexes instead), but changing a name to change a name just isn't worth it when we're trying to provide a serious offering with D and Phobos.  We're too far along.
[...]

True.

And +1 for std.string functions to take regexes. In this day and age, hack jobs for doing string operations just don't cut it anymore. Regexes rule string processing. (Well, they do have their limitations, but anything *weaker* than regexes is certainly too weak to be generally useful.)


T

-- 
Guns don't kill people. Bullets do.
March 09, 2012
"H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote in message news:mailman.289.1331260526.4860.digitalmars-d@puremagic.com... [...]
>
> T
>
> -- 
> Having a smoking section in a restaurant is like having a peeing section in a swimming pool. -- Edward Burr

That's one great thing about Ohio: A few years back we had a state law passed here (by public vote! I had been convinced it wouldn't pass) prohibiting smoking in workplaces and public buildings/businesses. That includes, of course, restaurants. No more smoking sections! I feel so spoiled now when I travel to a state that still has public indoor smoking. It's like stepping back into the stone age.


March 09, 2012
On Friday, March 09, 2012 01:45:13 Nick Sabalausky wrote:
> "H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote in message news:mailman.289.1331260526.4860.digitalmars-d@puremagic.com... [...]
> 
> > T
> 
> That's one great thing about Ohio: A few years back we had a state law passed here (by public vote! I had been convinced it wouldn't pass) prohibiting smoking in workplaces and public buildings/businesses. That includes, of course, restaurants. No more smoking sections! I feel so spoiled now when I travel to a state that still has public indoor smoking. It's like stepping back into the stone age.

I'm from California, where it's been illegal to smoke in restaurants for 15+ years now, and it always shocks me to see a smoking section in restaurants in other states. It's not something that I even think about.

- Jonathan M Davis
March 09, 2012
On Friday, 9 March 2012 at 07:02:47 UTC, Jonathan M Davis wrote:
> On Friday, March 09, 2012 01:45:13 Nick Sabalausky wrote:
>> "H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote in message
>> news:mailman.289.1331260526.4860.digitalmars-d@puremagic.com...
>> [...]
>> 
>> > T
>> 
>> That's one great thing about Ohio: A few years back we had a state law
>> passed here (by public vote! I had been convinced it wouldn't pass)
>> prohibiting smoking in workplaces and public buildings/businesses. That
>> includes, of course, restaurants. No more smoking sections! I feel so
>> spoiled now when I travel to a state that still has public indoor smoking.
>> It's like stepping back into the stone age.
>
> I'm from California, where it's been illegal to smoke in restaurants for 15+
> years now, and it always shocks me to see a smoking section in restaurants in
> other states. It's not something that I even think about.
>
> - Jonathan M Davis

I smoke, but smoking inside is weird to me. I'll do it sometimes in my own home, but even then not usually.
March 09, 2012
Le 07/03/2012 11:08, Timon Gehr a écrit :
> On 03/06/2012 10:30 PM, deadalnix wrote:
>>
>> auto helps too.
>
> This remark was explicitly about _Java_ code style.

1/ We are not in the java's newsgroup.
2/ In java, the tooling is that awesome that you don't need to type most of it anyway.
March 09, 2012
Le 07/03/2012 03:42, H. S. Teoh a écrit :
> On Tue, Mar 06, 2012 at 09:18:13PM -0500, Nick Sabalausky wrote:
> [...]
>> But, I'm thinking this whole "dur vs duration" matter is stupid
>> anyway.  Seconds, hours, etc *are* durations. What the hell do we even
>> need the "dur" or "duration" for anyway?
>>
>> I say fuck it: Let's just toss this into core.time (or std.datetime or
>> whatever) and be done:
>>
>> alias dur!"years" years;
>> alias dur!"months" months;
>> alias dur!"weeks" weeks;
>> alias dur!"days" days;
>> alias dur!"hours" hours;
>> alias dur!"minutes" minutes;
>> alias dur!"seconds" seconds;
>> alias dur!"msecs" msecs;
>> alias dur!"usecs" usecs;
>> alias dur!"hnsecs" hnsecs;
>
> +1.
>

+1 if it can be used as a property. Which require explicit modification of dur.
March 09, 2012
Le 07/03/2012 02:00, F i L a écrit :
> I personally find it much easier to remember and use longer, more
> sentance-like method names. However, Jonathan and others obviously feel
> more comfortable writing with a high level of abbreviation, which they
> justify rather well. Still, if D's goal is to gain popularity, I think
> it should take notices of other rising languages like C#.
>
> The problem with making any change to Phobos is backwards compatibility.

We just need a politic for the change. IE: make the old name a warning, then deprecated, then remove it. Spread the process to a year or so.
March 09, 2012
Le 07/03/2012 04:05, Bill a écrit :
> F i L Wrote:
>
>> I personally find it much easier to remember and use longer, more
>> sentance-like method names. However, Jonathan and others
>> obviously feel more comfortable writing with a high level of
>> abbreviation, which they justify rather well. Still, if D's goal
>> is to gain popularity, I think it should take notices of other
>> rising languages like C#.
>>
>> The problem with making any change to Phobos is backwards
>> compatibility. So, what if there was a way to satisfy both
>> parties and keep backwards compatibility? Is there any compelling
>> reason why simply wrapping Phobos into a different format would
>> be such bad thing? Meaning:
>>
>>       // system.io
>>
>>       private import std.stdio;
>>
>>       alias write   Write;
>>       alias writeln WriteLine;
>>       // etc...
>>
>> Besides keeping things in-sync and error messages referring to
>> the original function names (which could be amended), I don't see
>> why such a library couldn't be written as a way to make the
>> language easier to swallow to potential D users coming from
>> Java/C#. Microsoft used similar tactics with J#/F# to help the
>> Java/Python folks adapt their code to .NET.
>
> good idea ! can refer to the java c # naming specification, to work out d own naming specification
>
> good luck��
> Bill

This is an horrible idea. That make code easier to write, and harder to read. Some language beat D at this game, consider PERL, which is close to write only.
March 09, 2012
Le 07/03/2012 04:46, Nick Sabalausky a écrit :
> "Adam D. Ruppe"<destructionator@gmail.com>  wrote in message
> news:bwqkuqhyiygvgqswicvz@forum.dlang.org...
>> On Wednesday, 7 March 2012 at 03:24:23 UTC, Jonathan M Davis wrote:
>>> I don't understand this complaint at all. curr is an incredibly common
>>> abbreviation for current.
>>
>> Is it your *first* choice?
>
> In the general case, it frequently is for me. In the specific case of
> Clock.curr(ent)?Time, I'm equally happy either way. Although I agree with
> whoever it was (Brad?) that said "Clock.now()" would be even better.
>
>

The usage of current is often a smell that is saying « I had no clue how to name that, so I did name it using current ».

Meaningful name are what we should look for. And now is meaningful.
March 09, 2012
Le 07/03/2012 06:54, H. S. Teoh a écrit :
> On Wed, Mar 07, 2012 at 04:42:50AM +0100, Adam D. Ruppe wrote:
>> On Wednesday, 7 March 2012 at 03:24:23 UTC, Jonathan M Davis wrote:
>>> I don't understand this complaint at all. curr is an incredibly
>>> common abbreviation for current.
>>
>> Is it your *first* choice?
>
> My first choice is actually 'cur', but I'm OK with 'curr'. I've
> consistently used 'cur' for 'current' for at least the last decade and a
> half, probably more.
>

Don't want to be mean, but this isn't about what whoever is used to use. I know many people in non English speaking country that are used to name things using local language. SO what, do we should also consider « courrant », « corrente » and so on ?

Note that I'm not advocating for naming in local languages. This is a dumb idea, but anyway, this is used in the industry quite a lot. So ?

Shouldn't English should be the default, international language ? And so, English words isn't better than a double translation ?