Re: OO's best feature survey results

From: Alfredo Novoa (alfredo_at_ncs.es)
Date: 11/04/03

  • Next message: Alfredo Novoa: "Re: OOP - a question about database access"
    Date: 4 Nov 2003 03:43:44 -0800
    
    

    topmind@technologist.com (Topmind) wrote in message news:<4e705869.0311032202.51ae5441@posting.google.com>...

    > > This is an absurd. And object can have multiple types.
    >
    > Class == Object in some languages.

    No. In some languages classes are represented using objects. It is
    completely different.

    Class = type
    Object = variable or value

    Both concepts are independent to any language.

    > > For instance 3 is numeric and integer and positive.
    >
    > It is also greater than 1 and less than 7. Should
    > we make that into a type also?
    > (type: GreaterThanOneLessThanSeven).

    Only if you find some usefullness in that type.

    > The fact is that *any* attribute value can be viewed as a "type".

    Types are sets of values among other things. And sets may have one or
    zero elements.

    > So? Simplify it a bit. For example, require a single letter next
    > to the comparison operator:
    >
    > if x n> y ....
    >
    > The "n" means a numeric compare. We could also have
    > stuff like:
    >
    > if x scw> y
    >
    > Where
    >
    > s = string compare
    > c = compare case-sensative (default insensative)
    > w = ignore white spaces at ends.

    IMO it is not simpler, it is only more concise and obfuscated.
     
    > Often I make functions that do similar such because there
    > is more to comparing than simple types allows.
    > Are you going to make every combination here
    > into a type?

    You are making every combination on the string type.

    > You could, but that is ugly. If you
    > then add another compare option

    I can't imagine more compare options than one for most types.

    >, your type tree
    > can double in size. You would get a combinatorial
    > explosion.

    No, I only would need a few operators for the string type. Numerics
    does not have white spaces or uppers and lowers. But the fact is that
    I always make case insensitive comparisons taking white spaces into
    account.

    > If you don't use trees, then you have
    > basically set theory.

    Non sequitur.

    > Types fail to nicely extend here. To extend the
    > concept of comparing, my approach just needs
    > an addition to an *existing* arrangment, whereas yours
    > needs either a combinatorial
    > explosion, or a code or syntax overhaul.

    You are very confused here.

    > > > And, they are not immediately clear
    > > > on how they handle mixed "types".
    > >
    > > What is a mixed type?
    >
    > a = 5
    > b = "foo"
    > if a < b

    It must return a compile time error, even with your approach.

    > > I don't care about what you like, but we have very strong evidence
    > > about that typed languages are superior to untyped ones.
    >
    > "Strong evidence"? Bull!

    Read any programming language theory book.

    > > >, and you seem
    > > > > > to agree that they don't map to the real world
    > > > > > that well.
    > >
    > > They don't map well to everything as many OO fans believe, but they
    > > have plenty of good uses. Eg: numeric, string, boolean, etc.
    >
    > If we are only arguing about really really BASE types,
    > then we are off topic. I thought the claim was that
    > OO extended the concept well into more complex things.

    Types map very well to more complex things like geometrical points,
    shapes, measures, etc. But like any other tool they can be misused
    like in the case of business objects.

    > > Relational variables have type.
    >
    > Everything *can* be viewed as types.

    Only types.

    > I bet you cannot find a formal definition of "type" that does not
    > involve subjective human interpretation.

    Type: a set of individual constants and a set of operators that act
    over that constants.

    What is the prize? :)

    > Any difference
    > in two or more things can be called a "type". I don't
    > disagree with that. But, the theory does not prove
    > USEFULLNESS. That is your big reasoning flaw here.

    The practice proves usefullness.

    > Existence != Useful

    Types == useful

    > What is your criteria for which everyday concept to make into
    > a paradigm (or key concept) and which to ignore?

    Simplistic criteria does not work. You have to read an study a lot.

    > > Type is not a fuzzy concept.
    >
    > Perhaps not. It is just set theory in an ugly strait-jacket.
    > However, being clear is not the same as being useful.

    Is not the string type useful?

    A real untyped language works directly with memory addresses.

    > Perhaps we need to go to school to learn how to
    > think naturally........and how to poop.

    No, a couple of books about programming language concepts would
    suffice.

    Regards
      Alfredo


  • Next message: Alfredo Novoa: "Re: OOP - a question about database access"

    Relevant Pages

    • Re: Pyramidable
      ... THIS IS DOGMATISM, right ?.. ... In this case you have numerous texts to compare the ... IT APPLIES WHATEVER THE LANGUAGE ... > frequent event is not frequent or missed. ...
      (sci.archaeology)
    • Re: references about the beauty of functional programming ?
      ... Forgot to mention also that OCaml simply abandons the hash table (to ... language is a design defect in itself. ... the same process it might just depend on the algorithm in question ... not possible to compare the implementations directly. ...
      (comp.lang.functional)
    • Re: Comparing files with regular expressions
      ... that matches the exclude file from the complete file (which I'm hoping ... filehandles will be closed by Perl when it finishes processing the script. ... familiar to you than Perl or any other programming language then use that. ... you had only two sheets of paper to compare, ...
      (perl.beginners)
    • Re: Moore on Skolems Paradox
      ... their language, the proof of the uncountability of the reals is valid. ... mathematics is simply nothing whatever like ... If you want to imagine a world ... set theory would be true, but set theory says there are uncountably ...
      (sci.logic)
    • Re: OT: Questions about Set Theory
      ... general knowledge but I may be wrong. ... Naive set theory is how most people, ... the way a programmer most of the time deals with high level language ... "things" and logic is the language of properties and reasoning. ...
      (comp.sys.mac.advocacy)