Re: Non-ugly ways to implement a 'static' class or namespace?

2023-02-17 Thread RTM via Digitalmars-d-learn
On Saturday, 18 February 2023 at 06:55:49 UTC, ProtectAndHide wrote: More likely is comes from my experience .. otherwise I wouldn't be surprised ;-) Now that's a screaming sign: https://media.licdn.com/dms/image/C4D12AQEymZALzWVDXQ/article-cover_image-shrink_600_2000/0/1629008577928?e=21474

Re: Non-ugly ways to implement a 'static' class or namespace?

2023-02-17 Thread RTM via Digitalmars-d-learn
Funny, seems I have old news: Rust adopted D-like module visibility. https://doc.rust-lang.org/reference/visibility-and-privacy.html pub(in path), pub(crate), pub(super), and pub(self) In addition to public and private, Rust allows users to declare an item as visible only within a given scope

Re: Non-ugly ways to implement a 'static' class or namespace?

2023-02-17 Thread RTM via Digitalmars-d-learn
On Friday, 17 February 2023 at 06:56:08 UTC, ProtectAndHide wrote: What is 'Object-Oriented Programming'? (1991 revised version) Bjarne Stroustrup https://www.stroustrup.com/whatis.pdf Thirty years passed since. Lessons were learned. Out of three PLs of the newer generation (Rust, Swift, Go

Re: Non-ugly ways to implement a 'static' class or namespace?

2023-02-16 Thread RTM via Digitalmars-d-learn
Data hiding is overrated. Furthermore, OOP is overrated :-) https://betterprogramming.pub/object-oriented-programming-the-trillion-dollar-disaster-92a4b666c7c7

Re: Non-ugly ways to implement a 'static' class or namespace?

2023-02-16 Thread RTM via Digitalmars-d-learn
On Thursday, 16 February 2023 at 20:56:00 UTC, ProtectAndHide wrote: Both the module type, and the class type need this capability. No, they are not. Look at Go.

Re: Non-ugly ways to implement a 'static' class or namespace?

2023-01-30 Thread RTM via Digitalmars-d-learn
On Monday, 30 January 2023 at 08:20:21 UTC, ProtectAndHide wrote: But there is always 'an ugly way' to do it too: http://www.cs.rit.edu/~ats/books/ooc.pdf Yep, but it’s not OOP per se, just a form of lowering. First CPP implementation was a cross-compiled one.

Re: Non-ugly ways to implement a 'static' class or namespace?

2023-01-29 Thread RTM via Digitalmars-d-learn
On Saturday, 28 January 2023 at 23:19:35 UTC, ProtectAndHide wrote: That is, you can do OOP without classes How so? Every OOP definition includes classes (encapsulation + inheritance).

Re: [Win32 API] MessageBox Example without MSVCR120.dll dependency

2022-12-25 Thread RTM via Digitalmars-d-learn
On Sunday, 25 December 2022 at 18:30:12 UTC, BoQsc wrote: This is a working Hello World example without dependency on Microsoft C Runtime Library, I couldn't find anything by searching around the forums or search engines, so I'm posting it here. Please provide improvements if you feel like some