Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Here's another controversial one:

        Static typing without type inference

    If you're going to make a new language, please make a type-inferring version of C. kthxbye
    • Could you give an example of a language which avoids this regret?
      • Haskell's static typing does pretty good inferencing.

        $ ghci
        Prelude> let sq x = x * x
        Prelude> :type sq
        sq :: forall a. (Num a) => a -> a

        That is, the function sq is defined for all values a, such that a is an instance of the type class Num. Remember, Haskell is strongly typed, and this function is defined on all kinds of numbers (machine integers, bignums, floats, doubles, complex, etc.). Furthermore, it will be defined on all types you define that are also instances of Num.

        This is a contrive

      • Statically typed type-inferring languages include ML [wikipedia.org] variants (SML [wikipedia.org] and OCaml [wikipedia.org] being the most common), as well as Haskell [wikipedia.org] and Clean [wikipedia.org].

        All of these have entries posted at the shootout [debian.org].

        None of these languages are suitable for low-level programming (kernels, databases, etc.), which is why we need a type-inferring version of something more like C.