Re: RA with MV attributes

From: Marshall <marshall.spight_at_gmail.com>
Date: 17 Jan 2007 00:17:08 -0800
Message-ID: <1169021828.688928.321020_at_a75g2000cwd.googlegroups.com>


On Jan 16, 6:23 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Marshall wrote:
>
> > I think you will find that *every* language with a ? : operator
> > does not allow the two possible results to have incompatible types.
> How does javascript evaluate the following?
>
> o.left = oX + ( ! fNS4 ? "px" : 0 )
>
> I have seen that a lot recently. The interesting thing--if I read it
> correctly--is the return type of the conditional fundamentally alters
> the preceding operation. ie. string concatenation vs. numeric addition

Yeah; I probably should have said "every *statically typed* language". I don't really do dynamically typed languages; they are too wiggly for my taste. But they are certainly interesting to compare with static typing, especially since the former are inherently more able to express computations that are safe but can't be proven to be safe, and the latter are inherently more able to express constraints.

A related issue I find quite compelling is whether a single language could be designed that would incorporate the best of both, leaving the decision of which one to use in the hands of the programmer, to be made on a case-by-case basis, rather than in the hands of the language designer, who necessarily decides these things for all programmers using his language.

Marshall Received on Wed Jan 17 2007 - 09:17:08 CET

Original text of this message