Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^6: (OT) "Learn one new language every year"? Yeah, right.

by fergal (Chaplain)
on Oct 09, 2004 at 15:01 UTC ( [id://397871]=note: print w/replies, xml ) Need Help??


in reply to Re^5: (OT) "Learn one new language every year"? Yeah, right.
in thread (OT) "Learn one new language every year"? Yeah, right.

It seems to me that he is singing the praises of lanagues which are (according to your definitions) both strongly typed and statically typed.

His Spectacular Example shows ML detecting an infinite loop at compile time (ie statically) but ML's fancy static type system wouldn't be much better than Java's if it wasn't also strong (that would essentially be Java + type inference, allowing you to cut out lots of declarations but still leaving you open to run time type errors). Strong without static would be Perl and that talk is definitely not a celebration of Perl's type system.

The definitions are controversial and somewhere (possibily in that or another MJD talk) there's a list of about 8 conflicting definition for various kinds of typing but in that talk, on this page he says "static" and "strong" typing are the same.

If you really want to make a distinction you could take "strong" to mean that conversions (casts) are impossible and "static" to mean that types are determined at compile time. Then, if you want to say that Java really is statically typed you should probably make it clear that you mean that "types are determined at compile time but might have been determined incorrectly". Come to think of it, that's a great definition, it makes it clear just how badly Java, C, and C++'s type systems suck.

Maybe we should call Java a "hopefully typed" language :-).

  • Comment on Re^6: (OT) "Learn one new language every year"? Yeah, right.

Replies are listed 'Best First'.
Re^7: (OT) "Learn one new language every year"? Yeah, right.
by revdiablo (Prior) on Oct 09, 2004 at 18:53 UTC
    The definitions are controversial and somewhere (possibily in that or another MJD talk) there's a list of about 8 conflicting definition for various kinds of typing

    I would like to see this list. In my mind, the basic definitions are fairly straightforward, though there are many people who muddle them together. Just think about the words themselves: "strong" and "static." Strong typing imparts strength (as opposed to weakness) to the type system, and static typing imparts staticness (as opposed to dynamism).

    on this page he says "static" and "strong" typing are the same

    I think that page is saying that FORTRAN's type system is both static and strong. He doesn't talk a whole lot about a distinction between strong and static typing, but if you look at the talk notes, he does say, "contrary to what you might think, Pascal is not a strongly typed language, but a weakly typed one." This is after he has described it as statically typed. So he too seems to draw a distinction between the two.

    you could take "strong" to mean that conversions (casts) are impossible and "static" to mean that types are determined at compile time

    That is the definition of static I would use, but I'm not so sure about the definition of strong. That is too tied to a particular concept (i.e. casts) for me. I still like my earlier definition, "strong typing means you cannot easily convert between data types," but I know it's not perfect. Obviously, people will bicker endlessly about specific details of specific type systems, but I think the general idea is pretty simple to understand.

      Funilly enough, no sooner had I typed "I can't find the list" than I found it! Near the top of this, starts with "I did just a little research a few months ago". At the end of the list Dominus says "I no longer use the phrases 'strongly typed' or 'strong typing'." So I guess I shouldn't have pointed to his definitions!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://397871]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2024-04-18 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found