I agree with Eric that some future programming environments will probably provide and encourage optional types + type inference. This doesn't necessarily contrast with late dynamic binding à la Smalltalk.

If types are an entangled part of the language, like in virtually any statically typed programming language, it's hard to evolve them while maintaining backward compatibility with older code. This is one reason why a type system is perhaps best defined as an additional, optional component of a development environment. It is then up to the programmer to choose whether to use types and at which stage. Besides, optional pluggable type systems can evolve independently and perhaps even cohabit with others at the same time.

With a sensible blend between type annotations and inference and between the language core and and a pluggable typing system, types should almost never hurt, while providing more benefits than costs. Sure, it all depends on how deeply they are enforced at all levels and phases of programming and how they are used. No doubts that in a complex and pervasive typing system as in C++, they are a real pain during the early phases of development and a burden at later stages, and make it harder to evolve software.

When types are perceived simply as a means, not an end, they provide a really useful and well exploitable tool.

Greetings
Raffaello




On 2017-05-09 16:17, Eric Velten de Melo wrote:
I think he forgets to mention Haskell, which is probably the reason behind the shift of Swift towards optional values (Option type in Scala, Maybe type in Haskell). You can't talk about modern type system without talking about Haskell, Monads and Algebraic Data Types (Maybe is a monad).

I don't believe the future is dynamic typing, I believe it is type inference and optional typing. There is no need to be radical about it. One great sadly forgotten example of this is Strongtalk, which was rumored to be the fastest implementation of Smalltalk ever made (I don't know how it compares to the latest Pharo VM, though) and included an optional strong type system (http://www.strongtalk.org/). Strongtalk team was bought by Sun before they could release the language and their advancements in virtual machine development were taken by the Java Virtual Machine. It is one of my dreams to see Strongtalk back into action or maybe a version of Self with optional typing, but I unfortunately lack the required skills and time to do so.

2017-05-09 10:26 GMT-03:00 Ben Coman <b...@openinworld.com <mailto:b...@openinworld.com>>:

    Fantastic article.  Very well rounded.  I particularly liked
    "Meanwhile the Smalltalk programmers were scratching their heads
    wondering what the big deal was. You see, their language was also
    strongly typed; but their types were undeclared. In Smalltalk
    types were enforced at runtime."

    and..."You see, the Smalltalk programmers had solved the missile
    problem in their own unique way. They invented a discipline. Today
    we call that discipline: Test Driven Development. ...  You see,
    when a Java programmer gets used to TDD, they start asking
    themselves a very important question: “Why am I wasting time
    satisfying the type constraints of Java when my unit tests are
    already checking everything?”

    cheers -ben

    On Tue, May 9, 2017 at 2:49 PM, askoh <as...@askoh.com
    <mailto:as...@askoh.com>> wrote:

        This is a quote from Bob Martin of "Clean Code" fame. Enjoy,
        Aik-Siong Koh

        http://blog.cleancoder.com/uncle-bob/2016/05/01/TypeWars.html
        <http://blog.cleancoder.com/uncle-bob/2016/05/01/TypeWars.html>



        --
        View this message in context:
        
http://forum.world.st/Smalltalkers-will-eventually-win-So-says-this-old-C-programmer-tp4945895.html
        
<http://forum.world.st/Smalltalkers-will-eventually-win-So-says-this-old-C-programmer-tp4945895.html>
        Sent from the Pharo Smalltalk Users mailing list archive at
        Nabble.com.




Reply via email to