November 15, 2021
On Sunday, 14 November 2021 at 21:58:21 UTC, Ola Fosheim Grøstad wrote:
>
> I think both C+, Rust and D has a usability problem there.

I really like this video.. it compares doing gcd (greatest common divisor) in 16 different languages. If I were running a intro to programming course, I'd make them all watch this, as soon as they walk into their first class.

The link below starts where he compares the C++ vs D vs Rust solution.

In D, you just do it and quote '.. move on'.

https://youtu.be/UVUjnzpQKUo?t=449


November 15, 2021
On Sunday, 14 November 2021 at 21:58:21 UTC, Ola Fosheim Grøstad wrote:
>
> The ACID test of language complexity is to look at typical code bases and ask yourself if it would be a good idea to tell newbies to learn the language from studying those.
>

I'd argue, that the ACID test of language complexity is the extent to which you can make sense of the code you're looking at, without any prior exposure to the language that it is written in.


November 15, 2021

On Monday, 15 November 2021 at 03:57:59 UTC, forkit wrote:

>

I'd argue, that the ACID test of language complexity is the extent to which you can make sense of the code you're looking at, without any prior exposure to the language that it is written in.

That would favour languages that are similar to the most used languages: Python, Java, C#...

November 15, 2021
On Monday, 15 November 2021 at 03:57:59 UTC, forkit wrote:
> I'd argue, that the ACID test of language complexity is the extent to which you can make sense of the code you're looking at, without any prior exposure to the language that it is written in.

This seems more like a test of familiarity than complexity. A better metric for complexity would be something like "number of words in the language spec."
November 15, 2021
On Monday, 15 November 2021 at 04:06:31 UTC, Paul Backus wrote:
> This seems more like a test of familiarity than complexity. A better metric for complexity would be something like "number of words in the language spec."

No, difficult implementation != difficult to use


November 15, 2021
On Monday, 15 November 2021 at 04:10:01 UTC, Ola Fosheim Grøstad wrote:
> On Monday, 15 November 2021 at 04:06:31 UTC, Paul Backus wrote:
>> This seems more like a test of familiarity than complexity. A better metric for complexity would be something like "number of words in the language spec."
>
> No, difficult implementation != difficult to use

Spec != implementation
November 15, 2021
On Monday, 15 November 2021 at 04:37:48 UTC, Paul Backus wrote:
> On Monday, 15 November 2021 at 04:10:01 UTC, Ola Fosheim Grøstad wrote:
>> On Monday, 15 November 2021 at 04:06:31 UTC, Paul Backus wrote:
>>> This seems more like a test of familiarity than complexity. A better metric for complexity would be something like "number of words in the language spec."
>>
>> No, difficult implementation != difficult to use
>
> Spec != implementation

Actually, a formal spec is pretty close...
November 15, 2021

On Monday, 15 November 2021 at 03:10:34 UTC, forkit wrote:

>

I really like this video.. it compares doing gcd (greatest common divisor) in 16 different languages. If I were running a intro to programming course, I'd make them all watch this, as soon as they walk into their first class.

The link below starts where he compares the C++ vs D vs Rust solution.

In D, you just do it and quote '.. move on'.

https://youtu.be/UVUjnzpQKUo?t=449

This video shows a suboptimal solution for D, because their implementation unnecessarily iterates over the array twice. Their C++ solution is much faster, because of doing processing in a single pass. But D can do it in a single pass too:

int findGCD_from_the_video_if_you_dont_care_about_performance(const int[] nums)
{
  return gcd(nums.minElement, nums.maxElement);
}

int findGCD_twice_faster_for_large_arrays(const int[] nums)
{
  return gcd(nums.reduce!(min, max)[]);
}
November 15, 2021
On Monday, 15 November 2021 at 04:06:31 UTC, Paul Backus wrote:
>
> This seems more like a test of familiarity than complexity. A better metric for complexity would be something like "number of words in the language spec."


My assertion was based on there being no familiarity

Yes, familiarity will play a role if your looking at code in a language that looks/works similar to one you're familiar with.

But I mean complete novices. Never exposed to a programming language.

Also, I'm not referring to 'language' complexity per se, but rather 'cognitive' complexity.

Specifically, chunking: https://en.wikipedia.org/wiki/Chunking_(psychology)

Some languages are well suited to chunking (either intentionally by design, or by accident).

Chunking will impact on your capacity to learn and remember.

Others seem more like an "undifferentiated mess of atomic information items".

Ever wondered why C++ is so hard for a novice to learn and remember?

Is it because you cannot fit those "undifferentiated mess of atomic information items" into working memory?

November 15, 2021

On Monday, 15 November 2021 at 00:57:43 UTC, zjh wrote:

>

On Sunday, 14 November 2021 at 20:39:07 UTC, Imperatorn wrote:

>

Do you mean port like an actual port and not only bindings?

binding is Ok,usable for D users.

http://wxd.sourceforge.net/

It's a bit outdated tho. Tried it?