[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple of questions about goops method parameters

From: Panicz Maciej Godek
Subject: Re: A couple of questions about goops method parameters
Date: Sun, 7 Sep 2014 01:46:07 +0200

2014-09-06 13:27 GMT+02:00 Marko Rauhamaa <address@hidden>:
> Panicz Maciej Godek <address@hidden>:
>> However, I'd rather say that the lack of any type system in Guile is
>> an inconvinience, because static type checking allows to avoid a huge
>> class of software errors, and a good type system (like the one in
>> Haskell) actually enhances language's expressiveness.
> We already have a satisfactory selection of languages with static type
> annotation. The primary upside of static types is much faster code. The
> downside is boilerplate and clutter that make it a huge chore to write
> and maintain the code.

Taylan already wrote a few remarks on that statement. Obviously, when
you're talking about statically typed languages, you mean C, Pascal,
and its derivatives. However, you're mistaken. Haskell or ML are also
statically typed, but because of type inference, they do not introduce
any boilerplate nor clutter.

The fact that C compiler performs static type checking has nothing to
do with its performance. It's only about detecting type errors. So for
example if you have code like:

short f();

long g() {
  return f();

the compiler will generate an error. An alternative would be to
compile according to specification and let the user worry about the
problems caused by type mismatch (and I think that this is what the
early C compilers were doing)

> In my experience, high-level programming
> languages allow you to accomplish more challenging feats with better
> quality and productivity than statically typed languages.

In addition to Taylan's remark, my experience is that in large
programs it's very easy to make a type error, and it may take some
time for that bug to manifest, and because of that latency such bugs
become more confusing and harder to trace. Furthermore, having type
signatures often make complex programs easier to read.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]