February 10, 2023
On Friday, 10 February 2023 at 14:50:59 UTC, bachmeier wrote:
> On Friday, 10 February 2023 at 07:04:31 UTC, Max Samukha wrote:
>
>> Having class-private doesn't preclude module-private. Dennis even submitted a PR implementing class-private, but it stalled because people couldn't agree on whether class-private should be "private to class" or "private to class instance".
>
> This is a great example of the problem. In a discussion of any five programmers, you'll have five conflicting sets of rules that are the obvious and intuitive way to do it.

Well in Swift, there is no problem .. at all.

Why is it a problem in D then? (and I mean technically).

I think the 'real' problem, is that some core D people just refuse to allow D to provide such an option to the programmer. For what reason, I cannot fathom, since Swift can do this just fine. I think it's some kind of bias against a particular style of programming that some don't want to see occuring when people use the D programming lanuguage. i.e. It has nothing at all to do with implementation, since it's already been demonstrated that it can be implemented, very easily.

Again, in this particular area, Swift is way ahead of D.
February 10, 2023
> I think the 'real' problem, is that some core D people just refuse to allow D to provide such an option to the programmer. For what reason, I cannot fathom, since Swift can do this just fine. I think it's some kind of bias against a particular style of programming that some don't want to see occuring when people use the D programming lanuguage. i.e. It has nothing at all to do with implementation, since it's already been demonstrated that it can be implemented, very easily.
>
> Again, in this particular area, Swift is way ahead of D.

Sorry, but I do not believe Swift is near to the level of what D is, it's a language that's tied - like jail - to Apple's ecosystem, and its only real use is for iOS apps. They're two completely different languages in general.
February 10, 2023
A good example of a language that does everything right is C#. If C# wasn't tied to Microsoft, it would honestly be pretty much the perfect language. Java is also pretty good, but it has its downsides.
February 10, 2023
> I think the 'real' problem, is that some core D people just refuse to allow D to provide such an option to the programmer.


I think a lot of it has to do with the fact that heaps of D programmers write procedural code and don't care about any object oriented features, that's because they're 'old-school' programmers, whereas OOP is 'new-school'.
February 11, 2023
On Friday, 10 February 2023 at 23:19:31 UTC, thebluepandabear wrote:
>> I think the 'real' problem, is that some core D people just refuse to allow D to provide such an option to the programmer. For what reason, I cannot fathom, since Swift can do this just fine. I think it's some kind of bias against a particular style of programming that some don't want to see occuring when people use the D programming lanuguage. i.e. It has nothing at all to do with implementation, since it's already been demonstrated that it can be implemented, very easily.
>>
>> Again, in this particular area, Swift is way ahead of D.
>
> Sorry, but I do not believe Swift is near to the level of what D is, it's a language that's tied - like jail - to Apple's ecosystem, and its only real use is for iOS apps. They're two completely different languages in general.

That's not entirely correct.

I don't use any Apple hardware products. Never have, and never will.

I use Swift on Linux only.

There are of course some library features of Swift tied to Apple products. But I have no need for those library features.

As a standalone language, Swift can (IMO) already out compete D.
February 11, 2023
On Friday, 10 February 2023 at 23:22:34 UTC, thebluepandabear wrote:
> A good example of a language that does everything right is C#. If C# wasn't tied to Microsoft, it would honestly be pretty much the perfect language. Java is also pretty good, but it has its downsides.

I don't agree with all of that.

C# is certainly one of 'great' programming languages.

Particulary because of its extensive framework library, which D could never compete with.

Also, the  move to open-source, and the move to cross platform with dotnet, makes C# (dotnet) a very attractive option for many use cases, and will certainly see the language being used more and more...

I don't necessarily have a problem (anymore) with it being tied to Microsoft (because of the above). Also, Microsoft can afford to employ 'the best', which is what they indeed do, and which is why C# is what it is today.

What attracts me to D, is the inability to program outside of a class in C#. I think they are trying to find ways to make this happen, but I wouldn't hold my breath.

If only D 'really did' support OOP, as it claims, it would be more useful to me.


February 11, 2023
On Friday, 10 February 2023 at 23:24:11 UTC, thebluepandabear wrote:
>> I think the 'real' problem, is that some core D people just refuse to allow D to provide such an option to the programmer.
>
>
> I think a lot of it has to do with the fact that heaps of D programmers write procedural code and don't care about any object oriented features, that's because they're 'old-school' programmers, whereas OOP is 'new-school'.

OOP is not 'new-school' ..not by any means...

It had a period where it became 'more popular', that is for sure.

Some took it too far, as this has caused some friction, with many languages deciding to rebel against that style.

It is true, that no core D users will advocate anything OOP, that is for sure ;-)

However the language claims to support OOP, so there is some tension when newbies come to D and actually try it out.

I'm not an advocate of any style in particular. I'm happy to use any style that is clear to understand and use, suitable, and can provide reasonable guarantees around memory safety and correctness.

But a language that claims to support OOP but doesn't even have type privacy, is a bit of joke IMO.

February 11, 2023
On Friday, 10 February 2023 at 02:57:42 UTC, zjh wrote:
> On Friday, 10 February 2023 at 02:04:06 UTC, ProtectAndHide wrote:
>
>> "Before practicing Zen, mountains were mountains and rivers were rivers.
>> While practicing Zen, mountains are no longer mountains and rivers are no longer rivers.
>> After realization, mountains are mountains and rivers are rivers again."
>
>
> Chinese proverb, is it very cool?

you'll find this mentioned towards the end of this article:

"The Importance of Being Closed"

https://martinfowler.com/ieeeSoftware/protectedVariation.pdf

February 11, 2023
> That's not entirely correct.
>
> I don't use any Apple hardware products. Never have, and never will.
>
> I use Swift on Linux only.
>
> There are of course some library features of Swift tied to Apple products. But I have no need for those library features.
>
> As a standalone language, Swift can (IMO) already out compete D.

Swift on Linux? Interesting...

what is the use case?
February 11, 2023
> I'm not an advocate of any style in particular. I'm happy to use any style that is clear to understand and use, suitable, and can provide reasonable guarantees around memory safety and correctness.
>
> But a language that claims to support OOP but doesn't even have type privacy, is a bit of joke IMO.

agreed, the current behaviour of `private` is inexcusable, and it's something newcomers need to be warned about.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19