Type Definitions Smell Badly

Moved from ArgumentsAgainstTypeIndicators.

I'm not sure how to interpret "given" and "explicitly" in the definition of ManifestTyping. The terminology floating around out there is often fuzzy or inconsistent or dependent on arbitrarily chosen pet typing models (actual implementations or mental). The subject of "types" has a vocabulary problem in general. I believe this is largely because there are different ways to "think about" types and none of them are objectively wrong and/or not wrong-enough to prevent people from having certain close-enough notions. (Notions don't have to be accurate or consistent to "define" words among the population. Actual usage defines words, even if the usage is somewhat "stupid" or "illogical".) Past attempts to establish clear-cut algorithms or formulas or rule-sets to define such unambiguously have failed miserably. Endless and recursive LaynesLaw "battles" typically ensue. Instead we get anti-scientific bullshit such as IfYouWereSmartEnoughYoudJustKnow (what "types" are). -t

It's not a question of "smart enough", but "informed enough." The "ManifestTyping" page is merely one source among many, and by no means the best of a large and diverse lot. Read more about ComputerScience and SoftwareEngineering and SetTheory. Types are not as ambiguous and ill-defined -- or even as complex -- as you think, but there isn't a "clear-cut algorithm or formula or rule-set" that will help at this point, any more than there's a "clear-cut algorithm or formula or rule-set" that will identify (say) a cat.

You are claiming "if you read enough, you'll just know" as if claimers of clarity have no obligation to write clear-cut rules or algorithms or formulas to detecting presence or absence of type-ness etc. I'm skeptical of somebody who claims they know something so very well that they can identify its presence or absence, but cannot precisely articulate the "rules" their brain follows to make such classification. I suppose it's possible for such to be the case, but it makes communication, analysis, and testing about detection methods nearly impossible.

An analogy may be a skilled hunter being able to identify a wild animal hidden in the brush. It may be an admirable skill, but if they cannot articulate the process their eyes and mind go through to perform that feat, they can cannot document that skill for others to follow and test. Further, we have not verified that you are actually seeing such animals since you never do the equivalent of bringing them back to the tent to prove they exist and are edible; you could be making it up for all we know. It's essentially, "trust me because I am experienced and skilled at spotting X". Whether true or false, it's not usable information to readers (unless they are only looking for a consultant with a high opinion of themselves to hire). It's not testable. It's just a claim.

I'm not claiming that "if you read enough, you'll just know." I'm claiming that if you read enough, you'll know more than you know now. Expecting a Wiki page to be a substitute for extensive, graduate-level study is unreasonable. It's obvious when you lack experience in a technical or theoretical area, usually to an extent that we can't even begin to fix it with a few paragraphs. Whatever the subject, you'd be far better off learning about it than arguing. Even better, stick to what you know and don't pretend expertise in areas where you obviously lack it.

It's possible to cite such books to put together a "logic trail" case. Example:

Book A: All Q's must belong to set X, Y, or Z as shown in the following proof...

Book B: Q's cannot be X per following proof...

Book C: Q's cannot be Z per following proof...

Using these books and citations, one can put together the fact that Q's must belong to set Y.

But past attempts from you for this kind of info failed because you interpreted vague passages the way you wanted to. As quoted, they were vague. They seem hesitant to make concrete statements for some reason. Maybe you are somehow triangulating or averaging all the textual vagueness in your mind to get a clear picture or statistically reliable summary, but this triangulation or averaging or textual statistical summary process is not made clear to the reader. It's a black box. It's undocumented fuzzy math at best, and unconsciousness bias at worse. A professional compiler writer even called you out on some of your vocabulary claims.

Further, somewhere you admitted it's up to specific language authors what they call types, variables, values, etc. They are not obligated to follow textbooks. If that's the case, then textbooks are not the canon you claim they are. You contradict yourself.

Why don't type-related books ever make clear, definitive statements, such as "manifest types must have property X and must not have property Y"? (Where X and Y are clearly defined). They are strangely waffly.

Calling the other guy "stupid" is a cop-out for making/finding/citing and processing clear-cut definitive statements about type-related objects.

I can appreciate that your lack of experience in ComputerScience -- and particularly in writing compilers, since you mention that -- would lead you to believe there is vagueness where there isn't. Often, students at the beginning of their journey into a complex subject find it similarly vague, fuzzy, etc., until they have learned not only the core subject, but its surrounding subjects. The inevitable variation of terms, omitted obviousness, and vagaries of academic writing can make a rigorous subject appear fluffy and vague to outsiders. The only solution is to study more and learn more. Citing books in a simplistic manner is no substitute for reading them.

I have written interpreters and compilers for a living, and currently work with former professional compiler writers and people who teach about writing compilers. We share a common language, which is the language I use here. The "professional compiler writer" who apparently "called me out" was posting nonsense. The only evidence that he was a "professional compiler writer" was his claim to be one. He never mentioned the products he apparently developed, nor could I find any connection between his name and any compiler. I suspect, therefore, that he was a "professional compiler writer" the same way RichardKulisz was a professional operating system designer.

A professional compiler writer disagreed with your term claims.

Yes, you wrote that already. You appear not to be reading my replies. As I pointed out above, the only evidence that my correspondent was a "professional compiler writer" was his claim. I could find no connection between his name and any compiler. However, you can find a connection between my name (DaveVoorhis) and a DBMS with a language implementation that compiles to its internal VM (the RelProject), so I do know what I'm talking about. It was obvious that the "professional compiler writer" didn't.

Anyhow, we are getting off-topic, into a definition battle here. What we call these "kind" of types is a side issue.

What types are you talking about?

Classifications such as "Manifest typing", etc.

Start here: http://en.wikipedia.org/wiki/Manifest_typing

Do quotes qualify as an "explicit type indicator"?

Manifest typing refers to explicit declaration of variable, parameter and return types. It does not refer to symbols used to represent literals.

One cannot know that with certainty by reading the definition as given. Where is the sanctioned explicitrometer?

Where is the what? ManifestTyping is characterised by the appearance of type names in the code to explicitly determine the types of variable, parameter and return types. You might find it helpful to read all of the links in the box on the right-hand side of http://en.wikipedia.org/wiki/Type_system

And by the reinterpretation, it's not clear to me at all what manifest typing has to do with tags versus non-tags (non-indicators) in typical dynamic languages. It's poorly written. Some of you guys need a serious lesson on documentation.

See, for example http://en.wikipedia.org/wiki/Dynamic_typing#DYNAMIC

If you find the WikiPedia documentation to be unclear, please improve it. Like WardsWiki, WikiPedia is a wiki and you can edit it.

It's clearer now to me because somebody used "type tag" :-) Honestly, it wasn't me. Although some dynamic languages don't use them, at least in a detectable way. The article did use the word "generally", which implies it's not an absolute requirement of "dynamic typing". But that's part of the grand "type vocabulary" problem: nobody wants to commit to anything solid. It's either words like "generally", or FractalVagueness. -t

"Type tag" is a legitimate implementation mechanism, but it's never been clear whether your use of the term accords with its recognised use. Type tags -- or more accurately, explicit type references -- are often used, but not always. For example, languages where all values are represented as strings require no explicit type references because the language implementation assumes all values are represented as type "string". In other words, every value has an implicit reference to type "string".

Type terminology is not vague, but it can seem that way whilst you're still developing an understanding of it. It's a big picture, not fully comprehended by reading isolated snippets.

"You just don't comprehend" is a copout. Professional compiler writers obviously "comprehend" compilers, and one told you that you were full of it. Thus, if you wish to go with anecdotal comprehension claims, then you can die by the same sword.

As written in available and cited material, it is vague. One very rarely finds any definitive statements along the lines of "X must have property Y" or "X must not have property Y". There's nothing concrete that's testable or that can be unambiguously converted into a clear algorithm or formula or list of formal logic statements. I've never seen such a big pile of fuzz except in religion and the field of psychology, but at least psychology doesn't claim to be solid, admitting it's a nascent field and not making bold pronouncements unless reproducible statistics are available. Something is wrong with "types" in the industry.

If "something is wrong with 'types' in the industry", how do we wind up with working programming languages that implement types? How do we wind up with C, C#, C++, Java, Python, Perl, PHP, Ruby, and Javascript? How do we have Lisp, Haskell, O'Caml, Pascal, FORTH and Prolog? I suspect the only thing "wrong with 'types'" is your own aggravation at not finding them as easy to comprehend as a cheap novel. Sometimes, with complex material, it helps to read the same thing more than once.

Because the parts work how we expect them to work. Labeling the parts is a different matter: machines just do what they are told to do and don't decide to function or not function based on what different humans may call their parts. We've developed a vague "notiony" vocabulary around types that has proven "good enough" to get real work done, but is NOT good enough for rigorous analysis. Like I pointed out before, "country music" has fuzzy boundaries. However, people still find it a useful term and it's "good enough" in most cases. Thus, something can be BOTH fuzzy and be useful enough to get work done (communicate). -t

The parts work how we expect them to work because they are systematic. The formal study of such systematic environments is called TypeTheory. Really, it isn't that difficult -- you just need to read more.

Your so called "TypeTheory" does NOT dictate or formalize how its category models (and related vocabulary) tie to specific programming languages in clear-cut ways. Just about everything can be viewed as a type or category, but calling or modelling everything as such may not make sense to the front-line programming troops and not necessarily match colloquial vocabulary and field language. TypeTheory can be potentially used as part of a specific model(s), but the formal connections between it and actual specific languages are still missing.

What makes you think so?

I believe you even agreed that the language designers/authors/vendors get to call parts whatever they want to and may even violate the canon (if there is such).

You can call the parts whatever you want. However, there are terms used by convention, because conventions in language are what make communication possible. If you deviate from convention without careful clarification, you only cause confusion.

The "convention" is fuzzy. We've been over this before in the "value wars" topics. You cannot produce clear-cut algorithms/rules/formulas for identifying occurrences and non-occurrences of various terms. I don't want your summary opinion, I want solid codified rules IN TEXT so that I don't have to rely on the black-box notions in your stubborn and biased head. You just make round-about excuses for not providing the codification.

No one can produce "clear-cut algorithms/rules/formulas for identifying occurrences and non-occurrences of various terms", because every language term inevitably results from an infinitely-recursive chain of terminological references. Even a simple example from geometry -- which is about as "clear-cut" as you can get -- demonstrates this. Take "triangle" (from WikiPedia): A triangle is "a polygon with three corners or vertices and three sides or edges which are line segments." What's a polygon? "[A] plane figure that is bounded by a finite chain of straight line segments closing in a loop to form a closed chain or circuit." What's a plane? What's a line segment? What's a corner? What's a side? What's a loop? What's a line segment? What are vertices? What's a three? And so on. Imagine trying to produce "clear-cut algorithms/rules/formulas" for that.

The solution here isn't a set of rules. Indeed, for types and other things, we've sometimes given definitions in terms we understand and you rejected them. The solution is to read more. Then you'll learn more and understand more. I don't know why you find that so objectionable and appear to be offended by the suggestion that you read more. Reading more is how humans learn more and understand more. It's a GoodThing; nothing bad could possibly come of it. It would certainly give you greater (and, I suspect, more satisfying and less frustrating) understanding, and if you wished, it would give you a much stronger foundation from which to launch objections to aspects of theory or industrial practice with which you disagree. If you continue to lob weak objections at TypeTheory or ObjectOrientedProgramming or HigherOrderFunctions or PreparedStatements or whatever with what is obviously superficial knowledge, you'll be increasingly ignored and marginalised. However, if you object from a position of strength -- armed with in-depth knowledge and a firm understanding of TypeTheory or ObjectOrientedProgramming or HigherOrderFunctions or PreparedStatements or whatever -- you'll have a fair chance of being heard, and maybe even convince others that you're right.

Everything else I claim I can explain in terms of standard logic and math. True, the givens may depend on anecdotal evidence and assumptions about human behavior, but I PROCESS the base givens with standard logic and math to make my conclusions: there are no "spooky steps". If you disagree with the base assumptions, that's fine; at least we agree on the SPECIFIC part of the model where the disagreement lies. But there's nothing even close with "types", per current writing.

I truly believe you mistake your internal head notions/models for universal truths, and that is the real problem and that's why you cannot articulate your claim/reasoning steps: you are using a "reasoning language" that only compiles in YOUR head. Telling the other guy they "don't read enough" is a copout. Explaining properly is explaining properly. It's the writer that is broken, not the reader!

Where have you used standard logic and math?

My goal is not to "get it", my goal is to document it so everyone knows the names and relationships between the parts and rules of the type model: old-fashioned western reductionism.

How do you expect to document it if you don't "get it"?

I'm not sure I have to "get it", I just want to document the rules and parts. "All floobs are also mips unless they belong to the set of snerks, and you can tell if something is a snerk if it produces muups when combined with blups" type of thing. Whether I "get" what "floobs" are is secondary.

How do you know you've documented it correctly, if you don't "get it"?

Contradictions are discoverable with clear writing. If statement 12 says "Floobs can be mipps only if they don't have sniggs" but statement 47 says, "Floobs can be mipps and have sniggs if they are purple", then we have a logical contradiction (or a useless statement about something that can't exist.)

If you don't "get it", how do you know you don't have logically consistent nonsense?

One can identify the logic contradiction in the "Floob" statements as-is. No need to "know" what a Floob is. They can probably be converted into formal mathematical set notations and processed by a machine to detect contradictions even. (We may have to settle on what "has" means in terms of sets, first. "Has" was a stumbling block for us before in the "nested" fight.) Don't ask me to do it though, I'm rusty at that stuff.

It's not much different from homework in school where you have something like:

  1. x belongs to the set Y
  ...
  5. x does not belong to the set Y.
We don't have to know what x and Y are to know that we have a contradiction in statements #1 and #5 (assuming they don't change in time). True, it's nice to have knowledge about x and Y, but not a requirement to apply reasoning and derivations to rules about things.

{You didn't get his question. "An apple belongs to the set of oranges." without the contradiction is logically consistent, as is "A cat belongs to the set of dogs". But does it make any sense?}

You are correct, I read it wrong as "logically inconsistent nonsense". My bad. I'll worry about that issue AFTER somebody submits a logically consistent working set for inspection. Of course the model has to reflect common or typical notions of "types" to be accepted (in common and typical languages). But at least present a clear set of rules/formulas/algorithms.

See TypeSystemCategoriesInImperativeLanguages.

PageAnchor TSCIIL-critique

It's not clear how to relates to a specific language or gives anything useful. It may be producing UselessTruths at best.

Examples of specific languages are given, but we can LetTheReaderDecide whether it's producing UselessTruths or not.

And it hasn't been vetted by known experts.

Who would you like to have vet it?

D1.3: "at least one type" but later says "finds a T" (D1.8), implying only one.

That is correct. If a given literal belongs to more than one type -- e.g., a 0 could denote an integer, float, or boolean -- one of them is chosen arbitrarily. In many languages, the literal 0 is arbitrarily chosen to be an integer.

D1.9 "program...can determine..." How exactly and where does one go to see this?

An example is immediately below it.

And your "V" is not anything objectively observable. It's a fictitious middle-man that may not even be necessary, complicating the issue.

V is standard terminology, used in a conventional manner. It represents the result of an expression evaluation. It's a term for the result of a + b, for example.

We've been over this already. "Value" is overloaded and vague.

What would you suggest as an alternative?

If it's not needed, don't mention it. If it's only needed for expressions, then only use it for expressions.

It's also needed for what functions return, what variables store, and what literals denote. It appears in the majority of programming language documentation, which would lead the reader to expect to find it in a model or abstraction of programming languages.

The documentation does not endorse your viewpoint on the data structure of variables in a clear way. You just think it does because you read stuff with a biased eye.


If you need to argue the meaning of "value" I cannot see how you can have any hope of discussing any programming language. Until you can agree on a useful interpretation of "value", you should refrain from discussing the rest. Maybe you should also agree on the meanings of "is" and "has" too. -- ChaunceyGardiner

Agree on with who? Mr. Nohandle has insisted that the type indicator must be a sub-part of "value" (if type indicators exist). I invited Mr. Nohandle to provided cited evidence that this interpretation is canonical, but so far nothing concrete has appeared, let alone the volume of citations that would typically be expected to qualify as a canon. (A couple of quotes were given, but were not even close to concrete per my interpretation of human English.) In practice, "value" is defined loosely and can take on and exclude various characteristics per situation. I have no problem living with vague notions for these kinds of things since "clinical" definitions don't exist yet, but Mr. Nohandle feels his pet versions of these are the OneTrueWay. I do NOT insist that my model/interpretation of type-related parts are canonical, ONLY that they provide program-behavior prediction capability. -t

As far as "is" and "has", types sometimes remind of the quantum world. Light can take on the properties of both waves and particles, depending on the experiment. When light is acting like a wave, can we say light "is" a wave? Can it "be" both? The actual usage of type-related language is similarly situational, sometimes in seemingly contradictory ways. "1" (one) can be interpreted as a Boolean, a String, and a Number, depending on the operation or using function. However, a function such as get_type() may give one and only one answer. Thus, "1" may "be" Boolean in one situation, but not another. Regular English is not giving us enough precision to distinguish between these.

I would put a very large STET on my above contribution, and a very large HUH on your consequent rant. The VALUE 1 can have many different meanings in code, depending on its type, or where it occurs. We are not researching quantum physics - though your wave analogy shows that types can overlap. I strongly doubt that any Mr. Nohande would say that a type is a sub-part of a value. And this - "value" is defined loosely and can take on and exclude various characteristics per situation - demonstrates why we need types - those characteristics are disambiguated by their various "type" situations.

They are disambiguated by what? Please clarify which person, place, or thing. If they are situational, then documentation should have a decent way to describe the situations in effect in a clear way. And/or invent language for the two different approaches to "types" common in dynamic languages. I'll let Mr. Nohandle comment further on his opinion regarding the relationship between type indicator and value.

[A value V is a representation R -- typically a string of bits -- associated with a reference to a type T. The association between R and T is necessary. R without T is unidentifiable, e.g., what value is 01100110011010010111001101101000? Is it an integer? The ASCII string "fish"? A floating point value? T without R describes a set of values such as "string", but not a specific value. Together, e.g., V = (01100110011010010111001101101000, string) is "fish".]

We've been over this already. There is still a machine-processable (unambiguous) association between the type indicator and the "representation" in the alternative: <variable name="myvar" type-indicator="number" value-representation="123.45"> -t

[That may be an appropriate -- though perhaps awkward -- model for a variable in a StaticallyTyped language. How do you model the result of evaluating 2 + 3 in a DynamicallyTyped language?]

[And, yes indeed we've been over this already. Why, then, did you write that you'll "let Mr. Nohandle comment further on his opinion regarding the relationship between type indicator and value" if you didn't expect me to comment on my opinion regarding the relationship between type indicator and value?]

If your response is a link, that's fine by me. Respond how you wish.

[You specifically requested a response.]

A link is a response, Mr. Quibbly.

[Ok, here's a link: TypeSystemCategoriesInImperativeLanguages.]

I was thinking more like ValueExistenceProof and its chain of related topics.

Note that it may be convenient to define/model a "container" for containing type indicator and value representation for intermediate results, such as the "result of an expression (evaluation)", but that does NOT mean this container needs to be "inserted into" a variable structure as-is. But generally that's an arbitrary (non-mandatory) model/implementation decision and not an absolute requirement. -t


later-day JavaLanguage has no Idea<?> what ur talking about.

and if templates force a re-interpretation of a template into a produced class, why _can't_ Java templates use pure data arguments? Otherwise why not just use references to types? Funny how the less-is-more languages don't suffer a combinatoric explosion of redundant paperwork to redefine all the types. For kicks, select part of an odd typing expression in EclipseEditor and hit ExtractLocalVariable?. boom - bits of aircraft & hanger scattered everywhere. --AnonymousDonor


Arbitrary-ness to get Concrete-ness?

It may be that documentation may have to settle on somewhat arbitrary models, representations, and/or definitions in order to provide a concrete system to present types in a fashion that's grokkable to readers. Our disagreements over how (or if) to represent "values" may pivot on this issue. I have nothing against arbitrarily picking a specific model/technique to describe types to improve communication, but it should come with the caveats that first, it is a somewhat arbitrary choice, and second, it probably cannot be considered a "canon" (until widely adopted, which is not an initial primary goal). -t

This can be roughly compared to music notation: there are multiple ways to represent and describe music, such as the traditional dot-and-staff notation, and the "piano roll" view made popular by software sequencers. But the dot-and-staff notation is currently the de-facto standard and is the reference source model used for most descriptions of music when a certain degree of explicitness is desired or required. -t

See NoTypeCanon for more on this.


I smell badly at the moment because I have a cold. Which is a shame because I've been told my socks smell bad. --AnonymousDonor


AprilFourteen


EditText of this page (last edited July 13, 2014) or FindPage with title or text search