comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Char type verification
Date: Fri, 17 Nov 2006 19:30:28 +0100
Date: 2006-11-17T19:30:28+01:00	[thread overview]
Message-ID: <878xiax6wr.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 1163777588.040478.79300@b28g2000cwb.googlegroups.com

Koray Erkan writes:
> The challenge was purposefully simple and messy so that you didn't get
> bogged down with the theoretical intricacies of a major one.
>
> I guess this is not the way people use comp.lang.ada. Which is why I
> dropped a resentful - and regrettably not too gallant - closing note.

I think the incident is really a culture clash stemming from Ada's
nature as a high level language, its strictess, and its emphasis on
readability.

High level means that Ada allows you to think in terms of your problem
(uppercase and lowercase letters) rather than the solution (bit
patterns and bit masks).

Strictness means that a letter should not be mistaken for a number.

Emphasis on readability means that an experienced Ada programmer will
write a program that makes it very clear to the reader what the
problem is, and how the program solves it.

So, you came here and asked "how do I implement this in Ada?" and
experienced Ada programmers retorted, "but what is your problem?".  I
am not at all surprised that both sides failed to understand the
other.  This very newsgroup has countless examples along the lines of:

C programmer: What is the string terminator character in Ada?
Ada programmer: there is none because you don't need one.
C programmer: huh?

Lisp programmer: How do I keep track of a string's length in Ada?
Ada programmer: like all arrays, strings know their bounds and you can
query them using 'First, 'Last and 'Length.  But the bounds are
immutable.  If you want variable-length strings you need
Unbounded_String.
Lisp programmer: OK, thanks.  BTW, all objects are immutable in a
functional language :)

-- 
Ludovic Brenta.



  parent reply	other threads:[~2006-11-17 18:30 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-15 22:00 Char type verification KE
2006-11-15 21:57 ` Georg Bauhaus
2006-11-15 23:15   ` KE
2006-11-16  4:48     ` Jeffrey R. Carter
2006-11-16 19:53       ` Adam Beneschan
2006-11-16 23:30       ` Yves Bailly
2006-11-17  0:48         ` Jeffrey R. Carter
2006-11-17  1:59           ` Adam Beneschan
2006-11-17 11:30           ` Stephen Leake
2006-11-17 15:33             ` KE
2006-11-17 15:10               ` Georg Bauhaus
2006-11-17 18:30               ` Ludovic Brenta [this message]
2006-11-18  2:29                 ` Brian May
2006-11-17 19:45               ` Jeffrey R. Carter
     [not found]               ` <mQm7h.8782$ig4.3262@newsread2.news.pas.earthlink.net>
2006-11-17 19:56                 ` Jeffrey R. Carter
     [not found]                   ` <omz7h.222$1s6.165@newsread2.news.pas.earthlink.net>
2006-11-19  2:19                     ` OT: French Idioms (was Re: Char type verification) Jeffrey R. Carter
2006-11-19  9:04                       ` Dmitry A. Kazakov
2006-11-17 21:22         ` Char type verification Simon Wright
2006-11-17 23:59           ` Yves Bailly
2006-11-15 23:23 ` Simon Wright
2006-11-15 23:33   ` KE
2006-11-16  4:52     ` Jeffrey R. Carter
2006-11-15 23:36 ` Adam Beneschan
2006-11-15 23:55   ` KE
2006-11-16  4:54     ` Jeffrey R. Carter
2006-11-16  1:08 ` jimmaureenrogers
2006-11-16  1:45   ` KE
2006-11-16  2:15     ` jimmaureenrogers
2006-11-16  2:42     ` Steve Whalen
2006-11-16  9:36     ` Alex R. Mosteo
2006-11-16  7:02 ` KE
2006-11-16 17:04   ` Dmitry A. Kazakov
2006-11-16 22:43   ` Brian May
  -- strict thread matches above, loose matches on Subject: below --
2006-11-16 16:01 Anh Vo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox