in reply to Re: Static typing is mostly a waste of time
in thread Static typing is mostly a waste of time

So is assembly language strongly/statically typed?
The Assembly language type system is both static and very strong. It just contains only one type - bytes. (And octets, but no-one uses them anymore.)

Now, the big reply is "But bytes can be strings and numbers and Assembly language implicitly converts between them." Yes, it does. However, look at it this way - there is a type called bytes. There are dozens of operators that work on bytes. Some of them work with the bytes one way and some work with it another way. The fact they treat the bytes differently is both consistent and documented. It doesn't change the fact that it's still a byte and it was typed as a byte at compile time and it will never change what it is. Static and strong typing.

  • Comment on Re^2: Static typing is mostly a waste of time

Replies are listed 'Best First'.
Re^3: Static typing is mostly a waste of time
by dragonchild (Archbishop) on Apr 13, 2005 at 12:48 UTC
    A type system with just one type is both static and strong. It's just not very useful as a type system.
      But by the definition above, doesn't every language qualify as statically/strongly typed? Couldn't we have used tcl, or fortran or basic in the example above and come to the exact same conclusion? Doesn't the term "statically/strongly typed" loose its meaning if *every* language meets the criteria? Can you give us an example of a language that's not statically/strongly typed?
        C. It's statically and weakly typed. The weak part comes from the fact that you can convert from one type to another with no problem. If you only have one type, it cannot be converted to another type, and is thus a strongly typed system. Personally, I think the static/dynamic difference is a bunch of crap. Every language has a set of static types. The big problem is that people think that strings and numbers are necessarily different types when languages like Perl obviously demonstrate that they're not.