More D newb questions.

Me Here p9e883002 at sneakemail.com
Wed May 7 16:27:14 PDT 2008


terranium wrote:

> Me Here Wrote:
> 
> >     junk.d(8): Error: Can only concatenate arrays, not (int ~ int)
> > 
> > which is silly. There's no technical reason for not allowing this. 
> 
> This is not silly. This is what called a strongly typed language. D is good
> for people having experience with C, C++ or C# so they are fully acquainted
> with strong typing. BTW D and C# aren't pure because they have sytax sugar,
> so they're not the best choise to learn what a strong typing is.

You do yourself a disservice by making assumptions on the basis of little
evidence. Don't make assumptions because I choose to use Perl's slices as
examples.

My more years than I care to remember history starts with assembler(various),
Fortran IV, Fortran 77, BLISS; moves through REXX, APL, PL/1, PLS/86 C, C++,
side trips into COBOL, Java and ADA, not necessarially in that order . On to
Perl & Ruby. Daliances with Python and Rebol. And in the last 3 years, serious
and studious evaluations of Haskell, OCaml, ML, Erlang, Mozart/Oz, Clean and Q.
Oh. And there's a little (serious) Pascal and Prologue in there somewhere too.

As someone else pointed out, strong typing is no barrier to allowing the
construction of arrays through the concatenation of elements of its base type.
Lookup Curry-Howard isomorphisms.

b.
-- 




More information about the Digitalmars-d mailing list