May 09, 2017
On Monday, 8 May 2017 at 21:37:17 UTC, Ali Çehreli wrote:
> On 05/06/2017 02:24 AM, Stanislav Blinov wrote:
>------------------------------------------------

It may D has this philosophy as Perl has: There's more than one way to do it

I found more than 5 ways.

another way:

string[] input = [ "", "", "", "", "" ];  // reserve for 5 elements
args[ 1 ].split( '/' ).remvoe!( element => element.empty ).copy( input );

Thanks anyway
May 09, 2017
On Monday, May 08, 2017 11:41:02 Daniel N via Digitalmars-d-learn wrote:
> On Monday, 8 May 2017 at 10:51:52 UTC, Ola Fosheim Grøstad wrote:
> > On Sunday, 7 May 2017 at 20:50:10 UTC, Patrick Schluter wrote:
> >> If you look on TIOBE [1] newest stats, D does not look so bad after all. It's ranked 23 with a 1.38% share. The so
> >
> > Tiobe is a "hoax".
> >
> > Stack overflow counts for alternative languages:
> >
> > "swift": 146,374
> > "scala": 65,594
> > "go": 22,212
> > "rust": 6,596
> > "d": 2,211
> > "nim": 167
>
> Stack-Overflow usage is clearly not representative of language
> usage.
> 1) Our forum is flourishing, why would any D developer use SO?
> 2) The number of questions is directly proportional with the
> difficulty of the language.(D is quite easy to learn, especially
> compared to rust).

There are a lot of different metrics that can be used to measure how popular a language is. Tiobe and SO are just two of them. And with each metric, you have to keep in mind how they get those numbers in order to figure out what they indicate.

It's easy to tell that D is not as big as languages like C/C++, but it can be much harder to tell how its usage compares to languages like Rust.

LOL. I get the impression that it's often the tendancy of D folks is to get excited when D shows up as high in a list like Tiobe and to argue that the list doesn't mean much if D isn't high in the list.

- Jonathan M Davis


May 09, 2017
On Tuesday, 9 May 2017 at 19:11:08 UTC, Jonathan M Davis wrote:
> LOL. I get the impression that it's often the tendancy of D folks is to get excited when D shows up as high in a list like Tiobe and to argue that the list doesn't mean much if D isn't high in the list.

AKA confirmation bias. Not unique to D folks :)

May 10, 2017
On 05/09/2017 01:17 AM, k-five wrote:
> On Monday, 8 May 2017 at 21:37:17 UTC, Ali Çehreli wrote:
>> On 05/06/2017 02:24 AM, Stanislav Blinov wrote:
>> ------------------------------------------------
>
> It may D has this philosophy as Perl has: There's more than one way to
> do it

D certainly does not have such a philosophy. :)

> I found more than 5 ways.
>
> another way:
>
> string[] input = [ "", "", "", "", "" ];  // reserve for 5 elements
> args[ 1 ].split( '/' ).remvoe!( element => element.empty ).copy( input );

D does not try to limit the programmer but there aren't many ways of reading a line. Note that the difference in the above case is what the programmer is doing with the results. For example, copying the splitted lines into a pre-existing array should not count as a different way.

Plus, wrapping steps of the same sollution in a function should not count as a different way. Otherwise, we can have infinite number of ways of doing the same things. For example, not!empty is the equivalent of the following function:

auto notEmpty_0(T)(T a) {
    return !a.empty;
}

Change 0 above to 1, 2, ... :)

Ali

May 10, 2017
On Wednesday, 10 May 2017 at 10:47:13 UTC, Ali Çehreli wrote:
> On 05/09/2017 01:17 AM, k-five wrote:
> > On Monday, 8 May 2017 at 21:37:17 UTC, Ali Çehreli wrote:
> >> On 05/06/2017 02:24 AM, Stanislav Blinov wrote:
> >> ------------------------------------------------

> Plus, wrapping steps of the same sollution in a function should not count as a different way. Otherwise, we can have infinite number of ways of doing the same things. For example, not!empty is the equivalent of the following function:
>
> auto notEmpty_0(T)(T a) {
>     return !a.empty;
> }
>
> Change 0 above to 1, 2, ... :)
>
-----------------------------------------------------

Yes you are right. I admit.


May 10, 2017
On Tuesday, May 09, 2017 21:37:19 Moritz Maxeiner via Digitalmars-d-learn wrote:
> On Tuesday, 9 May 2017 at 19:11:08 UTC, Jonathan M Davis wrote:
> > LOL. I get the impression that it's often the tendancy of D folks is to get excited when D shows up as high in a list like Tiobe and to argue that the list doesn't mean much if D isn't high in the list.
>
> AKA confirmation bias. Not unique to D folks :)

True enough. :)

- Jonathan M Davis

1 2 3
Next ›   Last »