News for hackers. Stuff that matters.
Re:Advanced programming languages by DrSprout on Monday May 24, 2010 @11:40AM (#1374868)
>[Scheme is] untyped, which makes it ideal for web-based programming and rapid prototyping.

Erm... While Scheme can be useful for web and prototyping, it is typed. That's why R5RS requires functions like number->string and so on.

Re:Advanced programming languages by ekiru on Monday May 24, 2010 @11:54AM (#1374900)
Some people use "type" exclusively to refer to compile-time entities. By this definition, languages that are commonly referred to as "dynamically-typed" are actually "untyped", because they have only one compile-time type, which is essentially the same as having no types.
Re:Advanced programming languages by silentbicycle on Monday May 24, 2010 @12:28PM (#1374990)
That's confusing weak/strong with static/dynamic typing, though. (A common error.)

"What To Know Before Debating Type Systems" (http://www.pphsg.org/cdsmith/types.html) is a pretty good introduction to types.

Also, while I'm only partway through Benjamin Pierce's _Types and Programming Languages_, it's been quite good so far.

Re:Advanced programming languages by ekiru on Monday May 24, 2010 @03:12PM (#1375427)
Actually, your link agrees with my explanation:

It points out in the "Static and Dynamic Types" section that what is meant by "type" in static type-systems and what is meant by "type" in dynamic type-systems are two very different concepts. From the perspective of someone interested in static "types", dynamically-typed languages don't have types at all.

Re:Advanced programming languages by Zaak on Monday May 24, 2010 @01:52PM (#1375228)
Specifically, this is the definition used in Computer Science research. Unfortunately, the communication between that community and the larger community of programmers is so poor that it was several years after I finished my CS bachelor's degree before I figured out why some people insisted that languages like Python were "untyped".
Re:Advanced programming languages by DrSprout on Monday May 24, 2010 @02:38PM (#1375353)
It's rather semantic, but I would differentiate typed from untyped by type checking vs. type being an inherent property of a variable.

So you have something in Scheme like:

     (define foo 1)
     (define bar "1")
And that is typed, the former being a number, the latter a string. If you try to subsequently do:

     (+ foo bar)
the program will error out.

Contrast this with what I would consider an untyped language like Python or Perl, where the translation from string to number is done without any warnings showing up.

Re:Advanced programming languages by xi on Monday May 24, 2010 @03:20PM (#1375447)
Python is as strongly typed as Scheme; 1+"1" will produce an exception in Python.
Re:Advanced programming languages by DrSprout on Monday May 24, 2010 @08:37PM (#1376093)
Thanks. Point stands on Perl. Also... BASIC, among others.
Re:Advanced programming languages by baddox on Monday May 24, 2010 @01:47PM (#1375204)
What exactly does "typed" mean? Clearly there's a difference (in every language I know of) between True and 3.5 (boolean vs. float). Unless the language treats all memory locations equally and doesn't know anything about a memory location other than its pattern of 0's and 1's, I would consider the language "typed."
Re:Advanced programming languages by Zaak on Monday May 24, 2010 @01:56PM (#1375245)
What "typed" means depends on who you're talking to. There's the definition used in CS research papers, and the definition that programmers actually use.

Very few languages lack a strong notion of run-time type. C and friends are the only ones I can think of where you can treat a block of memory as more than one type without the compiler or runtime throwing a fit.