The Artima Developer Community
Sponsored Link

Weblogs Forum
Authors and Computer Scientists Scared of Definitions?

53 replies on 4 pages. Most recent reply: Sep 15, 2006 11:09 AM by Mumtaz Shah

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 53 replies on 4 pages [ « | 1 2 3 4 | » ]
James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 8:55 AM
Reply to this message Reply
Advertisement
> > > > "A type is any property of a program that we can
> > > > establish without executing the program."
> > >
> > > I know it's subjective but that looks like a pretty
> > > concise definition to me.
> >
> > Doesn't that depend on how you define 'property'? I
> would
> > say 'halts' is a property of an application that can be
> > determined without executing the program.
>
> Yes, it is a very inclusive definition, possibly too
> inclusive. So, as you've pointed out, you could
> legitimately say that there are two types of program,
> those that halt and those that don't. I think that that's
> a valid interpretation of the definition. A useful
> interpretation? I couldn't say.

The point that I am attemping to make is that the definition in question essentially avoids defining anything. It uses a word that depends on the reader's interpretation. In that way the word 'property' just becomes a proxy (albeit refined slightly) for the term 'type'.

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Clue Posted: Sep 8, 2006 9:05 AM
Reply to this message Reply
> A type is something that is defined by a type system.
> Every type system defines its own notion of type. There
> e is no formal definition of type outside of a type system.

What about the Principia Mathematica? Check out my latest blog post http://www.artima.com/weblogs/viewpost.jsp?thread=175561

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 9:07 AM
Reply to this message Reply
> The point that I am attemping to make is that the
> definition in question essentially avoids defining
> anything. It uses a word that depends on the reader's
> interpretation. In that way the word 'property' just
> becomes a proxy (albeit refined slightly) for the term
> 'type'.

Yes I completely agree. A definition is supposed to leave little or no room for interpretation, otherwise its just hand-waving.

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 9:15 AM
Reply to this message Reply
> I find 'int' is not really a type. What is it? A number,
> ok? But what is it used for? Is it a distance, pixels,
> socket number, etc? If that were also defined, then it'd
> be more of a true type, IMNSHO. Classes don't qualify
> because the members don't tell anything to the compiler.
> You can overload operators, but it's an ad-hoc solution.

I agree with the sentiment of your statement.

I would state the problem as being the widespread lack of usage of sufficiently precise types. The notion of int in most languages is quite clearly a type, however it is used excessively. I firmly believe that if a programmer is using an integer to represent a measurement, or an identifier, then they should define a new type.

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 9:25 AM
Reply to this message Reply
> Your outrage is starting to seem a little whimsical -
> perhaps the author judged that someone picking up a
> heavy-weight expensive tome titled "Types and Programming
> Languages" would have some notion what was meant both by
> "Types" and by "Programming Languages".

Just having some notion is insufficient. My point is that virtually no one ever defines these things. Every programmer has some notion of every computer science concept, and believes their notion to be complete and accurate.

If my 1000 posts here at Artima have taught me anything it is sadly that there is a serious hole in computer science education. We have many many smart people in the field of software development, but in general most people don't have clear and accurate definitions of basic concepts. This makes rational discourse very hard.

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 9:31 AM
Reply to this message Reply
> When I read through the book, I didn't notice the lack of
> a definition for what a "type" is. Examples are often
> much more illuminating than examples and I think that a
> rigorous definition at the beginning of the book would not
> have been useful. The book's structure seemed, to me,
> well optimized for education.

Examples are insufficient for education. That is the fundamental problem: someone sees an example, they think they understand the concept in full, and then they go on to publish or teach some gobbledegook. Afterwards I have to read programmers saying things like "a type is a sequence of bits".

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 10:40 AM
Reply to this message Reply
> If my 1000 posts here at Artima have taught me anything it
> is sadly that there is a serious hole in computer science
> education. We have many many smart people in the field of
> software development, but in general most people don't
> have clear and accurate definitions of basic concepts.
> This makes rational discourse very hard.

I agree. Do you imagine we have to get on the kind of footing that mathematics has? If so, what we are really talking about is finding the axioms of computer science, is it not?

What about computational theory? I would imagine that at least some of these things have been rigourously defined.

Terje Slettebø

Posts: 205
Nickname: tslettebo
Registered: Jun, 2004

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 11:11 AM
Reply to this message Reply
> I think a type is the interpretation of data. By
> interpretation, I mean how the data in question is to be
> used along with what operations are valid on it.
>
> I find 'int' is not really a type. What is it? A number,
> ok? But what is it used for?

Above, you said: "I mean how the data in question is to be
used along with what operations are valid on it."

"int" is a representation of integral numbers. The operations on it loosely matches those you may do in mathematics on integral numbers.

I think describes it as a type, just fine: It's a type that may be used to model integral numbers.

> Is it a distance, pixels, socket number, etc?

Those are different concepts, and typically better modelled by separate types.

> If that were also defined, then it'd
> be more of a true type, IMNSHO. Classes don't qualify
> because the members don't tell anything to the compiler.

Huh? Classes tell the compiler what operations may be possible on them, and their results, if any. In other words, how values of a given class may be used.

> You can overload operators, but it's an ad-hoc solution.

Why is that an ad-hoc solution, and solution to what?

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 11:14 AM
Reply to this message Reply
Christopher Diggins wrote
> Just having some notion is insufficient. My point is that
> virtually no one ever defines these things. Every
> programmer has some notion of every computer science
> concept, and believes their notion to be complete and
> accurate.

My impression is that you found having some notion sufficient for "Programming Language" but not for "Types".

Perhaps what "Programming Language" has meant over the years has been fairly stable, while what "Types" has meant over the years has both changed with the development of new type systems and varied with context (different language communities have used "Types" to mean different things).

Perhaps "Types" really doesn't mean much without context, and that context is given by a specific type system.

(I've never read Benjamin Pierce's book so I'm relying completely on your experience.) Did you have specific problems understanding something in the book, which may have been easier to understand given some definition of "Types"?

[ Incidentally, I don't think every programmer is so arrogant that they believe their notions to be complete and accurate - some of them must have grown up :-) ]



> If my 1000 posts here at Artima have taught me anything it
> is sadly that there is a serious hole in computer science
> education. We have many many smart people in the field of
> software development, but in general most people don't
> have clear and accurate definitions of basic concepts.
> This makes rational discourse very hard.

Terje Slettebø

Posts: 205
Nickname: tslettebo
Registered: Jun, 2004

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 11:35 AM
Reply to this message Reply
> > > "A type is any property of a program that we can
> > > establish without executing the program."
> >
> > I know it's subjective but that looks like a pretty
> > concise definition to me.
>
> Doesn't that depend on how you define 'property'? I would
> say 'halts' is a property of an application that can be
> determined without executing the program.

A general solution to the halting problem may not exist, but for a program using a dependent type system, it might actually be possible to prove: :)

From "Dependent Types for Program Termination Verification" (http://cs-www.bu.edu/~hwxi/academic/papers/lics01.pdf):

"We design a type system that enables the programmer to supply metrics for verifying program termination and prove that every well-typed program in this type system is terminating."

Leo Lipelis

Posts: 111
Nickname: aeoo
Registered: Apr, 2006

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 11:53 AM
Reply to this message Reply
Christopher,

This is a problem in every field, and not just computer science.

Generally people suffer from mindlessness, arrogance and stupor. That means, they are not mindful of their audience. They are arrogant because they assume that what they are talking about is obvious to all. They are stupefied because they don't even notice these afflictions.

Further, some people do this semi-consciously and even derive a type of pleasure from this condition. They don't even want to be understood. They think that if others don't understand what they are talking about it makes them smart and it makes others dumb.

A lot of these books are also written with ulterior motives, for example, "because I must be a published author", or "to make money" or "because I think there is a need for such book" and so on. The only valid reason, in my mind, to write a book is "I love this topic, and I love sharing what I know". Unfortunately in many cases the books get written for all kinds of reasons other than the right ones, and the result of this is obvious -- the books manifest intent of their authors. If the author doesn't intend to share anything and has no real love of sharing, it will come out in the book.

The vast majority of manuals that I've seen (ever, in any field) are utter crap for this very reason. It's only very rarely that you read an "aha" book that makes things clear and enlightening.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 1:47 PM
Reply to this message Reply
> > > > "A type is any property of a program that we can
> > > > establish without executing the program."
> > >
> > > I know it's subjective but that looks like a pretty
> > > concise definition to me.
> >
> > Doesn't that depend on how you define 'property'? I
> would
> > say 'halts' is a property of an application that can be
> > determined without executing the program.
>
> A general solution to the halting problem may not exist,
> but for a program using a dependent type system, it might
> actually be possible to prove: :)

Yes, I know this. What does that have to do with this discussion?

Ivan Lazarte

Posts: 91
Nickname: ilazarte
Registered: Mar, 2006

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 8, 2006 7:57 PM
Reply to this message Reply
This *not* a problem in every field. Having from Biology I'm constantly apalled by the lack of effective communication and completely subjective measurement in this industry. We need more Knuths and GOFs and way less Beyond Javas.

Terje Slettebø

Posts: 205
Nickname: tslettebo
Registered: Jun, 2004

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 9, 2006 4:22 AM
Reply to this message Reply
> > > > > "A type is any property of a program that we can
> > > > > establish without executing the program."
> > > >
> > > > I know it's subjective but that looks like a pretty
> > > > concise definition to me.
> > >
> > > Doesn't that depend on how you define 'property'? I
> > would
> > > say 'halts' is a property of an application that can
> be
> > > determined without executing the program.
> >
> > A general solution to the halting problem may not
> exist,
> > but for a program using a dependent type system, it
> might
> > actually be possible to prove: :)
>
> Yes, I know this. What does that have to do with this
> discussion?

Maybe I misunderstood you. You seemed to implicitly say that there may be properties of a program, that may not (at least easily) be considered related to type. I mentioned that your example, halting, may be determined by a type system.

If not this, what then was your point?

Achilleas Margaritis

Posts: 674
Nickname: achilleas
Registered: Feb, 2005

Re: Authors and Computer Scientists Scared of Definitions? Posted: Sep 9, 2006 7:16 AM
Reply to this message Reply
Chris,

Computer science is not only about mathematics, it is also about solving practical problems...in that context, a mathematical definition of a computer term is highly reduntant when the context dictates a practical approach.

Flat View: This topic has 53 replies on 4 pages [ « | 1  2  3  4 | » ]
Topic: Authors and Computer Scientists Scared of Definitions? Previous Topic   Next Topic Topic: Offensive Coding

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use