Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Apl > Re: APL & Progr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 16 of 38 Topic 1007 of 1019
Post > Topic >>

Re: APL & Programming Concepts

by microapl@[EMAIL PROTECTED] May 7, 2008 at 09:31 AM

On 7 May, 17:05, AAsk <AA2e...@[EMAIL PROTECTED]
> wrote:
>
> APL has neither the requirement to declare variables nor strong
> typing. Typing is an integral programming concept.
>
> Any ideas on how to 'mimic' typing in APL?

Having spent many years programming in a very wide range of languages,
including assembler, APL, C, C++, C#, PowerBuilder, VB, Java, SQL, etc
etc, I'm unconvinced that 'strong typing' actually buys you all that
much in terms of reliability.  Where it IS important is for languages
which have pointers - disallowing a pointer to a 64-bit float to be
used as a pointer to a 32-bit integer, for example.  But for languages
such as APL which don't have pointers, it's much less important.

What's more, so-called 'strongly-typed' languages often enforce the
wrong things.  In some cases, they'll give a warning or error on
innocuous things - so you have to add a 'cast', which makes code less
readable - whilst not preventing much more serious errors such as
adding an invoice number to a day of the month, or adding a weight in
kg to a weight in pounds, or not warning on arithmetic overflow.  (I
appreciate that the exact details depend on the language you are
talking about, but you'll get my gist).

Maybe a different approach is needed - something based on rules or
constraints.  So for example the default might be: "A is anything.
Let the programmer do what he likes."  Or you could say "B is a double-
precision floating point. It must be between +1.0 and -1.0.  It is not
legal to add another number to it."  And so on. Such an approach could
be quite good in practice because you could get the advantages of
rapid prototyping by initially having no rules, then add them later if
you want to enforce high reliability.  If you think about it, so-
called 'strong typing' is just a rather arbitrary sub-set of what I'm
proposing, without the convenience of being able to do what you like
at the prototyping stage.

(BTW don't expect any of this to appear in APLX anytime soon!)

Richard Nabavi
MicroAPL




 38 Posts in Topic:
APL & Programming Concepts
AAsk <AA2e72E@[EMAIL P  2008-05-06 11:00:50 
Re: APL & Programming Concepts
pgilbert@[EMAIL PROTECTED  2008-05-06 19:19:16 
Re: APL & Programming Concepts
AAsk <AA2e72E@[EMAIL P  2008-05-06 22:13:30 
Re: APL & Programming Concepts
Gosi <gosinn@[EMAIL PR  2008-05-06 22:36:29 
Re: APL & Programming Concepts
Mb <mebian@[EMAIL PROT  2008-05-07 11:41:17 
Re: APL & Programming Concepts
"Curtis A. Jones&quo  2008-05-07 08:34:14 
Re: APL & Programming Concepts
Mb <mebian@[EMAIL PROT  2008-05-07 19:14:24 
Re: APL & Programming Concepts
"Kerry Liles" &  2008-05-07 13:44:47 
Re: APL & Programming Concepts
Mb <mebian@[EMAIL PROT  2008-05-08 00:53:12 
Re: APL & Programming Concepts
"Curtis A. Jones&quo  2008-05-07 08:42:03 
Re: APL & Programming Concepts
AAsk <AA2e72E@[EMAIL P  2008-05-07 09:05:00 
Re: APL & Programming Concepts
"jk" <aqxqy@  2008-05-07 18:46:37 
Re: APL & Programming Concepts
"David Liebtag"  2008-05-07 14:34:36 
Re: APL & Programming Concepts
"David Liebtag"  2008-05-09 13:37:05 
Re: APL & Programming Concepts
phil chastney <phil.ha  2008-05-10 21:54:22 
Re: APL & Programming Concepts
microapl@[EMAIL PROTECTED  2008-05-07 09:31:53 
Re: APL & Programming Concepts
AAsk <AA2e72E@[EMAIL P  2008-05-07 11:18:26 
Re: APL & Programming Concepts
"jk" <aqxqy@  2008-05-07 23:07:58 
Re: APL & Programming Concepts
Ric <r.g.sherlock@[EMA  2008-05-07 18:07:12 
Re: APL & Programming Concepts
Mb <mebian@[EMAIL PROT  2008-05-08 12:33:11 
Re: APL & Programming Concepts
Randy MacDonald <ramac  2008-05-09 19:07:23 
Re: APL & Programming Concepts
Gosi <gosinn@[EMAIL PR  2008-05-08 04:19:15 
Re: APL & Programming Concepts
Mb <mebian@[EMAIL PROT  2008-05-08 18:13:21 
Re: APL & Programming Concepts
Christopher Browne <cb  2008-05-08 19:48:11 
Re: APL & Programming Concepts
Gosi <gosinn@[EMAIL PR  2008-05-08 13:02:53 
Re: APL & Programming Concepts
microapl@[EMAIL PROTECTED  2008-05-09 02:01:51 
Re: APL & Programming Concepts
Ric <r.g.sherlock@[EMA  2008-05-09 16:54:24 
Re: APL & Programming Concepts
Ric <r.g.sherlock@[EMA  2008-05-09 17:18:43 
Re: APL & Programming Concepts
"Polivka@[EMAIL PROT  2008-05-11 15:55:03 
Re: APL & Programming Concepts
"jk" <aqxqy@  2008-05-12 08:03:21 
Re: APL & Programming Concepts
phil chastney <user@[E  2008-05-12 13:47:27 
Re: APL & Programming Concepts
Randy MacDonald <ramac  2008-05-13 18:03:57 
Re: APL & Programming Concepts
phil chastney <phil.ha  2008-05-13 21:59:03 
Re: APL & Programming Concepts
Randy MacDonald <ramac  2008-05-14 21:57:24 
Re: APL & Programming Concepts
phil chastney <phil.ha  2008-05-15 07:42:40 
Re: APL & Programming Concepts
Steve <steve@[EMAIL PR  2008-05-11 19:53:25 
Re: APL & Programming Concepts
RHui000@[EMAIL PROTECTED]  2008-05-12 11:21:07 
Re: APL & Programming Concepts
Jack <jgrudd@[EMAIL PR  2008-05-12 21:12:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 10:05:49 CDT 2008.