Wed Oct 17 - Avoiding Code Smells by Walter Bright

myCodeDontSmell myCodeDontSmell at gmail.com
Wed Oct 31 05:00:12 UTC 2018


On Friday, 19 October 2018 at 03:53:12 UTC, Walter Bright wrote:
>
> Had a nice crowd there last night. Apparently lots of people 
> were interested in this topic!
>
> Video: 
> https://www.youtube.com/watch?v=lbp6vwdnE0k&feature=youtu.be


Interesting talk. Thanks for the link.

I did find it confusing however, that you discuss leaky 
abstractions, and putting your public interface at the beginning 
of your code (and all the other crap below it)... but then, in D, 
once your write your abstraction, say a class, with it's public 
interface, all the code below it can do whatever it likes to that 
class, making it a leaky abstraction.

That's sure sound like code smell to me.

i.e. A class (perhaps one of the most important abstractions in 
programming) within a module, is *always* a leaky abstraction 
(within the module), because of the way the code further down can 
just ignore the interface. In fact, there is no way at all to 
ensure code below the class uses that interface.

So I can't help but see contradictions everywhere, in D.



More information about the Digitalmars-d-announce mailing list