Re: OO's best feature survey results
From: Alfredo Novoa (alfredo_at_ncs.es)
Date: 11/04/03
- Previous message: Dmitry A. Kazakov: "Re: Type-centric OO (was: OO's best feature survey results)"
- In reply to: Topmind: "Re: OO's best feature survey results"
- Next in thread: Topmind: "Re: OO's best feature survey results"
- Reply: Topmind: "Re: OO's best feature survey results"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Dmitry A. Kazakov: "Re: Type-centric OO (was: OO's best feature survey results)"
- In reply to: Topmind: "Re: OO's best feature survey results"
- Next in thread: Topmind: "Re: OO's best feature survey results"
- Reply: Topmind: "Re: OO's best feature survey results"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|