Re: Digital Twin applied to Software
andre <[email protected]> Sat, 5 Nov 2022 12:56:53 +0100
| Newsgroups | gmane.comp.lang.smalltalk.vwnc |
|---|---|
| Message-ID | <[email protected]> |
I like the idea of bridging Smalltalk with C++. I am using both for decades. Smalltalk and C++ however have very little in common. While porting is possible, there is no straightforward mapping between the languages, neither syntactically nor semantically. They do not even serve the same purpose. Smalltalk is great for incremental in-house development, prototyping and exploration. That's where its productivity advantage really shines. C++ is great for systems programming and mass deployment of end user products. Downside is you need to have a clear architecture and a plan before you start. C++ isn't only about speed. Its main benefits are encapsulation, type safety, transitive immutability, paradigms like construction/destruction, RAII and multiple inheritance. Type mistakes and DNU/MNU are caught at compile time, which makes sweeping changes to large existing systems safer and easier: If it compiles, you know you didn't forget something. Encapsulation and immutability ensure you don't start building stuff that won't work further down the road. Thanks to constructor/destructor logic, broken or half-baked objects can't even exist. All this gives piece of mind when you deploy to a huge user base. Smalltalk doesn't need this level of control, as it would impede its dynamic strengths and comfortable development. In small B2B environments, DNU/MNU can be fixed without making much noise. The ideal case for using both languages together might be to explore uncharted terrain with Smalltalk and port to C++ after a sound architecture has settled. For most in-house and incremental projects, this point may never come, or the benefits of C++ would not add much value. It really depends on the nature of a project. Just my 2 ct. Andre