[M3devel] in favor of mixed operators..
hendrik at topoi.pooq.com
hendrik at topoi.pooq.com
Mon Jan 18 03:21:35 CET 2010
On Sun, Jan 17, 2010 at 05:58:33PM -0800, Mika Nystrom wrote:
>
> Jay I think the following paragraph is important and demonstrates why
> this article is perhaps less relevant to Modula-3:
>
> When you write a function implementing a numeric algorithm (for example,
> calculating the phase of the moon) you typically expect the arguments
> to be specified as floating point numbers. However, since Python doesnt
> have type declarations, nothing is there to stop a caller from providing
> you with integer arguments. In a statically typed language, like C,
> the compiler will coerce the arguments to floats, but Python does no
> such thing the algorithm is run with integer values until the wonders
> of mixed-mode arithmetic produce intermediate results that are floats.
>
> Mika
>
> Jay K writes:
> >--_671e4a34-689a-4d86-98d3-1f8935f7844b_
> >Content-Type: text/plain; charset="iso-8859-1"
> >Content-Transfer-Encoding: quoted-printable
> >
> >
> >http://python-history.blogspot.com/2009/03/problem-with-integer-division.ht=
> >ml
> >
> >
> >He argues that for a "high level" language=2C of course
He identifies python as a high-level language. His arguments about what
a high-level language should do are based on python's absence of static
typing. Thus he comes to his conclusion, having identified the concept
of "high level" with "no static typing". Presumably he thinls that
types are an inconvenience inflicted by the desire for run-time
efficiency. Many people believe this, failing entirely to notice that
static typing is a powerful tool in the pursuit of correctness.
-- hendrik
More information about the M3devel
mailing list