Re: Digital Twin applied to Software

Niall Ross <[email protected]> Tue, 6 Dec 2022 17:25:55 +0000
Newsgroups gmane.comp.lang.smalltalk.vwnc
Organization Cincom
Message-ID <[email protected]>
Dear Andre,
     as you say, with strong typing, you get items

> that are impossible to combine in ways not intended and supported by the.
> designers. _This_ _limits_ _creativity_ but makes sure the final 
thing sticks together.

It imposes a tax on refactoring.  My opinion and experience, FWIW, is 
that the cost of this tax on creativity much outweighs the benefits of 
the kind of issues that strong typing catches. Since a large system 
needs changing now (because it hasn't been got quite right, -because it 
is large and built to a timescale) and will need changing later (because 
the world it is trying to manage is changing), my experience is that 
this tax on refactoring (i.e. this limit on creativity) costs too much.  
It is literally true that

> every issue that can be caught at compile time lowers
> the burden of changing and maintaining large systems

but imposing such a cost on change to find these issues typically 
swallows up the benefits of finding them.

However YMMV.  Am I right (or am I completely misremembering) in 
guessing that you develop and maintain a large music-related system that 
must often speak to non-Smalltalk drivers / systems / whatever that are 
themselves actively evolving?  Could that be an influence on your 
impression of the creativity / typing cost-benefit relationship?

                 Just my 0.02p FWIW
                         Niall Ross

On 05/12/2022 14:14, andre wrote:
> Eliot,
>
> I didn't mean to start a flame war. I'm as passionate a Smalltalker as probably everyone on the list. And Smalltalk is my platform of choice for many reasons. My point is that C++ has a lot of powerful things to offer that Smalltalk can't do and vice versa. And since the topic is Digital Twin, it's worth pointing out the differences.
>
> The only issues I am still encountering with Smalltalk after 30 years are of the kind that could be caught at compile time with strong typing. So maybe I'm biased.
>
> I agree with what you say about teams and culture. The challenges of safely refactoring and maintaining a complex system however don't go away for a single developer either, no matter how experienced and disciplined they are.
>
> Fact is, every issue that can be caught at compile time lowers the burden of changing and maintaining large systems.
>
> Think LEGO (this modern LEGO that actually no longer resembles blocks). With C++ you get LEGO items that are impossible to combine in ways not intended and supported by the designers. This limits creativity but makes sure the final thing sticks together.
>
>> we don’t have the analysis tools to identify inconsistency of duplication
>
> Eliminating duplication with tools was not my point. It was that Smalltalk doesn't enforce almost anything (typing, interfaces, mutability, etc). So, because it is convenient, developers feel encouraged to add new things on top and in between instead of streamlining and refactoring an existing system. They don't want to risk silently breaking things and losing backwards compatibility.
>
> Breaking things with sweeping changes is not that much a creeping issue with C++, because incompatible code won't compile until you have worked your way through the required changes, one compiler error message at a time. This doesn't eliminate semantic errors, but at least the LEGO blocks fit. And yes, this is a big deal if you have to maintain thousands of classes with limited human resources.
>
>> Tests run automatically
>
> Writing the tests and making sure they are complete is the burden, not running them. Tests also can't prevent developers from accidentally passing the wrong type of argument, or a new method from returning an unexpected type of object. Systems can and do break between the tested modules, not only within. Many things also cannot be tested in advance, especially user behavior and UI.
>
>> I’m using 2017
>
> Using the compiler is one thing. Leveraging new language capabilities to facilitate more abstraction, safety and readability requires wide ranging changes to existing code that most developers usually avoid (or are not paid for).
>
> Why did StrongTalk never gain tracktion, by the way?
> Does Smalltalk/X still compile to C/C++ ?
>
>


-- 
This email has been checked for viruses by AVG antivirus software.
https://urldefense.com/v3/__http://www.avg.com__;!!DZ3fjg!8eq0tedXFESxp_LBHxYaRuLv100N99hsbpp0cFeN4nKCf02pjB4z-0dXaUDU4jLOSupSHPfKvBF2nEWuZsU$