February 23, 2022
On Wednesday, 23 February 2022 at 09:49:33 UTC, Abdulhaq wrote:

> This is right. This thread got me reflecting on why python has been so successful in the scientific/engineering/ML domain. I don't think GVR was some extraordinary genius, I think he did a great job of coming up with a dynamic interpreted language that truly was 'turtles all the way down' (use of dicts throughout, metaclasses etc.) and managed the expansion of the language really well.

I program in  python since 1.8, and you are totally right. It's simplicity was a joy (nowadays is a little different)

> I also think the 2 -> 3 transition was well timed and a success, contrary to what many bystanders would have you believe.

I *strongly* agree with you. Cleaning-up the language design (bytes/string, print/print()) is _always_ a winning move.


February 23, 2022
On Wednesday, 23 February 2022 at 09:49:33 UTC, Abdulhaq wrote:
> ... Is D being wedded to C both its great strength, and its great weakness at the same time?

Perhaps, the clearest answer to that, is in the number of man hours (and possibly women hours, but I doubt it ;-) ..  being spent on ImportC.


February 23, 2022
On Wednesday, 23 February 2022 at 10:12:42 UTC, forkit wrote:
> On Wednesday, 23 February 2022 at 09:49:33 UTC, Abdulhaq wrote:
>> ... Is D being wedded to C both its great strength, and its great weakness at the same time?
>
> Perhaps, the clearest answer to that, is in the number of man hours (and possibly women hours, but I doubt it ;-) ..  being spent on ImportC.

You can always craft up a DIP if you think the feature is so important and if the DIP is accepted you can always add the feature yourself, unless you can convince whomever is working on specific things in the compiler that this feature is more important.
February 23, 2022
On Monday, 21 February 2022 at 09:29:56 UTC, forkit wrote:
> It seems to me, that D is a language where python like chaining would be right at home.
>
> writeln(1 < 2 < 3 < 4 > 3 == 3); // true
>
>
> So why doesn't D have it already ;-)

Why not simply allow this?

writeln(1 < 2 and 2 < 3 and 3 < 4 and 4 > 3 and 3 is equal 3)?

-Alex

February 23, 2022
On Wednesday, 23 February 2022 at 14:38:10 UTC, 12345swordy wrote:
> On Monday, 21 February 2022 at 09:29:56 UTC, forkit wrote:
>> It seems to me, that D is a language where python like chaining would be right at home.
>>
>> writeln(1 < 2 < 3 < 4 > 3 == 3); // true
>>
>>
>> So why doesn't D have it already ;-)
>
> Why not simply allow this?
>
> writeln(1 < 2 and 2 < 3 and 3 < 4 and 4 > 3 and 3 is equal 3)?
>
> -Alex

This is not a 'must have' feature. It was just a question.

and no, your example is going in the opposite direction... i.e. towards unnecessary verbosity.

I want less verbosity, not more.

But D is clearly too tied to C, and becoming ever more so it seems.

Oddly enough, there's more chance of C++ getting chained comparisons ;-)

February 23, 2022
On Wednesday, 23 February 2022 at 11:08:06 UTC, bauss wrote:
>
> You can always craft up a DIP if you think the feature is so important and if the DIP is accepted you can always add the feature yourself, unless you can convince whomever is working on specific things in the compiler that this feature is more important.

Nowhere did I suggest this feature was 'that' important, that I'd consider the drawn out process of DIPing it.

Useful yes. Very useful..one can certainly make that argument.

Vital... well.. hardly. But the same can be said for many things 'added' to languages these days.

In any case, which compiler are you referring to? The D compiler, or the D->C compiler ;-)

D really needs more people working on the 'D' compiler.

February 23, 2022

On Wednesday, 23 February 2022 at 10:01:21 UTC, Paolo Invernizzi wrote:

>

I strongly agree with you. Cleaning-up the language design (bytes/string, print/print()) is always a winning move.

Indeed. Also, it is much easier to upgrade a language that is statically typed. In my experience the Python 2 to Python 3 transition was a relatively smooth ride, and it can be made even smoother for a statically typed language.

For D specifically, you can just have a version 2 and a version 3 front end use the same IR/backend and allow both version 2 and version 3 code in the the same executable.

(I have implemented "a < b < c" in an experimental extensions of the D compiler. It was easy to do, and isn't even a breaking change.)

February 24, 2022
On Wednesday, 23 February 2022 at 19:42:53 UTC, forkit wrote:
> On Wednesday, 23 February 2022 at 14:38:10 UTC, 12345swordy
clip

> towards unnecessary verbosity.
>
> I want less verbosity, not more.
>
> But D is clearly too tied to C, and becoming ever more so it seems.
>
> Oddly enough, there's more chance of C++ getting chained comparisons ;-)

Why do people seem to hate verbosity so much!

I spend more time reading code than writing it, I suspect this is true for most developers, thus it would seem to make sense to optimize code readability vs concise and fast to write.

Of course, there are often 'win-win' cases where you can optimize both, but in general I think a little verbosity is better if it makes the code easier to read.



February 24, 2022
On Thursday, 24 February 2022 at 17:12:19 UTC, Craig Dillabaugh wrote:
>
>
> Why do people seem to hate verbosity so much!
>

umm.. 'unnecessary verbosity' (unncessary is the keyword here, not verbosity)


e.g.

i < 4 < n

once you know what the above means, it will take less cognitive effort than

i < 4 && 4 < n

not to mention less typing.

so everyone's a winner when you remove 'unncessary' verbosity.

February 24, 2022
On Thu, Feb 24, 2022 at 08:57:02PM +0000, forkit via Digitalmars-d wrote: [...]
> e.g.
> 
> i < 4 < n
> 
> once you know what the above means, it will take less cognitive effort than
> 
> i < 4 && 4 < n
> 
> not to mention less typing.
> 
> so everyone's a winner when you remove 'unncessary' verbosity.

There's std.algorithm.ordered which lets you write:

	ordered(i, 4, n)

which isn't too bad, it just needs to be promoted more so that people are more aware of it.


T

-- 
People tell me that I'm paranoid, but they're just out to get me.