comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: how to create a record
Date: Fri, 03 Nov 2006 05:29:17 GMT
Date: 2006-11-03T05:29:17+00:00	[thread overview]
Message-ID: <NsA2h.266295$1i1.265324@attbi_s72> (raw)
In-Reply-To: <d8uq14-u8e.ln1@newserver.thecreems.com>

Jeffrey Creem wrote:
> 
> 1) You are using two different conventions in your program above. Both 
> CamelCase and the Traditional_Ada_Underscore method. Most Ada code tends 
> to use _ since that is what the LRM packages do (e.g. text_io) but 
> whatever you pick, try to stick with one style

If you do use CamelCase, many of us will run your code through 
reformatters that will change it to Camelcase. If you don't like seeing 
that, use underscores to separate words in identifiers.

> 2) Can't really guess where this is going but "struct_device" sounds 
> pretty C like. There are no 'structs' in Ada. Again this is just a silly 
> style thing and may not matter but it is probably best just live in the 
> style of whatever language you use.

There are also no switch statements, no breaks, no casts, ...

Using such terms implies (usually correctly) thinking at the low-level 
of most C code. Ada code is often much higher level. Using the Ada terms 
helps indicate that you're thinking at that higher lever (or helps 
pretend that you are; all this stuff about the Language Shootout is 
really concerned with low-level stuff that is an elephant most of the time).

Also, this is an Ada newsgroup; understanding C terms is not a 
requirement. You can be sure your audience understands you by using Ada 
terms here.

-- 
Jeff Carter
"I soiled my armor, I was so scared."
Monty Python & the Holy Grail
71



  reply	other threads:[~2006-11-03  5:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-03  3:14 how to create a record markww
2006-11-03  4:48 ` Jeffrey Creem
2006-11-03  5:29   ` Jeffrey R. Carter [this message]
2006-11-03  7:51   ` Maciej Sobczak
2006-11-03  5:00 ` jimmaureenrogers
2006-11-03  5:19 ` Jeffrey R. Carter
2006-11-03 11:51 ` Martin Krischik
2006-11-03 16:56 ` Pascal Obry
2006-11-04  3:09   ` Randy Brukardt
replies disabled

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