Re: What is a type error? [correction]

2006-07-18 Thread Darren New
David Hopwood wrote: > Darren New wrote: > >>David Hopwood wrote: >> >> >>>public class LoopInitTest { >>>public static String getString() { return "foo"; } >>> >>>public static void main(String[] args) { &g

Re: What is a type error? [correction]

2006-07-17 Thread Darren New
Darren New wrote: > Now, if the "insert line into inputs" actually unset "line", then yes, > you're right, Hermes would complain about this. Oh, I see. You translated from Hermes into Java, and Java doesn't have the "insert into" statement. I

Re: What is a type error? [correction]

2006-07-17 Thread Darren New
could be made sufficiently intelligent to track most simple versions of this problem and not complain, by carrying around conditionals in the typestate description. -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many tentacles, not enough chops. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-17 Thread Darren New
ither. I think that's where the equality comes into it. -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many tentacles, not enough chops. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-17 Thread Darren New
ded "realtime" constraints to it. -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many tentacles, not enough chops. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-17 Thread Darren New
Chris Smith wrote: > Darren New <[EMAIL PROTECTED]> wrote: > >>I'm not sure what linear or uniqueness typing is. It's typestate, and if >>I remember correctly the papers I read 10 years ago, the folks at >>TJWatson that invented Hermes also invented th

Re: What is a type error?

2006-07-14 Thread Darren New
nowadays complain about uninitialized variables, dead code, etc. But for lots of types of programs, it let you do all kinds of things with a good assurance that they'd work safely and efficiently. It was really a language for writing operating systems in, when you get right down to it. -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many tentacles, not enough chops. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-13 Thread Darren New
;d say x was mutable, with no "identity" problems involved? Why is it problematic that variables have identity and are mutable? Certainly I can later "find" whatever value I put into x. -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many t

Re: What is a type error?

2006-07-13 Thread Darren New
mutability - which is > present in almost all imperative languages I know. :-) I disagree. It's entirely possible to make sophisticated imperitive languages with assignment and without aliasing. -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many

Re: What is a type error?

2006-07-12 Thread Darren New
enerated automatically from a description of the semantics of the input stream and the semantics of the machine the code is to run on. I'm pretty sure we're not there yet, and I'm pretty sure you start running into the limits of computability if you do that. -- Darren New

Re: What is a type error?

2006-07-12 Thread Darren New
generate moves" routine. Precondition: An input board with a valid configuration of chess pieces. Postcondition: An array of boards with possible next moves for the selected team. Heck, if you could write those as assertions, you wouldn't need the code. -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many tentacles, not enough chops. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-11 Thread Darren New
would work. x := read_integer_from_stdin(); write_to_stdout(myarray[x]); What does the programmer have to do to implement this semantic in the sort of language you're talking about? Surely something somewhere along the line has to "fail" (for some meaning of failure) at run-time, yes?

Re: What is a type error?

2006-07-11 Thread Darren New
o. Just not in a way visible to the programmer. The compiler manages to optimize out most places that different names consistantly refer to the same value. [2] There aren't subroutines. Just processes, with their own address space, to which you send and receive messages. -- Darren New

Re: What is a type error?

2006-07-11 Thread Darren New
of postconditions to optimize code or eliminate run-time checks (like null pointer testing). -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many tentacles, not enough chops. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-10 Thread Darren New
the equation there. Sadly, Hermes went the way of the dodo. -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many tentacles, not enough chops. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-10 Thread Darren New
te well if the language takes advantage of it consistantly and allows you to designate your expected typestates and such. -- Darren New / San Diego, CA, USA (PST) This octopus isn't tasty. Too many tentacles, not enough chops. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-26 Thread Darren New
Joachim Durchholz wrote: > That's actually not a design choice It's certainly a choice you can get wrong, as you say. ;-) I mean, if "without runtime safety" is a choice, I expect picking the wrong choice here can be. :-) -- Darren New / San Diego, CA, USA (PST)

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Darren New
, right? gets() is "safe" as long as you don't read more than the buffer you allocated. What's the difference between "safe" and "well-defined semantics"? (Ignoring for the moment things like two threads modifying the same memory at the same time and other

Re: languages with full unicode support

2006-06-25 Thread Darren New
Xah Lee wrote: > If you know a lang that does full unicode support, please let me know. Tcl. You may have to modify the "source" command to get it to default to something other than the system encoding, but this is trivial in Tcl. -- Darren New / San Diego, CA, USA (PST

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Darren New
Marshall wrote: > Also: has subtyping polymorphism or not, has parametric polymorphism or > not. And covariant or contravariant. -- Darren New / San Diego, CA, USA (PST) Native Americans used every part of the buffalo, including the wings. -- http://mail.python.org/m

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Darren New
Dr.Ruud wrote: > You can write self-modifying code in C, No, by violating the standards and invoking undefined behavior, you can write self-modifying code. I wouldn't say you're still "in C" any more, tho. -- Darren New / San Diego, CA, USA (PST) Native Am

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Darren New
uate "type" with what smalltalk calls "protocol" (i.e., the type is the collection of operators applicable to values in the type), these are two different statements. -- Darren New / San Diego, CA, USA (PST) Native Americans used every part of the buffalo, includ

Re: What is a type error?

2006-06-23 Thread Darren New
Eliot Miranda wrote: > classes do _not_ have to inherit from Object, I was unaware of this subtlety. Thanks! -- Darren New / San Diego, CA, USA (PST) Native Americans used every part of the buffalo, including the wings. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Darren New
Marshall wrote: > I can't see how you'd call + on a and b if you think they might > not be numbers. Now substitute "<" for "+" and see if you can make the same argument. :-) -- Darren New / San Diego, CA, USA (PST) Native Americans used every

Re: What is a type error?

2006-06-22 Thread Darren New
nting doesNotUnderstand. -- Darren New / San Diego, CA, USA (PST) Native Americans used every part of the buffalo, including the wings. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-22 Thread Darren New
John W. Kennedy wrote: > 360-family assembler, yes. 8086-family assembler, not so much. And Burroughs B-series, not at all. There was one "ADD" instruction, and it looked at the data in the addresses to determine whether to add ints or floats. :-) -- Darren New / San Diego,

Re: What is Expressiveness in a Computer Language

2006-06-22 Thread Darren New
ng compiles perfectly fine (using GNU Pascal): That'll teach me to rely on 15-year-old memories. :-) Maybe I'm remembering the wishful thinking from when I used Pascal. -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under the Showerin'

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Darren New
. :-) Yah. :-) > (Btw, Pascal did not have it either, AFAIK) I'm pretty sure in Pascal you could say Type Apple = Integer; Orange = Integer; and then vars of type apple and orange were not interchangable. -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under the Showerin' Monks. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Darren New
con? Perl? (Hmmm... Pascal does, IIRC.) I guess you just work with better languages than I do. :-) -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under the Showerin' Monks. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Darren New
gs like usual OO languages (Eiffel, Smalltalk, etc) to have "abstract data types". -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under the Showerin' Monks. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Darren New
a new type that has the exact same underlying representation and isomorphically identical operations but not be the same type is something I find myself often missing in languages. It's nice to be able to say "this integer represents vertical pixel count, and that represents horizont

Re: What is Expressiveness in a Computer Language

2006-06-20 Thread Darren New
clear the difference between a value of (type T) and a value of (type T or one of its subtypes). -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under the Showerin' Monks. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-20 Thread Darren New
Rob Thorpe wrote: > Darren New wrote: >>Rob Thorpe wrote: >>>The values themselves have no type information associated with them. >>int x = (int) (20.5 / 3); > In that case it knew because it could see at compile time. Well, yes. That's the point of static typing.

Re: What is Expressiveness in a Computer Language

2006-06-20 Thread Darren New
it doesn't. int x = (int) 20.5; There's no point at which bits from the floating point representation appear in the variable x. int * x = (int *) 0; There's nothing that indicates all the bits of "x" are zero, and indeed in some hardware configurations they aren't. -

Re: What is Expressiveness in a Computer Language

2006-06-20 Thread Darren New
to strings. How could this be determined at compile time if "hello" and "there" don't have types? -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under the Showerin' Monks. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Darren New
example of a heterogenous list that would be awkward in a statically strongly-typed language. The arguments to printf() count, methinks. What would the second argument to apply be if the first argument is printf (since I'm reading this in the LISP group)? -- Darren New / San Di

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Darren New
; or some such. Second, what's the type of the argument that printf, sprintf, fprintf, kprintf, etc all pass to the subroutine that actually does the formatting? (Called vprintf, I think?) -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under t

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Darren New
Joachim Durchholz wrote: > Give a heterogenous list that would to too awkward to live in a > statically-typed language. Printf()? -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under the Showerin' Monks. -- http://mail.python.org/mailm

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Darren New
's useful. See the Tcl "unknown" proc, used for interactive command expansion, dynamic loading of code on demand, etc. -- Darren New / San Diego, CA, USA (PST) My Bath Fu is strong, as I have studied under the Showerin' Monks. -- http://mail.python.org/mailman/listinfo/python-list