Minirant [entries|reading|network|archive]
simont

[ userinfo | dreamwidth userinfo ]
[ archive | journal archive ]

Thu 2009-11-19 15:05
Minirant
LinkReply
[identity profile] eponymousarchon.livejournal.comFri 2009-11-20 12:33
Sorry - I'm obviously being 'differently geeky'.

One thing that Ada (83 certainly, I couldn't say about 95) does - that Other languages don't - is that by default redundant checks in ANDs and ORs aren't bypassed as soon as one fails/passes unlike every other language under the sun (hell, even Prolog) - Ada values consistency (especially of any other effects that the functions may have) so if you *want* to allow short-circuit, and the run-time savings that this allows, then you have to specify AND THEN or OR ELSE in place of AND and OR.

(As I confused you I'm over-explaining here for the benefit of anyone else.)


What tickled me was that mental consideration of the use of AND THEN and OR ELSE where AND and OR is found in code is a habit, certainly of this coder - and is obviously one that I still have in me after (thinks) over ten years since I last touched Ada.

Ada: Love it or hate it, but it leaves its mark.


Link Reply to this | Parent | Thread
[personal profile] simontFri 2009-11-20 15:23
Thanks – I didn't know any of that before!

(But now you've said it, so I know what to look for, it appears that Ada 95 hasn't changed this. Unsurprising, really, if the whole point was consistency :-)
Link Reply to this | Parent
navigation
[ go | Previous Entry | Next Entry ]
[ add | to Memories ]