Hi, To clarify my understanding, I created this table | | weak | strong | |---------+------+---------| | dynamic | perl | Ruby | | static | C | Haskell | |---------+------+---------| Could someone please ratify this? Regards, Kashyap
01.08.2011 17:52, C K Kashyap kirjutas:
Hi, To clarify my understanding, I created this table
| | weak | strong | |---------+------+---------| | dynamic | perl | Ruby | | static | C | Haskell | |---------+------+---------|
Yes, though I'm not sure you could call Ruby's types "strong" either; it doesn't really have types in a such a defined sense (objects have classes, but that's not a "type" as such). I'm not qualified to comment on perl either.
On 1 Aug 2011, at 09:53, Arlen Cuss wrote:
01.08.2011 17:52, C K Kashyap kirjutas:
Hi, To clarify my understanding, I created this table
| | weak | strong | |---------+------+---------| | dynamic | perl | Ruby | | static | C | Haskell | |---------+------+---------|
Yes, though I'm not sure you could call Ruby's types "strong" either; it doesn't really have types in a such a defined sense (objects have classes, but that's not a "type" as such).
I'm not qualified to comment on perl either.
Which really highlights that strong/weak is not a binary thing. There's not even a sliding scale, but instead, simply different properties. For example, Javascript will happily let you compare "0" with 0. C won't let you do that, but it will let you treat an integer as a pointer and vice versa. Bob
On 1 Aug 2011, at 09:53, Arlen Cuss wrote:
01.08.2011 17:52, C K Kashyap kirjutas:
Hi, To clarify my understanding, I created this table
| | weak | strong | |---------+------+---------| | dynamic | perl | Ruby | | static | C | Haskell | |---------+------+---------|
Yes, though I'm not sure you could call Ruby's types "strong" either; it doesn't really have types in a such a defined sense (objects have classes, but that's not a "type" as such).
I'm not qualified to comment on perl either.
Which really highlights that strong/weak is not a binary thing. There's not even a sliding scale, but instead, simply different properties. For example, Javascript will happily let you compare "0" with 0. C won't let you do that, but it will let you treat an integer as a pointer and vice versa. Bob
On Mon, Aug 1, 2011 at 12:52 AM, C K Kashyap <ckkashyap@gmail.com> wrote:
Hi, To clarify my understanding, I created this table
| | weak | strong | |---------+------+---------| | dynamic | perl | Ruby | | static | C | Haskell | |---------+------+---------|
Could someone please ratify this?
Static vs. dynamic typing is pretty well always understood to mean compile time vs. run time type checking, so you've got that one. On the other hand, there's no widely accepted definition of strong vs. weak typing. So I'm pretty sure there's at least one definition for which you're right. Both C and Ruby fit definitions for both strong and weak typing, and there are probably definitions that have them swap places. Perl and Haskell may always be considered weakly and strongly typed (respectively), but I wouldn't bet on it. <mike
participants (4)
-
Arlen Cuss -
C K Kashyap -
Mike Meyer -
Thomas Davie