Re: OO's best feature survey results
From: Alfredo Novoa (alfredo_at_ncs.es)
Date: 10/30/03
- Next message: Brian Farrar: "Re: Using Data Transfer Object to Handle Long Business Transactions on a Domain Model (PofEAA)"
- Previous message: Paul Campbell: "Re: Identity Map in PoEAA problem"
- 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: 30 Oct 2003 02:55:47 -0800
topmind@technologist.com (Topmind) wrote in message news:<4e705869.0310292318.56212c8f@posting.google.com>...
> >
> > > I will agree that people tend to think in "types"
> >
> > Types are an essential concept in modern programming.
>
> I don't agree with that. I could easily live with a programming
> language where everything is a string
You always need the boolean type.
if a = '1' then
...
a = '1' returns a boolean value.
How would you solve this?
> many scripting/dynamic languages actually do. An "add" operation
> will "convert", or at least treat the operands as if
> they were numbers during the operation.
With that kind of variables you usually can check the type of the
stored value, and the interpreter checks the types before doing the
operations. Eg
a := '0';
b := '#@#@';
c := a + b; // invalid conversion error
This language is still typed, but I would like to detect the error in
compilation time.
> "Type"
> is something very temporial in this approach.
No, types are immutable and eternal, but variables may hold values of
many types.
> You call them "numbers" during the operation, but
> they are just strings and the result is just string.
String is the representation, buy they behave like numbers and they
are numbers.
How do you solve this?
if '10' > '9' then ...
> They are a part of a lot of programming languages, but not
> a necessity.
And programming languages are not a necessity either, but they make
our lifes more comfortable.
> Besides, typing working on a small scale does not necessarily
> translate to a larger scale. Extrapolating "integer" ADT
> type concepts to business entities is a big leap.
Business entities map very well to relation typed variables (AKA
tables).
Without types the relational model can not exist.
I agree with you about that biz entities map very bad to scalar typed
variables.
> > Types are constant. This is not a type, it is a derived variable.
>
> Constant?
Of course. The integer type is the same always.
> Does that mean that dynamical languages don't
> really have types?
If you change a "type" what you have is another type.
Eg:
type A is integer constraint A > 0 and A < 100;
drop type A;
type A is integer constraint A > 0 and A < 10;
You call A to two different types.
Alfredo
- Next message: Brian Farrar: "Re: Using Data Transfer Object to Handle Long Business Transactions on a Domain Model (PofEAA)"
- Previous message: Paul Campbell: "Re: Identity Map in PoEAA problem"
- 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
|