comp.lang.ada
 help / color / mirror / Atom feed
* Clause "with and use"
@ 2003-10-31 21:02 Gautier Write-only
  2003-10-31 21:51 ` Warren W. Gay VE3WWG
                   ` (5 more replies)
  0 siblings, 6 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-10-31 21:02 UTC (permalink / raw)


Peter Hermann's post about number_base reminds me on a suggestion of mine
about a "with and use" clause in AC ! Comments are welcome...
Original proposal follows:
____

Proposal for a "with and use" clause 

 Hello! 

 Almost the only thing I find tedious in Ada is the obligation 
 to name twice packages you intend to _use_ in a context_clause. 
 I illustrate with examples two usual ways of organizing context clauses: 

 (A) 

 -- (1) With'ed only 
 with Ada.Command_Line; 

 -- (2) With'ed and Use'd 
 with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 
 use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 

 Problem: in practice the list pair (2) is a lot longer (many many lines) and 
         becomes difficult to synchronize. It is also difficult then to 
         _verify_ that the pair is consistent 

 (B) 

 -- (1) With'ed only 
 with Ada.Command_Line; 

 -- (2) With'ed and Use'd 
 with Ada.Text_IO;                       use Ada.Text_IO; 
 with Ada.Integer_Text_IO;               use Ada.Integer_Text_IO; 
 with Ada.Float_Text_IO;                 use Ada.Float_Text_IO; 

 Advantage: much easier to verify and transport across sources 
 Problem: the beginning of sources becomes awfully long. 


 To sum up, I'd describe the current situation so 

 - beginner-repellent and newcomer-repellent (not to be neglected !) 
 - ugly 
 - redundant 
 - causes a readability problem and possible confusions 
 - pushes the real thing, i.e. the programming contents after 
 "procedure/package... is", too far away of the source's top 
 - needs too much administration 

 My proposal: a "with and use" clause. "with and use A[,B]" would 
 mean "with A[,B]; use A[,B]". 

 (C) 

 -- (1) With'ed only 
 with Ada.Command_Line; 

 -- (2) With'ed and Use'd 
 with and use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-10-31 21:02 Gautier Write-only
@ 2003-10-31 21:51 ` Warren W. Gay VE3WWG
  2003-10-31 22:29 ` Randy Brukardt
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-10-31 21:51 UTC (permalink / raw)


Gautier Write-only wrote:
> Peter Hermann's post about number_base reminds me on a suggestion of mine
> about a "with and use" clause in AC ! Comments are welcome...
> Original proposal follows:
> ____
> 
> Proposal for a "with and use" clause 
> 
>  Hello! 
> 
>  Almost the only thing I find tedious in Ada is the obligation 
>  to name twice packages you intend to _use_ in a context_clause. 
>  I illustrate with examples two usual ways of organizing context clauses: 
> 
>  (A) 
> 
>  -- (1) With'ed only 
>  with Ada.Command_Line; 
> 
>  -- (2) With'ed and Use'd 
>  with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 
>  use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 

I don't like use-ing everything that is with-ed. I prefer
to name the packages to use in the procedure/declare blocks.

>  Problem: in practice the list pair (2) is a lot longer (many many lines) and 
>          becomes difficult to synchronize. It is also difficult then to 
>          _verify_ that the pair is consistent 

True, but you need it for full control. Sometimes, you need
to omit certain use-es.

>  (B) 
> 
>  -- (1) With'ed only 
>  with Ada.Command_Line; 

This is generally the approach I use now. With only a few
exceptions, I just put use clauses in the procedure/begin
block where it is used. This avoids a whole lot of evil,
and permits greater freedom in using commonly used names.

>  -- (2) With'ed and Use'd 
>  with Ada.Text_IO;                       use Ada.Text_IO; 
>  with Ada.Integer_Text_IO;               use Ada.Integer_Text_IO; 
>  with Ada.Float_Text_IO;                 use Ada.Float_Text_IO; 
> 
>  Advantage: much easier to verify and transport across sources 
>  Problem: the beginning of sources becomes awfully long. 

I know this is a contraversial subject (no agreement will follow),
but I believe for larger projects at least, this is a poor
practice to follow (this goes for (A) as well).

>  To sum up, I'd describe the current situation so 
> 
>  - beginner-repellent and newcomer-repellent (not to be neglected !) 
>  - ugly 
>  - redundant 
>  - causes a readability problem and possible confusions 
>  - pushes the real thing, i.e. the programming contents after 
>  "procedure/package... is", too far away of the source's top 
>  - needs too much administration 
> 
>  My proposal: a "with and use" clause. "with and use A[,B]" would 
>  mean "with A[,B]; use A[,B]". 
> 
>  (C) 
> 
>  -- (1) With'ed only 
>  with Ada.Command_Line; 
> 
>  -- (2) With'ed and Use'd 
>  with and use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 

What about A.B.C packages? Are you implying each level should be
used as well?

Overall, I think this is a bad plan. Just my $0.02 worth (and the
Cdn $ is gaining strength again against the US $ ;-)

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-10-31 21:02 Gautier Write-only
  2003-10-31 21:51 ` Warren W. Gay VE3WWG
@ 2003-10-31 22:29 ` Randy Brukardt
  2003-11-01 13:39   ` Gautier Write-only
  2003-11-01  3:39 ` Alexandre E. Kopilovitch
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 223+ messages in thread
From: Randy Brukardt @ 2003-10-31 22:29 UTC (permalink / raw)


"Gautier Write-only" <gautier@fakeaddress.nil> wrote in message
news:3FA2CDCB.500F4AF0@fakeaddress.nil...
>  My proposal: a "with and use" clause. "with and use A[,B]" would
>  mean "with A[,B]; use A[,B]".

And this is likely to be confusing:
   with Parent.Child; means with Parent; with Parent.Child;
but
   use Parent.Child; just means use Parent.Child;

There are other issues as well; see the Ada-Comment discussion, filed in the
AC.

                Randy.






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-10-31 21:02 Gautier Write-only
  2003-10-31 21:51 ` Warren W. Gay VE3WWG
  2003-10-31 22:29 ` Randy Brukardt
@ 2003-11-01  3:39 ` Alexandre E. Kopilovitch
  2003-11-02 12:03   ` Stephane Richard
  2003-11-01  4:07 ` Alexandre E. Kopilovitch
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 223+ messages in thread
From: Alexandre E. Kopilovitch @ 2003-11-01  3:39 UTC (permalink / raw)
  To: comp.lang.ada

Gautier Write-only wrote:
>Peter Hermann's post about number_base reminds me on a suggestion of mine
>about a "with and use" clause in AC ! Comments are welcome...

Well, I have a comment - not for the suggestion, but for the association -:)

Why not introduce CLAI (Comp.Lang.Ada-Issue), a kind of user-level AI ?

Both mentioned proposals may well be included there, along with several others.

A proposal will naturally belong to CLAI set if it makes some sense for users,
generally doesn't contradict Ada language, but have little chance to be accepted
by ARG due to low value/effort criteria for that proposal.

A formal criteria for inclusion into CLAI set may be explicit statement in
comp.lang.ada from at least 1 ARG member that he (I still never seen "she"
there -:) thinks that the proposal satisfies the above informal criteria.

I venture to think that AdaWorld website (for example) may host a page (or
pages) carrying those CLAI.

This my suggestion isn't aimed against recurring discussions in comp.lang.ada
about those issues. I just came to think that it might be sometimes useful
to have a humble repository for such proposals, at least for two purposes:
first, having a place to which a reference can be made, and second, having
an opportunity to review the whole list of them. (Letting imagination go wild,
one may expect that arguments pro and contra a CLAI may be collected and listed
also, thus providing some picture and even, in lucky circumctances, paving
the CLAI a way to become a true AI.)




Alexander Kopilovitch                      aek@vib.usr.pu.ru
Saint-Petersburg
Russia




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-10-31 21:02 Gautier Write-only
                   ` (2 preceding siblings ...)
  2003-11-01  3:39 ` Alexandre E. Kopilovitch
@ 2003-11-01  4:07 ` Alexandre E. Kopilovitch
  2003-11-03  8:22   ` Lutz Donnerhacke
  2003-11-01  7:09 ` Russ
  2003-11-03 10:47 ` Dmitry A. Kazakov
  5 siblings, 1 reply; 223+ messages in thread
From: Alexandre E. Kopilovitch @ 2003-11-01  4:07 UTC (permalink / raw)
  To: comp.lang.ada

Dmytry Lavrov wrote:
>Ha,USSR produced first and last(but don't sure) non-binary computer
>with base 3
I remember the place in Russian translation of Knuth' "The Art of Computer
Programming", where Knuth said something like "it is generally possible that
somewhere, for example, on Mars, one might design 3-base computer", and
translation editor's footnote remarked that such a computer was actually
designed and built in USSR.




Alexander Kopilovitch                      aek@vib.usr.pu.ru
Saint-Petersburg
Russia




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-10-31 21:02 Gautier Write-only
                   ` (3 preceding siblings ...)
  2003-11-01  4:07 ` Alexandre E. Kopilovitch
@ 2003-11-01  7:09 ` Russ
  2003-11-01 10:29   ` Pascal Obry
  2003-11-03 10:47 ` Dmitry A. Kazakov
  5 siblings, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-01  7:09 UTC (permalink / raw)


Gautier Write-only <gautier@fakeaddress.nil> wrote in message news:<3FA2CDCB.500F4AF0@fakeaddress.nil>...

>  To sum up, I'd describe the current situation so 
> 
>  - beginner-repellent and newcomer-repellent (not to be neglected !) 
>  - ugly 
>  - redundant 
>  - causes a readability problem and possible confusions 
>  - pushes the real thing, i.e. the programming contents after 
>  "procedure/package... is", too far away of the source's top 
>  - needs too much administration 
> 
>  My proposal: a "with and use" clause. "with and use A[,B]" would 
>  mean "with A[,B]; use A[,B]". 
> 
>  (C) 
> 
>  -- (1) With'ed only 
>  with Ada.Command_Line; 
> 
>  -- (2) With'ed and Use'd 
>  with and use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 

Fabulous idea! I'd refine it one step further to "with/use":

with/use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01  7:09 ` Russ
@ 2003-11-01 10:29   ` Pascal Obry
  2003-11-01 11:57     ` Marius Amado Alves
  2003-11-01 13:24     ` Gautier Write-only
  0 siblings, 2 replies; 223+ messages in thread
From: Pascal Obry @ 2003-11-01 10:29 UTC (permalink / raw)



18k11tm001@sneakemail.com (Russ) writes:

> Gautier Write-only <gautier@fakeaddress.nil> wrote in message news:<3FA2CDCB.500F4AF0@fakeaddress.nil>...
> 
> >  -- (1) With'ed only 
> >  with Ada.Command_Line; 
> > 
> >  -- (2) With'ed and Use'd 
> >  with and use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 
> 
> Fabulous idea! I'd refine it one step further to "with/use":

I really don't like this idea. This will just help writing bad Ada programs. I
think that a use clause must be avoided if possible and if not the use
clause should be put the more local possible (inside the routines that really
use feature from the package). This helps understanding the program
better. Having hundreds of with/use at the start of a program is the better
way to get lost !

And of course "with/use" is not something we want. There is no '/' in
reserved words!

Just my 2 cents,
Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01 10:29   ` Pascal Obry
@ 2003-11-01 11:57     ` Marius Amado Alves
  2003-11-01 13:24     ` Gautier Write-only
  1 sibling, 0 replies; 223+ messages in thread
From: Marius Amado Alves @ 2003-11-01 11:57 UTC (permalink / raw)
  To: comp.lang.ada

On Sat, 2003-11-01 at 10:29, Pascal Obry wrote:
> I really don't like this idea. This will just help writing bad Ada programs. I
> think that a use clause must be avoided if possible and if not the use
> clause should be put the more local possible (inside the routines that really
> use feature from the package). This helps understanding the program
> better. Having hundreds of with/use at the start of a program is the better
> way to get lost !
> 
> And of course "with/use" is not something we want. There is no '/' in
> reserved words!

For what it's worth, I second Pascal's position.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01 10:29   ` Pascal Obry
  2003-11-01 11:57     ` Marius Amado Alves
@ 2003-11-01 13:24     ` Gautier Write-only
  2003-11-01 22:12       ` Pascal Obry
  1 sibling, 1 reply; 223+ messages in thread
From: Gautier Write-only @ 2003-11-01 13:24 UTC (permalink / raw)


Pascal Obry:

> I really don't like this idea. This will just help writing bad Ada programs. I
> think that a use clause must be avoided if possible and if not the use
> clause should be put the more local possible (inside the routines that really
> use feature from the package).

If you wanted to discourage writing bad programs in that optic, you should
suppress the use_clause as a context_clause (for the non-Manual maniaks,
these are clauses before "procedure" or "package").
The with_and_use_clause won't add any facility, but will reduce typing.

As you say, the usage of "use" must be as local as possible, if even needed.
Sometimes (and it may concern lots of packages in some situations) the
most reasonabily local place for "use" is in a context clause...

> This helps understanding the program
> better. Having hundreds of with/use at the start of a program is the better
> way to get lost !

This is exactly that problem "with and use" will help solving.
If you move one context "use" to ten local places just to lighten
the start of your program, you won't necessarily improve the
the overall readability, but add noise a bit further in the program...

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-10-31 22:29 ` Randy Brukardt
@ 2003-11-01 13:39   ` Gautier Write-only
  2003-11-01 14:32     ` Marius Amado Alves
  0 siblings, 1 reply; 223+ messages in thread
From: Gautier Write-only @ 2003-11-01 13:39 UTC (permalink / raw)


> >  My proposal: a "with and use" clause. "with and use A[,B]" would
> >  mean "with A[,B]; use A[,B]".

Randy Brukardt:

> And this is likely to be confusing:
>    with Parent.Child; means with Parent; with Parent.Child;
> but
>    use Parent.Child; just means use Parent.Child;

You mention an existing Ada95 feature, maybe confusing, concerning
the existing "with" and "use" clauses of Ada95!

As discussed in AC, "with and use" adds no new rule but inherits
the existing ones, according to the principle:
"with and use A[,B]" is exactly as if "with A[,B]; use A[,B]" was written.
In your example, "with and use Parent.Child;" will naturally mean
"with Parent; with Parent.Child; use Parent.Child;".

It is a chimically neutral proposal.
The issues it may reveal are already in Ada95.

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01 13:39   ` Gautier Write-only
@ 2003-11-01 14:32     ` Marius Amado Alves
  2003-11-01 16:23       ` Gautier Write-only
  0 siblings, 1 reply; 223+ messages in thread
From: Marius Amado Alves @ 2003-11-01 14:32 UTC (permalink / raw)
  To: comp.lang.ada

On Sat, 2003-11-01 at 13:39, Gautier Write-only wrote:
> "with and use A[,B]" is exactly as if "with A[,B]; use A[,B]" was written.
> In your example, "with and use Parent.Child;" will naturally mean
> "with Parent; with Parent.Child; use Parent.Child;".

This is not an example of the proposed rule is it? Where does "with
Parent;" come from?





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01 14:32     ` Marius Amado Alves
@ 2003-11-01 16:23       ` Gautier Write-only
  2003-11-01 19:59         ` Marius Amado Alves
  0 siblings, 1 reply; 223+ messages in thread
From: Gautier Write-only @ 2003-11-01 16:23 UTC (permalink / raw)


> > "with and use A[,B]" is exactly as if "with A[,B]; use A[,B]" was written.
> > In your example, "with and use Parent.Child;" will naturally mean
> > "with Parent; with Parent.Child; use Parent.Child;".

Marius Amado Alves:

> This is not an example of the proposed rule is it? Where does "with
> Parent;" come from?

The "with Parent;" is implicit, I should have mentioned.
Just like a written "with Parent.Child;" means
"with Parent; with Parent.Child;" in Ada95.

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01 16:23       ` Gautier Write-only
@ 2003-11-01 19:59         ` Marius Amado Alves
  0 siblings, 0 replies; 223+ messages in thread
From: Marius Amado Alves @ 2003-11-01 19:59 UTC (permalink / raw)
  To: comp.lang.ada

On Sat, 2003-11-01 at 16:23, Gautier Write-only wrote:
> The "with Parent;" is implicit, I should have mentioned.
> Just like a written "with Parent.Child;" means
> "with Parent; with Parent.Child;" in Ada95.

Ok. Technically I don't think I have anything against the strictly
syntactic sugar rule. However this is just one more of the thousand 1
man week modifications. And to me there are a lot of other such
modifications that are much more useful e.g. the recently discussed
number base extension to 36.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01 13:24     ` Gautier Write-only
@ 2003-11-01 22:12       ` Pascal Obry
  2003-11-02 10:45         ` Stephane Richard
  2003-11-03 22:04         ` Gautier Write-only
  0 siblings, 2 replies; 223+ messages in thread
From: Pascal Obry @ 2003-11-01 22:12 UTC (permalink / raw)



Gautier Write-only <gautier@fakeaddress.nil> writes:

> If you wanted to discourage writing bad programs in that optic, you should
> suppress the use_clause as a context_clause (for the non-Manual maniaks,
> these are clauses before "procedure" or "package").
> The with_and_use_clause won't add any facility, but will reduce typing.

Which is not what is important. I don't think that the language will be
changed just to "reduce typing".

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01 22:12       ` Pascal Obry
@ 2003-11-02 10:45         ` Stephane Richard
  2003-11-02 11:34           ` Preben Randhol
  2003-11-03  5:59           ` Russ
  2003-11-03 22:04         ` Gautier Write-only
  1 sibling, 2 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-02 10:45 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]


"Pascal Obry" <p.obry@wanadoo.fr> wrote in message
news:uekwr4u1k.fsf@wanadoo.fr...
>
> Gautier Write-only <gautier@fakeaddress.nil> writes:
>
> > If you wanted to discourage writing bad programs in that optic, you
should
> > suppress the use_clause as a context_clause (for the non-Manual maniaks,
> > these are clauses before "procedure" or "package").
> > The with_and_use_clause won't add any facility, but will reduce typing.
>
> Which is not what is important. I don't think that the language will be
> changed just to "reduce typing".
>
> Pascal.

Agreed, who has it in his signature quote that: "Saving keystrokes is the
job of the Editor, not of the programming langiage" ?  ;-)


-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-02 10:45         ` Stephane Richard
@ 2003-11-02 11:34           ` Preben Randhol
  2003-11-02 12:04             ` Stephane Richard
  2003-11-02 13:03             ` Marin David Condic
  2003-11-03  5:59           ` Russ
  1 sibling, 2 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-02 11:34 UTC (permalink / raw)


On 2003-11-02, Stephane Richard <stephane.richard@verizon.net> wrote:
> Agreed, who has it in his signature quote that: "Saving keystrokes is the
> job of the Editor, not of the programming langiage" ?  ;-)

Me :-)

And now as I have a bit time I'm working on my ada-suit for vim to save
keystrokes.

Example : Writing 

   _PRC will give:

   procedure *
   is
      <++>
   begin
      <++>
   end <++>;

(* marks where the cursor will be placed. Then you hit Ctrl-J to jump to
<++> which gets removed)

or \aps if you want the interactive version which will ask for procedure
name arguments etc...

Shortcuts are customisable.

Preben
-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01  3:39 ` Alexandre E. Kopilovitch
@ 2003-11-02 12:03   ` Stephane Richard
  2003-11-03  2:26     ` Alexandre E. Kopilovitch
  0 siblings, 1 reply; 223+ messages in thread
From: Stephane Richard @ 2003-11-02 12:03 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2438 bytes --]

"Alexandre E. Kopilovitch" <aek@vib.usr.pu.ru> wrote in message
news:mailman.246.1067657416.25614.comp.lang.ada@ada-france.org...
> Gautier Write-only wrote:
> >Peter Hermann's post about number_base reminds me on a suggestion of mine
> >about a "with and use" clause in AC ! Comments are welcome...
>
> Well, I have a comment - not for the suggestion, but for the
association -:)
>
> Why not introduce CLAI (Comp.Lang.Ada-Issue), a kind of user-level AI ?
>
> Both mentioned proposals may well be included there, along with several
others.
>
> A proposal will naturally belong to CLAI set if it makes some sense for
users,
> generally doesn't contradict Ada language, but have little chance to be
accepted
> by ARG due to low value/effort criteria for that proposal.
>
> A formal criteria for inclusion into CLAI set may be explicit statement in
> comp.lang.ada from at least 1 ARG member that he (I still never seen "she"
> there -:) thinks that the proposal satisfies the above informal criteria.
>
> I venture to think that AdaWorld website (for example) may host a page (or
> pages) carrying those CLAI.
>
> This my suggestion isn't aimed against recurring discussions in
comp.lang.ada
> about those issues. I just came to think that it might be sometimes useful
> to have a humble repository for such proposals, at least for two purposes:
> first, having a place to which a reference can be made, and second, having
> an opportunity to review the whole list of them. (Letting imagination go
wild,
> one may expect that arguments pro and contra a CLAI may be collected and
listed
> also, thus providing some picture and even, in lucky circumctances, paving
> the CLAI a way to become a true AI.)
>
> Alexander Kopilovitch                      aek@vib.usr.pu.ru
> Saint-Petersburg
> Russia

I like the idea, and I'm more than willing to make it happen too :-).
Here's a few questions that you and other interested parties might want to
answer.

How to do picture this CLAI?

How would you (and the others too) like to see this created?

How would you like to create/edit issues?

Would there be official categories to consider, like syntax issues,
libraries issues, etc etc...to help search and post issues in the right
places?  if so perhaps a list of them, to start with might be a good idea.


I'll start with these questions and see where it takes us :-).

-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-02 11:34           ` Preben Randhol
@ 2003-11-02 12:04             ` Stephane Richard
  2003-11-02 13:03             ` Marin David Condic
  1 sibling, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-02 12:04 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

Ahhh there you are :-).  I got your quote written on my wall ;-).

-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com


"Preben Randhol" <randhol+valid_for_reply_from_news@pvv.org> wrote in
message
news:slrnbq9qti.qu.randhol+valid_for_reply_from_news@kiuk0156.chembio.ntnu.no...
> On 2003-11-02, Stephane Richard <stephane.richard@verizon.net> wrote:
> > Agreed, who has it in his signature quote that: "Saving keystrokes is
the
> > job of the Editor, not of the programming langiage" ?  ;-)
>
> Me :-)
>
> And now as I have a bit time I'm working on my ada-suit for vim to save
> keystrokes.
>
> Example : Writing
>
>    _PRC will give:
>
>    procedure *
>    is
>       <++>
>    begin
>       <++>
>    end <++>;
>
> (* marks where the cursor will be placed. Then you hit Ctrl-J to jump to
> <++> which gets removed)
>
> or \aps if you want the interactive version which will ask for procedure
> name arguments etc...
>
> Shortcuts are customisable.
>
> Preben
> -- 
> "Saving keystrokes is the job of the text editor, not the programming
>  language."





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-02 11:34           ` Preben Randhol
  2003-11-02 12:04             ` Stephane Richard
@ 2003-11-02 13:03             ` Marin David Condic
  2003-11-02 13:10               ` Stephane Richard
                                 ` (2 more replies)
  1 sibling, 3 replies; 223+ messages in thread
From: Marin David Condic @ 2003-11-02 13:03 UTC (permalink / raw)


There's an article in the Nov 03 issue of Communications of the ACM 
called "Measuring Productivity In The Software Industry" Among other 
things it talks about "Understandibility" and the energy lost in trying 
to decrypt algorithms coded to minimize the number of keystrokes used to 
write them. The authors think that "economy of expression" is 
counter-productive. (Although, like most articles on productivity, they 
don't have any data to back it up.)

Its an interesting article, although I find it problematic that they 
(like others) make the comparison between software productivity and 
microprocessor chip speed. (Basically that microprocessors keep doubling 
in speed every so many months and yet software productivity seems to 
even be slowing down.) I find this comparison totally unreasonable 
because the two things are entirely qualitatively different. What does 
the speed at which one tool *runs* have to do with the time it takes to 
design another tool? Because Dodge came out with the Viper - which can 
run double the speed of the Neon - that should make their engineers 
design carbeurators at twice the speed?

It *might* be fair to compare the *Design Time* of a microprocessor to 
the *Design Time* of a software system - but even there, I find a 
qualitative difference. In electronics, a designer can develop circuitry 
for some function and use it like a brick - put a few million of them 
into the chip. He gets credit for a million whozits units on the chip 
but really only *designed* one of them. A software engineer designs a 
blivet and then moves on to design the next blivet. Does he get credit 
for the million times the first blivet gets called in some loop 
somewhere? No - he gets credit for designing two blivets. The two things 
just can't be counted the same way.

Anyway, its an interesting article and I liked the criticism of "terse" 
programming as being counter-productive.

MDC



Preben Randhol wrote:
> 
> Shortcuts are customisable.
> 



-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "So if I understand 'The Matrix Reloaded' correctly, the Matrix is
     basically a Microsoft operating system - it runs for a while and
     then crashes and reboots. By design, no less. Neo is just a
     memory leak that's too hard to fix, so they left him in... The
     users don't complain because they're packed in slush and kept
     sedated"

         --  Marin D. Condic
======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-02 13:03             ` Marin David Condic
@ 2003-11-02 13:10               ` Stephane Richard
       [not found]               ` <pn4g71-ned.ln1@beastie.ix.netcom.com>
  2003-11-03 14:36               ` Preben Randhol
  2 siblings, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-02 13:10 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]


"Marin David Condic" <nobody@noplace.com> wrote in message
news:3FA50083.10709@noplace.com...
> There's an article in the Nov 03 issue of Communications of the ACM
> called "Measuring Productivity In The Software Industry" Among other
> things it talks about "Understandibility" and the energy lost in trying
> to decrypt algorithms coded to minimize the number of keystrokes used to
> write them. The authors think that "economy of expression" is
> counter-productive. (Although, like most articles on productivity, they
> don't have any data to back it up.)
>
> Its an interesting article, although I find it problematic that they
> (like others) make the comparison between software productivity and
> microprocessor chip speed. (Basically that microprocessors keep doubling
> in speed every so many months and yet software productivity seems to
> even be slowing down.) I find this comparison totally unreasonable
> because the two things are entirely qualitatively different. What does
> the speed at which one tool *runs* have to do with the time it takes to
> design another tool? Because Dodge came out with the Viper - which can
> run double the speed of the Neon - that should make their engineers
> design carbeurators at twice the speed?
>
> It *might* be fair to compare the *Design Time* of a microprocessor to
> the *Design Time* of a software system - but even there, I find a
> qualitative difference. In electronics, a designer can develop circuitry
> for some function and use it like a brick - put a few million of them
> into the chip. He gets credit for a million whozits units on the chip
> but really only *designed* one of them. A software engineer designs a
> blivet and then moves on to design the next blivet. Does he get credit
> for the million times the first blivet gets called in some loop
> somewhere? No - he gets credit for designing two blivets. The two things
> just can't be counted the same way.
>
> Anyway, its an interesting article and I liked the criticism of "terse"
> programming as being counter-productive.
>
> MDC
>

I hear ya.  If you take that to the programming world,  the easier you want
an application to be for it's user the more design (and cosequently
programming) it needs.  Plain and simple. :-)

-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
       [not found]               ` <pn4g71-ned.ln1@beastie.ix.netcom.com>
@ 2003-11-02 22:25                 ` Marin David Condic
  2003-11-04 17:25                   ` Warren W. Gay VE3WWG
  0 siblings, 1 reply; 223+ messages in thread
From: Marin David Condic @ 2003-11-02 22:25 UTC (permalink / raw)


O.K. So I'm showing signs of age. :-) Maybe you can still find a 
carburator on a lawnmower.

I still have "records" and a turntable. When my wife first saw them in 
my house, she said "What are those???" - the times thay have changed, eh?

MDC

Dennis Lee Bieber wrote:
> 
>         You'd have to train the current engineers on how a carburator /works/ 
> first <G>
> 
>         I haven't seen a carburated engine since mid-80s. Even throttle-body 
> injectors seem to be a thing of the past.
> 
>         All that seems to be left is the design of the throttle-body itself -- 
> a valved air-plenum; no fuel jets of any type.
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "So if I understand 'The Matrix Reloaded' correctly, the Matrix is
     basically a Microsoft operating system - it runs for a while and
     then crashes and reboots. By design, no less. Neo is just a
     memory leak that's too hard to fix, so they left him in... The
     users don't complain because they're packed in slush and kept
     sedated"

         --  Marin D. Condic
======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-02 12:03   ` Stephane Richard
@ 2003-11-03  2:26     ` Alexandre E. Kopilovitch
  0 siblings, 0 replies; 223+ messages in thread
From: Alexandre E. Kopilovitch @ 2003-11-03  2:26 UTC (permalink / raw)
  To: comp.lang.ada

Stephane Richard wrote:

> > Why not introduce CLAI (Comp.Lang.Ada-Issue), a kind of user-level AI ?
> >
> > Both mentioned proposals may well be included there, along with several others.
> >
> > A proposal will naturally belong to CLAI set if it makes some sense for users,
> > generally doesn't contradict Ada language, but have little chance to be accepted
> > by ARG due to low value/effort criteria for that proposal.
> >
> > A formal criteria for inclusion into CLAI set may be explicit statement in
> > comp.lang.ada from at least 1 ARG member that he (I still never seen "she"
> > there -:) thinks that the proposal satisfies the above informal criteria.
> >
> > I venture to think that AdaWorld website (for example) may host a page (or
> > pages) carrying those CLAI.
> >
> > This my suggestion isn't aimed against recurring discussions in comp.lang.ada
> > about those issues. I just came to think that it might be sometimes useful
> > to have a humble repository for such proposals, at least for two purposes:
> > first, having a place to which a reference can be made, and second, having
> > an opportunity to review the whole list of them. (Letting imagination go wild,
> > one may expect that arguments pro and contra a CLAI may be collected and listed
> > also, thus providing some picture and even, in lucky circumctances, paving
> > the CLAI a way to become a true AI.)
>
> I like the idea, and I'm more than willing to make it happen too :-).
> Here's a few questions that you and other interested parties might want to
> answer.
>
> How to do picture this CLAI?

I'm not sure that I understand this your question (our English dialects
probably differ at this point -;) . If you mean an icon for the link to the
CLA page, then it may be something like 

http://www.grmuseum.org/whatsnew/Corbyonknees.jpg

-:)  Or something else... -:)

> How would you (and the others too) like to see this created?

I imagine a separate page for the whole list of CLAIs. Each entry in this list
has unique CLAI-id (CLAI-nnn), short description and very short code example.
Every CLAI-id points to another page, specific for this CLAI, on which full
proposition is fully described, following with an array of comments.

> How would you like to create/edit issues?

I think that the site owner/webmaster only should change the contents of that
part of the site, that is, no direct uploads or changes by other persons shoul
be allowed. Only original author of a published CLAI (or a comment to it) may
request its deletion or change of that entry; moreover, if a CLAI has comments
or a comment has dependent comments then this CLAI or comment should not be
deleted anyway, it should be made anonymous instead,

So, we have 3 types of requests: add new CLAI, add a comment, remove (or made
anonymous) a CLAI or comment. And 1 type of clearance: statement from a member
of the ARG that proposed CLAI generally does not contradict Ada (in some
reasonable sense) and does not pose immediate threat to Ada's important features
(such as high degree of upward compatibility). All that requests as well as
a clearance should be posted in comp.land.ada, and picked from there.

> Would there be official categories to consider, like syntax issues,
> libraries issues, etc etc...to help search and post issues in the right
> places?  if so perhaps a list of them, to start with might be a good idea.

I do not think that categorization is needed from the start. Judging from recent
(say, 1 year back period) discussions in comp.lang.ada, right now we may have
3-5 CLAIs for publication. I do not think that categorization is usefulf before
the list exceeds, say, 10-15 entries. It is usually unpleasant, and perhaps
even annoying to see a page with just 2-3 categories, with 1-2 entries in each,
or a list of 10 categories, 8 of which are empty.



Alexander Kopilovitch                      aek@vib.usr.pu.ru
Saint-Petersburg
Russia




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-02 10:45         ` Stephane Richard
  2003-11-02 11:34           ` Preben Randhol
@ 2003-11-03  5:59           ` Russ
  2003-11-03 14:32             ` Preben Randhol
                               ` (2 more replies)
  1 sibling, 3 replies; 223+ messages in thread
From: Russ @ 2003-11-03  5:59 UTC (permalink / raw)


"Stephane Richard" <stephane.richard@verizon.net> wrote in message news:<Ve5pb.36825$294.35899@nwrdny03.gnilink.net>...
> "Pascal Obry" <p.obry@wanadoo.fr> wrote in message
> news:uekwr4u1k.fsf@wanadoo.fr...
> >
> > Gautier Write-only <gautier@fakeaddress.nil> writes:
> >
> > > If you wanted to discourage writing bad programs in that optic, you
>  should
> > > suppress the use_clause as a context_clause (for the non-Manual maniaks,
> > > these are clauses before "procedure" or "package").
> > > The with_and_use_clause won't add any facility, but will reduce typing.
> >
> > Which is not what is important. I don't think that the language will be
> > changed just to "reduce typing".
> >
> > Pascal.
> 
> Agreed, who has it in his signature quote that: "Saving keystrokes is the
> job of the Editor, not of the programming langiage" ?  ;-)

OK, I think I'm starting to get it. Redundant keystrokes are what make
Ada the great language it is! I guess I was just too stubborn to see
that sooner. Now that I see the light, let me propose a way to use
even more redundant keystrokes:

   with My_Great_Package;
   use My_Great_Package;
   Yes_I_really_mean_use My_Great_Package;
   No_I_am_not_kidding_use My_Great_Package;
   Did_you_read_that_correctly_use My_Great_Package;
   Oh_and_dont_forget_with My_Great_Package;
   Oh_by_the_way_I_think_Ill_use_another_language My_Great_Package;
   because_this_one_is_ridiculous My_Great_Package;

Customizing your editor to automate this should be a breeze, and this
will make Ada rock!

It's really painful to see a great language die of overzealous
followers.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01  4:07 ` Alexandre E. Kopilovitch
@ 2003-11-03  8:22   ` Lutz Donnerhacke
  2003-11-03 17:37     ` Alexandre E. Kopilovitch
  0 siblings, 1 reply; 223+ messages in thread
From: Lutz Donnerhacke @ 2003-11-03  8:22 UTC (permalink / raw)


* Alexandre E. Kopilovitch wrote:
> Dmytry Lavrov wrote:
>>Ha,USSR produced first and last(but don't sure) non-binary computer
>>with base 3
>
> I remember the place in Russian translation of Knuth' "The Art of Computer
> Programming", where Knuth said something like "it is generally possible that
> somewhere, for example, on Mars, one might design 3-base computer", and
> translation editor's footnote remarked that such a computer was actually
> designed and built in USSR.

TAoCP, Vol. 2, Chapter 3 constains a paragraph about an implementation of an
tribinary computer ((1, 0, -1) as bits) from the former CCCP.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-10-31 21:02 Gautier Write-only
                   ` (4 preceding siblings ...)
  2003-11-01  7:09 ` Russ
@ 2003-11-03 10:47 ` Dmitry A. Kazakov
  2003-11-03 16:30   ` Robert I. Eachus
                     ` (2 more replies)
  5 siblings, 3 replies; 223+ messages in thread
From: Dmitry A. Kazakov @ 2003-11-03 10:47 UTC (permalink / raw)


On Fri, 31 Oct 2003 22:02:03 +0100, Gautier Write-only
<gautier@fakeaddress.nil> wrote:

>Peter Hermann's post about number_base reminds me on a suggestion of mine
>about a "with and use" clause in AC ! Comments are welcome...
>Original proposal follows:
>____
>
>Proposal for a "with and use" clause 
>
> Hello! 
>
> Almost the only thing I find tedious in Ada is the obligation 
> to name twice packages you intend to _use_ in a context_clause. 
> I illustrate with examples two usual ways of organizing context clauses: 
>
> (A) 
>
> -- (1) With'ed only 
> with Ada.Command_Line; 
>
> -- (2) With'ed and Use'd 
> with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 
> use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; 
>
> Problem: in practice the list pair (2) is a lot longer (many many lines) and 
>         becomes difficult to synchronize. It is also difficult then to 
>         _verify_ that the pair is consistent 
>
> (B) 
>
> -- (1) With'ed only 
> with Ada.Command_Line; 
>
> -- (2) With'ed and Use'd 
> with Ada.Text_IO;                       use Ada.Text_IO; 
> with Ada.Integer_Text_IO;               use Ada.Integer_Text_IO; 
> with Ada.Float_Text_IO;                 use Ada.Float_Text_IO; 
>
> Advantage: much easier to verify and transport across sources 
> Problem: the beginning of sources becomes awfully long. 

There was a [simpler / better] proposal that:

use A.B.C.D;

implies:

with A.B.C.D;

It was rejected. Does anybody remember why?

------------
It would be nice to have something like:

use all A.B.C.D; to abbreviate:

use A;
use A.B;
use A.B.C;
use A.B.C.D;

------------
OR, maybe it is worth to invent some mechanism to rename all declared
entities of a package within another package:

package A is
   type Something is ...;
   procedure Foo;
end A;

package B is
   procedure Bar;
end B;

with A, B;
package Proxy is
   rename all A;
      -- = subtype Something is A.Something;
      --    procedure Foo renames A.Foo;
   rename all B;
      -- = procedure Baz renames B.Baz;
end Proxy;

Now one can "use" Proxy to see both A.Foo and B.Baz.

---
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
@ 2003-11-03 11:02 christoph.grein
  0 siblings, 0 replies; 223+ messages in thread
From: christoph.grein @ 2003-11-03 11:02 UTC (permalink / raw)
  To: comp.lang.ada

> OK, I think I'm starting to get it. Redundant keystrokes are what make
> Ada the great language it is! I guess I was just too stubborn to see
> that sooner. Now that I see the light, let me propose a way to use
> even more redundant keystrokes:
> 
>    with My_Great_Package;
>    use My_Great_Package;
>    Yes_I_really_mean_use My_Great_Package;
>    No_I_am_not_kidding_use My_Great_Package;
>    Did_you_read_that_correctly_use My_Great_Package;
>    Oh_and_dont_forget_with My_Great_Package;
>    Oh_by_the_way_I_think_Ill_use_another_language My_Great_Package;
>    because_this_one_is_ridiculous My_Great_Package;

LOL, ROFL



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03  5:59           ` Russ
@ 2003-11-03 14:32             ` Preben Randhol
  2003-11-03 22:11               ` Gautier Write-only
  2003-11-03 15:35             ` Stephane Richard
  2003-11-03 16:26             ` Robert I. Eachus
  2 siblings, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-03 14:32 UTC (permalink / raw)


On 2003-11-03, Russ <18k11tm001@sneakemail.com> wrote:
>
> OK, I think I'm starting to get it. Redundant keystrokes are what make
> Ada the great language it is! I guess I was just too stubborn to see
> that sooner. Now that I see the light, let me propose a way to use
> even more redundant keystrokes:

No, you will never get it. Try read the design goals 10 more times and
perhaps you will finally understand the points about readability versus
writeability.

> It's really painful to see a great language die of overzealous
> followers.

As are stupid arguments kept alive by overzealous believers.

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-02 13:03             ` Marin David Condic
  2003-11-02 13:10               ` Stephane Richard
       [not found]               ` <pn4g71-ned.ln1@beastie.ix.netcom.com>
@ 2003-11-03 14:36               ` Preben Randhol
  2003-11-04  9:57                 ` Marin David Condic
  2 siblings, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-03 14:36 UTC (permalink / raw)


On 2003-11-02, Marin David Condic <nobody@noplace.com> wrote:
> There's an article in the Nov 03 issue of Communications of the ACM 
> called "Measuring Productivity In The Software Industry" Among other 
> things it talks about "Understandibility" and the energy lost in trying 
> to decrypt algorithms coded to minimize the number of keystrokes used to 
> write them. The authors think that "economy of expression" is 
> counter-productive. (Although, like most articles on productivity, they 
> don't have any data to back it up.)

Sounds reasonable. One could also compare a 10 line poem to a 2 page
story. I think one would finish the latter faster. By that I mean
understand it.

Preben
-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03  5:59           ` Russ
  2003-11-03 14:32             ` Preben Randhol
@ 2003-11-03 15:35             ` Stephane Richard
  2003-11-03 16:26             ` Robert I. Eachus
  2 siblings, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-03 15:35 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2432 bytes --]


"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311022159.345d7cab@posting.google.com...
> OK, I think I'm starting to get it. Redundant keystrokes are what make
> Ada the great language it is! I guess I was just too stubborn to see
> that sooner. Now that I see the light, let me propose a way to use
> even more redundant keystrokes:
>
>    with My_Great_Package;
>    use My_Great_Package;
>    Yes_I_really_mean_use My_Great_Package;
>    No_I_am_not_kidding_use My_Great_Package;
>    Did_you_read_that_correctly_use My_Great_Package;
>    Oh_and_dont_forget_with My_Great_Package;
>    Oh_by_the_way_I_think_Ill_use_another_language My_Great_Package;
>    because_this_one_is_ridiculous My_Great_Package;
>
*** If you want to write this series of withs and uses, be my guess, but if
you think that's what Ada is all about, you need to get back to basics.

> Customizing your editor to automate this should be a breeze, and this
> will make Ada rock!
>
*** No that's not what makes Ada rocks, what makes ada rock is the many
errors it can detect at compile time which helps Ada (unlike C, C++ Pascal
and you can continue the list here) produce finalized applications much
sooner than you could ever hope for in C or C++.  It's also all the
supported software engineering principles added to the language to make it
much easier than C or C++ to manage itself.  See my ada advocacy page if you
want a list, but you wont be able to tell me that anything I mention in
there isn't true. take a look at the links I got there in the last section
of the advocacy too for even more details.

> It's really painful to see a great language die of overzealous
> followers.

Die?  Maybe you should have been the one to contact the compiler vendors
instead of me ;-).  we'll see what dies when it does.  We'll talk again
then.  I come from the C++ world too you know, and shorter keywords did not
contribute to me staying with C++ one single bit it was more the other way
around.

You think all the support C++ currently has today will give it eternal life
or something?  As I keep on saying, C++ and Java mosty (but other languages
too) became popular for all the wrong reasons, all based on a "monkey see,
monkey doo" principle.  Today, they are beginning to realize that, I know I
did, and I know I'm not the only one of the corporate world.


-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03  5:59           ` Russ
  2003-11-03 14:32             ` Preben Randhol
  2003-11-03 15:35             ` Stephane Richard
@ 2003-11-03 16:26             ` Robert I. Eachus
  2003-11-04  7:28               ` Vinzent 'Gadget' Hoefler
  2 siblings, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-03 16:26 UTC (permalink / raw)


Russ wrote:

> OK, I think I'm starting to get it. Redundant keystrokes are what make
> Ada the great language it is! I guess I was just too stubborn to see
> that sooner. Now that I see the light, let me propose a way to use
> even more redundant keystrokes:

No, what makes Ada the wonderful language that it is, is the effort put 
into scrutinizing every proposed change to see what effects it will have 
on all the "-ilities," especially in this case readability and 
maintainability, to decide whether a proposed improvement really will be 
an improvement overall.

Having said that, let me make a suggestion that might be an improvement 
on this one.  Add a "use all" clause.  This would indictate that all 
withed packages and their parents should be used.  Probably useful as 
such only in small demo programs.  But "use all Ada.Strings;" would be a 
generally useful form, indicating that Ada.Strings, and all nested or 
child packages that are visible should be made "use" visible.

Whether it should include generic instances would be worth discussing. 
I think that if it included all generic instances visible at the place 
of the "use all" clause would be an interesting extension to consider. 
I think not.  Instead create a child of Text_IO, Ada.Text_IO.Intances 
that contained instances of the various Text_IO generics for all 
predefined types (probably excepting instances of Enumeration_IO).  So 
with such a package:

package Ada.Text_IO.Instances is
    package Integer_Text_IO is new Integer_IO(Integer);
    package Long_Integer_Text_IO is new Integer_IO(Long_Integer);
    package Short_Integer_Text_IO is new Integer_IO(Short_Integer);
    package Float_Text_IO is new Float_IO(Float);
    package Long_Float_Text_IO is new Float_IO(Long_Float);
    package Duration_Text_IO is new Fixed_IO(Duration);
end Ada.Text_IO.Instances;

You could then put a with Ada.Text_IO.Instances at the beginning of 
appropriate units, and a "use all Ada.Text_IO.Instances;" in nested 
scopes where the actual IO is done.

-- 

                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03 10:47 ` Dmitry A. Kazakov
@ 2003-11-03 16:30   ` Robert I. Eachus
  2003-11-03 22:07   ` Gautier Write-only
  2003-11-04  7:28   ` Vinzent 'Gadget' Hoefler
  2 siblings, 0 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-03 16:30 UTC (permalink / raw)


Dmitry A. Kazakov wrote:

> It would be nice to have something like:
> 
> use all A.B.C.D; to abbreviate:
> 
> use A;
> use A.B;
> use A.B.C;
> use A.B.C.D;
> 
> ------------
> OR, maybe it is worth to invent some mechanism to rename all declared
> entities of a package within another package:
> 
> package A is
>    type Something is ...;
>    procedure Foo;
> end A;
> 
> package B is
>    procedure Bar;
> end B;
> 
> with A, B;
> package Proxy is
>    rename all A;
>       -- = subtype Something is A.Something;
>       --    procedure Foo renames A.Foo;
>    rename all B;
>       -- = procedure Baz renames B.Baz;
> end Proxy;
> 
> Now one can "use" Proxy to see both A.Foo and B.Baz.

Great minds think alike.  I just posted a similar proposal for "use 
all," but I suggested a simpler approach to creating aggregate scopes to 
use it with.

-- 
 
Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03  8:22   ` Lutz Donnerhacke
@ 2003-11-03 17:37     ` Alexandre E. Kopilovitch
  0 siblings, 0 replies; 223+ messages in thread
From: Alexandre E. Kopilovitch @ 2003-11-03 17:37 UTC (permalink / raw)
  To: comp.lang.ada

Lutz Donnerhacke wrote:

> > I remember the place in Russian translation of Knuth' "The Art of Computer
> > Programming", where Knuth said something like "it is generally possible that
> > somewhere, for example, on Mars, one might design 3-base computer", and
> > translation editor's footnote remarked that such a computer was actually
> > designed and built in USSR.
>
> TAoCP, Vol. 2, Chapter 3 constains a paragraph about an implementation of an
> tribinary computer ((1, 0, -1) as bits) from the former CCCP.

Probably you have more recent edition of TAoCP (relating to the source for
1st Russian translation).




Alexander Kopilovitch                      aek@vib.usr.pu.ru
Saint-Petersburg
Russia





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-01 22:12       ` Pascal Obry
  2003-11-02 10:45         ` Stephane Richard
@ 2003-11-03 22:04         ` Gautier Write-only
  1 sibling, 0 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-11-03 22:04 UTC (permalink / raw)


# > If you wanted to discourage writing bad programs in that optic, you should
# > suppress the use_clause as a context_clause (for the non-Manual maniaks,
# > these are clauses before "procedure" or "package").
# > The with_and_use_clause won't add any facility, but will reduce typing.

Pascal:

# Which is not what is important. I don't think that the language will be
# changed just to "reduce typing".

Why not ?
Several changes from Ada 83 to Ada 95 could be described as a pure
keystroke reduction that improves readability, so it's not impossible
that the language could change again in that direction.

Is such a change worth the effort, although not bringing a new feature ?
I think so. A newcomer to Ada (who can be an experienced programmer,
tempted to start a development in his small business, or a scientist, or...)
will have to begin his prototypes with this bureaucratic aspect.
The first question will be "if there is such a thing in the first step,
will it be all the way so ?". This stupid redundancy problem is hurdle
I have observed in initiating people to Ada. After that, those who have
passed begin to enjoy the modularity, attributes, range checks, portability
and all goodies that are so well done in Ada.

To sum up, this proposal is *technically* of no importance, but IMHO a
*darwinian* sense (survival / growth of Ada), and also for readability, quite
important.
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03 10:47 ` Dmitry A. Kazakov
  2003-11-03 16:30   ` Robert I. Eachus
@ 2003-11-03 22:07   ` Gautier Write-only
  2003-11-04  7:28   ` Vinzent 'Gadget' Hoefler
  2 siblings, 0 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-11-03 22:07 UTC (permalink / raw)


Dmitry A. Kazakov:

> There was a [simpler / better] proposal that:
> 
> use A.B.C.D;
> 
> implies:
> 
> with A.B.C.D;

Effectively, this is overall simpler and better (for the user
as well as the underlying rules).

> It was rejected. Does anybody remember why?

I am curious to know!

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03 14:32             ` Preben Randhol
@ 2003-11-03 22:11               ` Gautier Write-only
  2003-11-04 10:58                 ` Preben Randhol
  0 siblings, 1 reply; 223+ messages in thread
From: Gautier Write-only @ 2003-11-03 22:11 UTC (permalink / raw)


> > OK, I think I'm starting to get it. Redundant keystrokes are what make
> > Ada the great language it is! I guess I was just too stubborn to see
> > that sooner. Now that I see the light, let me propose a way to use
> > even more redundant keystrokes:

Preben Randhol:

> No, you will never get it. Try read the design goals 10 more times and
> perhaps you will finally understand the points about readability versus
> writeability.

They are not always opposed. IMHO with this proposal (whatever form it
takes: "with and use" or "use" with implicit "with") you will gain
in readability _and_ writeability.

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03 16:26             ` Robert I. Eachus
@ 2003-11-04  7:28               ` Vinzent 'Gadget' Hoefler
  0 siblings, 0 replies; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-04  7:28 UTC (permalink / raw)


Robert I. Eachus wrote:

>Having said that, let me make a suggestion that might be an improvement 
>on this one.  Add a "use all" clause.

Hmm. I'd vote for dropping the use clause completely. :->


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03 10:47 ` Dmitry A. Kazakov
  2003-11-03 16:30   ` Robert I. Eachus
  2003-11-03 22:07   ` Gautier Write-only
@ 2003-11-04  7:28   ` Vinzent 'Gadget' Hoefler
  2003-11-06 20:12     ` Gautier Write-only
  2 siblings, 1 reply; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-04  7:28 UTC (permalink / raw)


Dmitry A. Kazakov wrote:

>use A.B.C.D;
>
>implies:
>
>with A.B.C.D;
>
>It was rejected. Does anybody remember why?

I don't know if this was the reason, but AFAICS you can't "with" a
package inbetween a body, but you can locally *use* a package in a
declare block:

|declare
|   use P;
|   ...

So this sort of use would at least require a with-declaration in the
beginning of the package. CMIIW, but all the "with"s in the beginning
just declare package "dependencies", nothing more.


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03 14:36               ` Preben Randhol
@ 2003-11-04  9:57                 ` Marin David Condic
  2003-11-04 11:22                   ` Preben Randhol
  2003-11-04 17:37                   ` Warren W. Gay VE3WWG
  0 siblings, 2 replies; 223+ messages in thread
From: Marin David Condic @ 2003-11-04  9:57 UTC (permalink / raw)


It always "sounds reasonable" - but is it backed up with any *data*? I 
believe the claim because it is reasonable, but obviously, there are 
folks who think that "economy of expression" is the bees knees. Hence 
the strong devotion to cryptic C programming. If you seek to persuade 
that crowd, some data to back up the claim would help.

MDC

Preben Randhol wrote:
> 
> 
> Sounds reasonable. One could also compare a 10 line poem to a 2 page
> story. I think one would finish the latter faster. By that I mean
> understand it.
> 
> Preben


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "So if I understand 'The Matrix Reloaded' correctly, the Matrix is
     basically a Microsoft operating system - it runs for a while and
     then crashes and reboots. By design, no less. Neo is just a
     memory leak that's too hard to fix, so they left him in... The
     users don't complain because they're packed in slush and kept
     sedated"

         --  Marin D. Condic
======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-03 22:11               ` Gautier Write-only
@ 2003-11-04 10:58                 ` Preben Randhol
  2003-11-04 13:16                   ` Hyman Rosen
  0 siblings, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-04 10:58 UTC (permalink / raw)


On 2003-11-03, Gautier Write-only <gautier@fakeaddress.nil> wrote:
> They are not always opposed. IMHO with this proposal (whatever form it
> takes: "with and use" or "use" with implicit "with") you will gain
> in readability _and_ writeability.

Perhaps, but I will claim that anything implicit means it is not
readable. Explicit is. At any rate it is writing:

with Ada.Text_IO;       use Ada.Text_IO;

is shorter than writing

with and use Ada.Text_IO;

because one can write:

with Ada.Text_IO;

and then hit a shortcut which will run a macro copying the line changing
with to use and past it to the end of the corrent line.



implicit:
   1 a : capable of being understood from something else though
         unexpressed : IMPLIED <an implicit assumption> 
     b : involved in the nature or essence of something though 
         not revealed, expressed, or developed 

Preben

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04  9:57                 ` Marin David Condic
@ 2003-11-04 11:22                   ` Preben Randhol
  2003-11-04 12:45                     ` Marin David Condic
  2003-11-04 17:37                   ` Warren W. Gay VE3WWG
  1 sibling, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-04 11:22 UTC (permalink / raw)


On 2003-11-04, Marin David Condic <nobody@noplace.com> wrote:
> It always "sounds reasonable" - but is it backed up with any *data*? I 
> believe the claim because it is reasonable, but obviously, there are 
> folks who think that "economy of expression" is the bees knees. Hence 
> the strong devotion to cryptic C programming. If you seek to persuade 
> that crowd, some data to back up the claim would help.

Sure data are nice and I haven't read the article. However, it has little
to do with computer science. This is study of the human brain and
perception. So comparing it to microchips is not very interesting I
think. However, I find that if I read a book that is well written and
clear on a subject it is easier and faster to comprehend the content.
For a book which uses a lot of implicit rules and theories it takes
longer to graph the content.

I remember when I was a student that some of the books were a nightmare
as it did:

      From eq (1) we have

      equation (1)

      this gives eq:

      equation (2)

where (1) and (2) had a lot of implicit calculations etc...

while it could be written of explained on the blackboards as:

      equation (1)
      equation (1.1)
      equation (1.2)
      equation (1.3)
      equation (1.4)
      equation (1.5)

and then finally

      equation (2)

However, in which of the two cases you learn more can be debated. It can
be said that in the first case, if you take your time, you will
probably learn better by doing all the implied calculations. On the
other hand it can also be said that it is not likely that on do take the
time / have the time to one would learn more by looking over the
calculations between (1) and (2) and understand the progress.

I'm sure that there are studies on this, but that you have to look
outside your field for them.

Consider:

[1.1]

   if calc_value (some_arg) = True then
      --
   else
      --
   end if;

to

[1.2]

   if calc_value (some_arg) then
      --
   else
      --
   end if;

or

[2.1]

   if done = ture then
      --
   end if;

to

[2.2]

   if done then
      --
   end if;

I would say that in some cases [1.1] be more readable
that [1.2], but that [2.2] is more readable than [2.1]

[3.1]

   if not calc_value (some_arg) then

[3.2]

   if calc_value (some_arg) = False then

And I would say [3.2] is much more readable than [3.1].




-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 11:22                   ` Preben Randhol
@ 2003-11-04 12:45                     ` Marin David Condic
  2003-11-04 15:46                       ` Wes Groleau
  0 siblings, 1 reply; 223+ messages in thread
From: Marin David Condic @ 2003-11-04 12:45 UTC (permalink / raw)


I understand what you're saying and I agree that one might find some 
help from fields such as psychology or medicine to help explain what 
sorts of perceptions people have. But consider this: The article in 
question (and we Ada-ites, for that matter - and to bring it back on 
topic) are making a claim about software productivity. We are 
deliberately making language design decisions on the assumption that 
clarity = verbosity and the basis that clarity at the expense of brevity 
  makes software development more productive. Is there any demonstration 
of that or is it just a guess?

For example, there are lots of hackers out there who really love cryptic 
C code and the language was designed to support crypticism (Do I get 
credit for inventing that word? ;-) *They* claim this makes them more 
productive once they have gained the expertise in understanding the 
implications of all the cool, short little operators. Are they more 
productive? What if we're talking about code that is built once and 
lives for a very short time or is otherwise never modified? Would Ada's 
verbosity and long lifecycle support help here?

All of that is a big unknown and it isn't intuitively obvious to *all* 
of the casual observers that the claim is true on the face of it. There 
have been some reasonably scientific comparisons of Ada and C with some 
measuring of productivity that ends up showing Ada to be a clear winner. 
But a lot of factors go into that. Is the avoidance of crypticism part 
of it? Probably. But it would help if there was some evidence to support 
that claim.

MDC


Preben Randhol wrote:
> On 2003-11-04, Marin David Condic <nobody@noplace.com> wrote:
> 
> Sure data are nice and I haven't read the article. However, it has little
> to do with computer science. This is study of the human brain and
> perception. So comparing it to microchips is not very interesting I
> think. However, I find that if I read a book that is well written and
> clear on a subject it is easier and faster to comprehend the content.
> For a book which uses a lot of implicit rules and theories it takes
> longer to graph the content.
> 
> I remember when I was a student that some of the books were a nightmare
> as it did:
> 
>       From eq (1) we have
> 
>       equation (1)
> 
>       this gives eq:
> 
>       equation (2)
> 
> where (1) and (2) had a lot of implicit calculations etc...
> 
> while it could be written of explained on the blackboards as:
> 
>       equation (1)
>       equation (1.1)
>       equation (1.2)
>       equation (1.3)
>       equation (1.4)
>       equation (1.5)
> 
> and then finally
> 
>       equation (2)
> 
> However, in which of the two cases you learn more can be debated. It can
> be said that in the first case, if you take your time, you will
> probably learn better by doing all the implied calculations. On the
> other hand it can also be said that it is not likely that on do take the
> time / have the time to one would learn more by looking over the
> calculations between (1) and (2) and understand the progress.
> 
> I'm sure that there are studies on this, but that you have to look
> outside your field for them.
> 
> Consider:
> 
> [1.1]
> 
>    if calc_value (some_arg) = True then
>       --
>    else
>       --
>    end if;
> 
> to
> 
> [1.2]
> 
>    if calc_value (some_arg) then
>       --
>    else
>       --
>    end if;
> 
> or
> 
> [2.1]
> 
>    if done = ture then
>       --
>    end if;
> 
> to
> 
> [2.2]
> 
>    if done then
>       --
>    end if;
> 
> I would say that in some cases [1.1] be more readable
> that [1.2], but that [2.2] is more readable than [2.1]
> 
> [3.1]
> 
>    if not calc_value (some_arg) then
> 
> [3.2]
> 
>    if calc_value (some_arg) = False then
> 
> And I would say [3.2] is much more readable than [3.1].
> 
> 
> 
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "So if I understand 'The Matrix Reloaded' correctly, the Matrix is
     basically a Microsoft operating system - it runs for a while and
     then crashes and reboots. By design, no less. Neo is just a
     memory leak that's too hard to fix, so they left him in... The
     users don't complain because they're packed in slush and kept
     sedated"

         --  Marin D. Condic
======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 10:58                 ` Preben Randhol
@ 2003-11-04 13:16                   ` Hyman Rosen
  2003-11-04 15:09                     ` Vinzent 'Gadget' Hoefler
                                       ` (2 more replies)
  0 siblings, 3 replies; 223+ messages in thread
From: Hyman Rosen @ 2003-11-04 13:16 UTC (permalink / raw)


Preben Randhol wrote:
> with Ada.Text_IO;       use Ada.Text_IO;

The usual arguments of extra verbosity leading to clarity
don't apply to with/use. The problem is that the things in
the use clause don't necessarily have to be identical to
the things in the with clause. That means every time you
see a with/use set, you must verify that the packages in
both are in fact identical, and if they are not, figure
out why that is so.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 13:16                   ` Hyman Rosen
@ 2003-11-04 15:09                     ` Vinzent 'Gadget' Hoefler
  2003-11-04 15:49                     ` Wes Groleau
  2003-11-06 10:55                     ` Preben Randhol
  2 siblings, 0 replies; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-04 15:09 UTC (permalink / raw)


Hyman Rosen wrote:

>Preben Randhol wrote:
>> with Ada.Text_IO;       use Ada.Text_IO;
>
>The usual arguments of extra verbosity leading to clarity
>don't apply to with/use. The problem is that the things in
>the use clause don't necessarily have to be identical to
>the things in the with clause.

-v, please. I don't exactly understand what you mean.

>That means every time you
>see a with/use set, you must verify that the packages in
>both are in fact identical, and if they are not, figure
>out why that is so.

Who? You mean with Ada.Text_IO can reference another Ada.Text_IO that
the one that is "use"d?

Can you provide an example, please? I don't see it.


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 12:45                     ` Marin David Condic
@ 2003-11-04 15:46                       ` Wes Groleau
  2003-11-04 16:08                         ` Marius Amado Alves
  0 siblings, 1 reply; 223+ messages in thread
From: Wes Groleau @ 2003-11-04 15:46 UTC (permalink / raw)


Marin David Condic wrote:
> deliberately making language design decisions on the assumption that 
> clarity = verbosity and the basis that clarity at the expense of brevity 
>  makes software development more productive. Is there any demonstration 

Perhaps some people are.  I'm not making language decisions,
but if I were, it would not be on the basis that
"clarity = verbosity"

It would be

   clarity   = good

   cryptic   = bad

   verbosity = irrelevant

   brevity   = irrelevant

-- 
Wes Groleau
Heroes, Heritage, and History
http://freepages.genealogy.rootsweb.com/~wgroleau/




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 13:16                   ` Hyman Rosen
  2003-11-04 15:09                     ` Vinzent 'Gadget' Hoefler
@ 2003-11-04 15:49                     ` Wes Groleau
  2003-11-06 10:55                     ` Preben Randhol
  2 siblings, 0 replies; 223+ messages in thread
From: Wes Groleau @ 2003-11-04 15:49 UTC (permalink / raw)


Hyman Rosen wrote:
> the things in the with clause. That means every time you
> see a with/use set, you must verify that the packages in
> both are in fact identical, and if they are not, figure

Wrong.  Every time I WRITE a with/use set,
I need to make sure I write what I mean.

I 'with' everything I will be referencing.
I 'use' ONLY those that are less readable
if fully qualified.

Every time I _see_ a with use set, I hope
that the author did the same thing.

-- 
Wes Groleau
   "Grant me the serenity to accept those I cannot change;
    the courage to change the one I can;
    and the wisdom to know it's me."
                                -- unknown




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 15:46                       ` Wes Groleau
@ 2003-11-04 16:08                         ` Marius Amado Alves
  2003-11-06 10:10                           ` Preben Randhol
  2003-11-18  0:07                           ` Brian Gaffney
  0 siblings, 2 replies; 223+ messages in thread
From: Marius Amado Alves @ 2003-11-04 16:08 UTC (permalink / raw)
  To: comp.lang.ada

How about

  with ...; use idem;

(cf. thread on compound assignment)





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-02 22:25                 ` Marin David Condic
@ 2003-11-04 17:25                   ` Warren W. Gay VE3WWG
  0 siblings, 0 replies; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-11-04 17:25 UTC (permalink / raw)


Marin David Condic wrote:
> O.K. So I'm showing signs of age. :-) Maybe you can still find a 
> carburator on a lawnmower.
> 
> I still have "records" and a turntable. When my wife first saw them in 
> my house, she said "What are those???" - the times thay have changed, eh?
> 
> MDC

Its funny to hear my teenagers ask me what an 8-Track is. ;-)
-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04  9:57                 ` Marin David Condic
  2003-11-04 11:22                   ` Preben Randhol
@ 2003-11-04 17:37                   ` Warren W. Gay VE3WWG
  2003-11-05 19:08                     ` Russ
  1 sibling, 1 reply; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-11-04 17:37 UTC (permalink / raw)


Marin David Condic wrote:

> It always "sounds reasonable" - but is it backed up with any *data*? I 
> believe the claim because it is reasonable, but obviously, there are 
> folks who think that "economy of expression" is the bees knees. Hence 
> the strong devotion to cryptic C programming. If you seek to persuade 
> that crowd, some data to back up the claim would help.
> 
> MDC

What I have observed here at least, is that while it has
been shown and demonstrated time and time again, that
such-and-such an engineering approach such as developing
readable and maintainable code is a good thing, you
still only hear the programmer say "I want X anyway".

The problem as I see it, is the programmer too often is
selfish in what HE wants, and so getting the job done
quickly and with the minimum effort, is the only noise
that you hear above the din.

Yet the END-OWNER of the software that is being
developed, has different goals, including
the cost of maintenance and readability (to save
time ($) for that next poor programmer that must
jump into the code).

The problem is that the programer usually is in the
position of making that choice -- not the end owner,
unless the owner has specific processes in place to
prevent otherwise.

THE GOOD THING ABOUT Ada, is that in large part, it
forces a more readable style on the code. As someone
else posted here, you don't see any Ada obfuscated
code contests given for Ada, although I am sure it
can be done ;-)

Where this division gets blurred is when the developer
and the owner are one: then the tendancy seems to be
to favour the developer, unless the developer is
well disciplined.

I personally think it is necessary to keep encouraging
the programmers to think about more than their own
convenience. This is what much of the += ballyhoo is
all about.
-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 17:37                   ` Warren W. Gay VE3WWG
@ 2003-11-05 19:08                     ` Russ
  2003-11-05 21:11                       ` Mark Lorenzen
                                         ` (2 more replies)
  0 siblings, 3 replies; 223+ messages in thread
From: Russ @ 2003-11-05 19:08 UTC (permalink / raw)


"Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> wrote in message news:<atRpb.673$143.30323@news20.bellglobal.com>...

> I personally think it is necessary to keep encouraging
> the programmers to think about more than their own
> convenience. This is what much of the += ballyhoo is
> all about.

From my perspective, that is simply your persistent misunderstanding
of the "+= ballyhoo". I have given several good reasons in favor of
"+=" (or ":+"). Note that "saving keystrokes" is not one of them,
despite the persistent bleatings to the contrary. And what is wrong
with "programmer convenience," when there is no downside? Do you think
"programmer inconvenience" is an inherent virtue?

Here are the reasons I have given in favor of "+=":

1. "+=" (":+") relieves the *reader* of the code of the task of
verifying that the twice-named variable is indeed the same variable
repeated twice. And it does so without the cumbersome mechanism of
renaming and explicity creating a new scope.

2. "+=" (":+") provides a *standard* symbol for common operations on
scalar types. Yes, that is a "programmer convenience" because it
relieves the programmer of the make-work task of defining (or
instantiating) his own "Inc" operator for many different types. It
also reduces the possibility that the programmer could err in doing
something that the compiler could do for him. I don't know about you,
but I find that good compilers are usually less error-prone than me.

3. "+=" (":+") provides a *standard* symbol for efficient
vector/matrix (and other) operations, thus preventing a proliferation
of user-named procedures such as

   Add ( A, To=> B ); -- or
   MatrixAdd ( source=>A, destination=>B ); -- or
   MatrixAddition ( from=>A, inplace=>B ); -- etc., etc.
   ...

By the way, if a C/C++ programmer writes x = x + 2; in lieu of x += 2,
chances are he is not a top-notch programmer. But Ada forces such bad
style, and that's bad style itself.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-05 19:08                     ` Russ
@ 2003-11-05 21:11                       ` Mark Lorenzen
  2003-11-06  3:10                         ` Russ
  2003-11-05 21:20                       ` Warren W. Gay VE3WWG
  2003-11-05 21:48                       ` Alexandre E. Kopilovitch
  2 siblings, 1 reply; 223+ messages in thread
From: Mark Lorenzen @ 2003-11-05 21:11 UTC (permalink / raw)


18k11tm001@sneakemail.com (Russ) writes:

[cut]

> By the way, if a C/C++ programmer writes x = x + 2; in lieu of x += 2,
> chances are he is not a top-notch programmer. But Ada forces such bad
> style, and that's bad style itself.

I allways write 'x = x + 2' instead of 'x += 2'. I simply despise the
latter form, as it is unreadable and "hackish".

Luckily Ada does not encourage such bad style.

- Mark Lorenzen



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-05 19:08                     ` Russ
  2003-11-05 21:11                       ` Mark Lorenzen
@ 2003-11-05 21:20                       ` Warren W. Gay VE3WWG
  2003-11-05 21:48                       ` Alexandre E. Kopilovitch
  2 siblings, 0 replies; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-11-05 21:20 UTC (permalink / raw)


Russ wrote:
> "Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> wrote in message news:<atRpb.673$143.30323@news20.bellglobal.com>...
>>I personally think it is necessary to keep encouraging
>>the programmers to think about more than their own
>>convenience. This is what much of the += ballyhoo is
>>all about.
> 
> From my perspective, that is simply your persistent misunderstanding
> of the "+= ballyhoo". I have given several good reasons in favor of
> "+=" (or ":+"). Note that "saving keystrokes" is not one of them,
> despite the persistent bleatings to the contrary. And what is wrong
> with "programmer convenience," when there is no downside? Do you think
> "programmer inconvenience" is an inherent virtue?
> 
> Here are the reasons I have given in favor of "+=":

Well, this issue has already been beaten to death in
another thread, and I didn't find any of the reasons
compelling. But let's leave it to the other thread to
thrash it out. ;-)

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-05 19:08                     ` Russ
  2003-11-05 21:11                       ` Mark Lorenzen
  2003-11-05 21:20                       ` Warren W. Gay VE3WWG
@ 2003-11-05 21:48                       ` Alexandre E. Kopilovitch
  2 siblings, 0 replies; 223+ messages in thread
From: Alexandre E. Kopilovitch @ 2003-11-05 21:48 UTC (permalink / raw)
  To: comp.lang.ada

Russ wrote:

> By the way, if a C/C++ programmer writes x = x + 2; in lieu of x += 2,
> chances are he is not a top-notch programmer. But Ada forces such bad
> style, and that's bad style itself.

It is certainly a very interesting topic - who is ordained to decide whether
someone is a top-notch programmer or not -:) , but leaving that point aside,
I just want to remind that Ada does not force that (x := x + 2) style. Moreover,
in many cases Inc(x, 2) or Incr(x,2) is surely preferable. Personally, I use
both forms, using the x := x + 2 form when I perceive that the formula may be
different in some, more or less probable, variation of the problem; and I use
Pascal-like form Inc(x,2) when I consider that operation as charasteristic
for the problem (or particular solution method) at that point.




Alexander Kopilovitch                      aek@vib.usr.pu.ru
Saint-Petersburg
Russia




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-05 21:11                       ` Mark Lorenzen
@ 2003-11-06  3:10                         ` Russ
  2003-11-06  8:26                           ` Vinzent 'Gadget' Hoefler
                                             ` (2 more replies)
  0 siblings, 3 replies; 223+ messages in thread
From: Russ @ 2003-11-06  3:10 UTC (permalink / raw)


Mark Lorenzen <mark.lorenzen@ofir.dk> wrote in message news:<m365hyh65o.fsf@niflheim.malonet>...
> 18k11tm001@sneakemail.com (Russ) writes:
> 
> [cut]
> 
> > By the way, if a C/C++ programmer writes x = x + 2; in lieu of x += 2,
> > chances are he is not a top-notch programmer. But Ada forces such bad
> > style, and that's bad style itself.
> 
> I allways write 'x = x + 2' instead of 'x += 2'. I simply despise the
> latter form, as it is unreadable and "hackish".
> 
> Luckily Ada does not encourage such bad style.

Oh, so x += 2 is "unreadable", eh? Do you have any idea what that says
about your intelligence? You might as well just blurt out, "I'm an
idiot".

I hope you are near the end of your career too, because otherwise you
have a tough row to hoe, considering that the four or five most
popular general-purpose programming languages consider "+=" standard.
Or do you expect to use Ada for the rest of your career? Good luck.

Folks, if you don't like my attitude, I really don't give a flying you
know what. Quit making assinine assertions in reply to my posts, and
I'll quit calling you on them.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06  3:10                         ` Russ
@ 2003-11-06  8:26                           ` Vinzent 'Gadget' Hoefler
  2003-11-06 18:52                             ` Russ
  2003-11-06 11:53                           ` Stephane Richard
  2003-11-07  0:09                           ` Mark Lorenzen
  2 siblings, 1 reply; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-06  8:26 UTC (permalink / raw)


Russ wrote:

>Oh, so x += 2 is "unreadable", eh?

<beatles>Yes, it is.</beatles>

>Do you have any idea what that says
>about your intelligence?

Referring to some other posting from you that follow the same style,
I'd say: "Yes, I am an idiot." Satisfied?

>You might as well just blurt out, "I'm an idiot".

Well, and after all I've read from you, you might as well say, "All
Ada programmers are idiots". Be it so. A lot of people have given you
a lot of reasons why this "+=" operators will *not* make it into the
language.


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
@ 2003-11-06  8:39 christoph.grein
  2003-11-07  8:07 ` Intelligence, was: " Anders Wirzenius
  0 siblings, 1 reply; 223+ messages in thread
From: christoph.grein @ 2003-11-06  8:39 UTC (permalink / raw)
  To: comp.lang.ada

"Vinzent 'Gadget' Hoefler" <ada.rocks@jlfencey.com> wrote:

> Russ wrote:
> >Do you have any idea what that says
> >about your intelligence?
> 
> Referring to some other posting from you that follow the same style,
> I'd say: "Yes, I am an idiot." Satisfied?
> 
> >You might as well just blurt out, "I'm an idiot".
> 
> Well, and after all I've read from you, you might as well say, "All
> Ada programmers are idiots". Be it so.

Well said :-) I know I'm an idiot, too, but I like it...

And now all together:

We are idiots, idiots, idiots, and we love it so... (on a tune from West Side 
Story)



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 16:08                         ` Marius Amado Alves
@ 2003-11-06 10:10                           ` Preben Randhol
  2003-11-18  0:07                           ` Brian Gaffney
  1 sibling, 0 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-06 10:10 UTC (permalink / raw)


On 2003-11-04, Marius Amado Alves <amado.alves@netcabo.pt> wrote:
> How about
>
>   with ...; use idem;
>
> (cf. thread on compound assignment)

Doesn't sound like a good idea as it is two statements.

with A;
with B;
use idem;
use idem;

won't work for example.

But seriously are you all using so bad editors?

Preben
-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 13:16                   ` Hyman Rosen
  2003-11-04 15:09                     ` Vinzent 'Gadget' Hoefler
  2003-11-04 15:49                     ` Wes Groleau
@ 2003-11-06 10:55                     ` Preben Randhol
  2003-11-06 13:03                       ` Hyman Rosen
  2 siblings, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-06 10:55 UTC (permalink / raw)


On 2003-11-04, Hyman Rosen <hyrosen@mail.com> wrote:
> Preben Randhol wrote:
>> with Ada.Text_IO;       use Ada.Text_IO;
>
> The usual arguments of extra verbosity leading to clarity
> don't apply to with/use. The problem is that the things in
> the use clause don't necessarily have to be identical to
> the things in the with clause. That means every time you
> see a with/use set, you must verify that the packages in
> both are in fact identical, and if they are not, figure
> out why that is so.

I don't understand what you mean. Could you clarify this?

Do you mean that if you do:

with packA; use packA;
with packB; use packB;

and both packages has a procedure P you won't see in the code from which
package you called it? In that case you get:

   ambiguous expression (cannot resolve "p")
   possible interpretation at packb.ads:2
   possible interpretation at packa.ads:2
   compilation error

or do you mean that if packA had a child package B and you wrote :

   with packA; use packA
   use B;

then you get:

   "b" is undefined
   compilation error

So what do you relaly mean?

Preben
-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
@ 2003-11-06 11:11 amado.alves
  0 siblings, 0 replies; 223+ messages in thread
From: amado.alves @ 2003-11-06 11:11 UTC (permalink / raw)
  To: comp.lang.ada

Preben Randhol wrote:

>> How about
>>
>>   with ...; use idem;
>>
>> (cf. thread on compound assignment)

> Doesn't sound like a good idea as it is two statements.
>
> with A;
> with B;
> use idem;
> use idem;
>
> won't work for example.

I was kinda kiding. Meaning this is entirely experimental and academic. I'm perfectly happy with the way things currently are. In the experimental spirit I like "idem" (actually my favorite is '@') for the "lvalue". And in the above example I was testing a generalization of it to... hmmm... "the latest useful thing". So your counterexample would be equivalent to

with A;
with B;
use B;
use B;

I wonder if this is even legal.

In music writing there is a symbol for this:

o//
//o

I think is only for the latest *bar*, so it is not generalized.

> But seriously are you all using so bad editors?

My degree of satisfaction with existing editors is below say 70% (GPS and emacs included). I'll write the perfect editor some day...




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06  3:10                         ` Russ
  2003-11-06  8:26                           ` Vinzent 'Gadget' Hoefler
@ 2003-11-06 11:53                           ` Stephane Richard
  2003-11-06 13:36                             ` Marin David Condic
  2003-11-07  0:09                           ` Mark Lorenzen
  2 siblings, 1 reply; 223+ messages in thread
From: Stephane Richard @ 2003-11-06 11:53 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4953 bytes --]

"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311051910.4913df78@posting.google.com...
> Mark Lorenzen <mark.lorenzen@ofir.dk> wrote in message
news:<m365hyh65o.fsf@niflheim.malonet>...
> > 18k11tm001@sneakemail.com (Russ) writes:
> >
> > [cut]
> >
> Oh, so x += 2 is "unreadable", eh? Do you have any idea what that says
> about your intelligence? You might as well just blurt out, "I'm an
> idiot".

*** Don't you think that's pushing it?  You're right, 4 out 5 languages do
have the += or some form of it.  Which proves the old saying "Sometimes, the
majority means that all the fools are on the same side".

*** When this concept of += like operators came out, it wasn't designed to
be readable, but merely quicker to type, a simple programmer's convenience
(dare I say Author's convenience as readability was not in it's job
description.  performance wise, recently I haven't tested it, but not all
that long ago, x+=2 and x=x+2 produced the exact same bytecode so it wasn't
designed for being faster than the regular x=x+2. Maybe that changed today
(maybe a little while back too) but not at it's creation...

*** Look at a bit of history, when we say C/C++ became popular for the wrong
reasons, language rich features capacities, even performances were not even
considered when selecting C or C++ as the language.  Like I said elsewhere
it was all based on a "monkey see monkey do" concept.  "Hey we'll use C++
because this and/or that company is using it.  You call that research to
back up their decisions? I beg to differ.  I'm not taking anything out of C
and C++ (well maybe a bit out of C++, it's the most technological patch work
I've ever seen and since it was the only thing available to upgrade C from
it got to be standard, again read the history).  But C and C++ do have their
role in the programming world, the problems started when they tried to bring
these two out of their intended domains and out in the open as a general
purpose language thinking that "hey, if it can do low level OS operations it
can do the rest.  In a way it can, however that's when the patch work
started.

>
> I hope you are near the end of your career too, because otherwise you
> have a tough row to hoe, considering that the four or five most
> popular general-purpose programming languages consider "+=" standard.
> Or do you expect to use Ada for the rest of your career? Good luck.
>
*** And you expect to use C++ for the rest of yours?  Like I mentionned, all
the wrong reasons went into making C/C++ "the language" it's starting to
show, companies are starting to realize that certain decisions were perhaps
not reflected upon way back when.  For the sames reasons C went out of it's
intended usage into the general purpose field, so did Ada, Pascal, and I
could just keep on naming languages here, they all did it for the same
reasons, to stay alive so to speak.  How ever the others were already
"general purpose" languages, so they're next logical step was Low level
system access and compete with C.

> Folks, if you don't like my attitude, I really don't give a flying you
> know what. Quit making assinine assertions in reply to my posts, and
> I'll quit calling you on them.

*** It's not a question of attitude per se, everyone's entitled to his or
her own attitude, part of our individuality.  The problem is in your
prejudice against anyone who doesn't agree with you.  As programmers and
software engineers, we're all entitled to select the best tool for the job
at hand, and I've seen first hand reasons why C/C++ should not have been
picked for select given jobs.  It's ok to say C/C++ is good, it's not ok to
say that everything else is crap.  Much as you'd like to believe it, C and
C++ are not "THE" languages to use and everything else and fisher price
programming.  Many times I've seen programmers start to develop something in
C or C++ and quit during the debugging session cause they thought they'd
never see the end of it.  C and C++, like all other languages, have to stop
believing their own press so to speak and start evolving, and I dont mean
into C# either, that would be going backwords in my book.

*** Take a look at the D language, it looks alot like C/C++ but at least
it's got measures and grammar elements to protect it from itself like
conditions to be met prior to calling a sub routine expressed in some form
of contract between the caller and the callee  just that is a big step in
the right direction. and I'm sorry to say that C and C++ are not the ones
that took that big step (at least not the first ones).  But that's the kind
of things C and C++ needs to broaden it's horizons.

*** And no I don't think you're an idiot because of what you believe, it's
your choice, as it is ours to choose the language we want.

"It's not the language you use that makes you the programmer you are, it's
how you use it".

-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com







^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 10:55                     ` Preben Randhol
@ 2003-11-06 13:03                       ` Hyman Rosen
  2003-11-06 15:35                         ` Preben Randhol
                                           ` (2 more replies)
  0 siblings, 3 replies; 223+ messages in thread
From: Hyman Rosen @ 2003-11-06 13:03 UTC (permalink / raw)


Preben Randhol wrote:
> So what do you relaly mean?

I mean that an Ada program can contain
     with a, b, c, d;
     use  a, b, c, d;
and it may also contain
     with a, b, c, d;
     use  a,    c, d;
See <http://www.scism.sbu.ac.uk/law/Section2/chap4/s2c4p4.html>
for an example of the latter form. It contains
     with ADA.TEXT_IO, ADA.CALENDAR, ADA.CHARACTERS.LATIN_1;
     use  ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;

So upon seeing a with/use pair, I have to read it carefully to
see if the two lists are the same, and if they are not, try to
figure out why that may be.

I was contrasting this with the repetition Ada requires, for
example, at the end of a function, where you know that the
repeated name must match the subprogram name, so you don't
really have to think about it.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 11:53                           ` Stephane Richard
@ 2003-11-06 13:36                             ` Marin David Condic
  2003-11-07  1:15                               ` Stephane Richard
  0 siblings, 1 reply; 223+ messages in thread
From: Marin David Condic @ 2003-11-06 13:36 UTC (permalink / raw)


Actually, if you look at the history of it, C got popular because it was 
given away free along with Unix at a time when people were regularly 
charging in 5 to 6 figures for a compiler. C was cheap, so it got used a 
lot. C++ got popular because it was upward compatible with C and 
provided more capabilities, so the large body of C programmers could 
transport their favorite code and all their skills to something new. 
Java got popular for a variety of reasons, not the least of which was 
that Sun spend large amounts of money marketing it. But part of the 
popularity was that it was C/C++-ish and hence all the C/C++ guys were 
staring at what they were always used to seeing.

It didn't really have much to do with either inherent goodness of some 
cryptic operators nor was it strictly "monkey see - monkey do". It had a 
lot more to do with simple economics and an natural desire on the part 
of people to use what is familiar to them.

In a sense, the "monkey see - monkey do" factor is also economic. I'd 
describe it more as a "Get on the bandwagon" phenomenon. Once a software 
thing crosses a certain threshold of popularity, there are economic 
advantages to using it even if it is *not* the best technology. (And 
lets face it, that is what is going to drive the choices made by 
businesses everywhere. Ada should learn that lesson well and figure out 
how to deal with it.) A larger user base means overall lower cost for 
acquisition of the technology, more plentiful and less expensive 
supporting technology, more interoperability with other tools (at less 
cost), more plentiful (and hence less expensive) technology experts, 
etc, etc, etc,. Its Supply and Demand, man! You can *never* escape it.

That's why Ada can stand around arguing about how it is less expensive 
overall because of maintainability and nobody is paying much attention. 
Two or three other factors weigh in: "Yeah, *maybe* it saves some money 
down the line, but that's all guesswork & speculation and maybe it 
doesn't really save that much - but I *can* count the up-front costs and 
there Ada loses." or "I don't care about maintainability, because I 
won't be maintaining anything..." or "Maintenance is nothing to me - 
Time To Market is *everything* and Ada loses because I don't have the 
infrastructure..."

These are the sort of issues that go into language selection at the 
"Macro" level (larger business users). At the "Micro" level (individual 
programmers with their home-hobbyist or work/nobody-cares types of 
needs) you have some different factors - but I dare say they won't be 
"Engineering" or "Business Analysis" factors. Much more likely: "What do 
I have available cheap or free and what is familiar to me so I won't 
have to learn a bunch of new stuff..." Understand the market and it 
helps sort out what Ada should be hoping to achieve. Something like "+=" 
doesn't buy much as far as I can see.

MDC


Stephane Richard wrote:
> 
> *** Look at a bit of history, when we say C/C++ became popular for the wrong
> reasons, language rich features capacities, even performances were not even
> considered when selecting C or C++ as the language.  Like I said elsewhere
> it was all based on a "monkey see monkey do" concept.  "Hey we'll use C++
> because this and/or that company is using it.  You call that research to
> back up their decisions? I beg to differ.  I'm not taking anything out of C

-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "So if I understand 'The Matrix Reloaded' correctly, the Matrix is
     basically a Microsoft operating system - it runs for a while and
     then crashes and reboots. By design, no less. Neo is just a
     memory leak that's too hard to fix, so they left him in... The
     users don't complain because they're packed in slush and kept
     sedated"

         --  Marin D. Condic
======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 13:03                       ` Hyman Rosen
@ 2003-11-06 15:35                         ` Preben Randhol
  2003-11-06 17:26                         ` Warren W. Gay VE3WWG
  2003-11-06 22:42                         ` Dale Stanbrough
  2 siblings, 0 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-06 15:35 UTC (permalink / raw)


On 2003-11-06, Hyman Rosen <hyrosen@mail.com> wrote:
> Preben Randhol wrote:
>> So what do you relaly mean?
>
> I mean that an Ada program can contain
>      with a, b, c, d;
>      use  a, b, c, d;
> and it may also contain
>      with a, b, c, d;
>      use  a,    c, d;
> See <http://www.scism.sbu.ac.uk/law/Section2/chap4/s2c4p4.html>
> for an example of the latter form. It contains
>      with ADA.TEXT_IO, ADA.CALENDAR, ADA.CHARACTERS.LATIN_1;
>      use  ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;
>
> So upon seeing a with/use pair, I have to read it carefully to
> see if the two lists are the same, and if they are not, try to
> figure out why that may be.
>
> I was contrasting this with the repetition Ada requires, for
> example, at the end of a function, where you know that the
> repeated name must match the subprogram name, so you don't
> really have to think about it.
>

I still don't understand what you mean. You don't have to "use" anything
you "with". With "use" one do not have to write:

   with Ada.Text_IO;

   -- ...

   Ada.Text_IO.Put_Line ("Some text");

but only:

   with Ada.Text_IO; use Ada.Text_IO;

   -- ...

   Put_Line ("Some text");

however a good rule is to "use" as little as possible.


Preben
-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 13:03                       ` Hyman Rosen
  2003-11-06 15:35                         ` Preben Randhol
@ 2003-11-06 17:26                         ` Warren W. Gay VE3WWG
  2003-11-06 20:38                           ` Gautier Write-only
  2003-11-06 22:42                         ` Dale Stanbrough
  2 siblings, 1 reply; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-11-06 17:26 UTC (permalink / raw)


Hyman Rosen wrote:

> Preben Randhol wrote:
> 
>> So what do you relaly mean?
> 
> I mean that an Ada program can contain
>     with a, b, c, d;
>     use  a, b, c, d;
> and it may also contain
>     with a, b, c, d;
>     use  a,    c, d;
> See <http://www.scism.sbu.ac.uk/law/Section2/chap4/s2c4p4.html>
> for an example of the latter form. It contains
>     with ADA.TEXT_IO, ADA.CALENDAR, ADA.CHARACTERS.LATIN_1;
>     use  ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;
> 
> So upon seeing a with/use pair, I have to read it carefully to
> see if the two lists are the same, and if they are not, try to
> figure out why that may be.

The other problem is that you don't always want to "use"
every with. Consider:

WITH ADA.STRINGS.FIXED;

I may just want:

USE ADA.STRINGS.FIXED;

but not:

USE ADA.STRINGS;

Why? Because ADA.STRINGS.LEFT may conflict with some other
definition I have in my code named LEFT. However, I may
want to use ADA.STRINGS.FIXED.INDEX() for some reason,
perhaps frequently so, that a USE statement makes sense
within the block where it is referenced. Where I need
ADA.STRINGS.LEFT, I can use the fully qualified path
to it.

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06  8:26                           ` Vinzent 'Gadget' Hoefler
@ 2003-11-06 18:52                             ` Russ
  2003-11-06 20:03                               ` Martin Dowie
  2003-11-10  7:47                               ` Vinzent 'Gadget' Hoefler
  0 siblings, 2 replies; 223+ messages in thread
From: Russ @ 2003-11-06 18:52 UTC (permalink / raw)


Vinzent 'Gadget' Hoefler <ada.rocks@jlfencey.com> wrote in message news:<bod0mk$1cg6bn$2@ID-175126.news.uni-berlin.de>...
> Russ wrote:
> 
> >Oh, so x += 2 is "unreadable", eh?
> 
> <beatles>Yes, it is.</beatles>
> 
> >Do you have any idea what that says
> >about your intelligence?
> 
> Referring to some other posting from you that follow the same style,
> I'd say: "Yes, I am an idiot." Satisfied?
> 
> >You might as well just blurt out, "I'm an idiot".
> 
> Well, and after all I've read from you, you might as well say, "All
> Ada programmers are idiots". Be it so. A lot of people have given you
> a lot of reasons why this "+=" operators will *not* make it into the
> language.

If you honestly find "+=" to be "unreadable," then I'd say that, yes,
you are indeed an idiot. I certainly would never hire a programmer who
has to grapple with the meaning of "+=". For Pete's sake, I have real
work to do. Would you hire such a person? If so, I can't imagine how
you could get any significant amount of work done. Go ask anyone who
hires programmers, and ask them if they would hire anyone who
struggles with the meaning of "+=". Having said that, I don't think
for a second that anyone here *really* has trouble understanding "+=".
That means that I don't really consider you idiots, I am just baffled
as to why you insist on portraying yourselves as such. Now, if you
quote me on this, please keep this entire paragraph intact.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 18:52                             ` Russ
@ 2003-11-06 20:03                               ` Martin Dowie
  2003-11-07  0:22                                 ` Robert I. Eachus
                                                   ` (2 more replies)
  2003-11-10  7:47                               ` Vinzent 'Gadget' Hoefler
  1 sibling, 3 replies; 223+ messages in thread
From: Martin Dowie @ 2003-11-06 20:03 UTC (permalink / raw)


"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311061052.772a095@posting.google.com...
> If you honestly find "+=" to be "unreadable," then I'd say that, yes,
> you are indeed an idiot. I certainly would never hire a programmer who
> has to grapple with the meaning of "+=". For Pete's sake, I have real
> work to do. Would you hire such a person? If so, I can't imagine how
> you could get any significant amount of work done. Go ask anyone who
> hires programmers, and ask them if they would hire anyone who
> struggles with the meaning of "+=". Having said that, I don't think
> for a second that anyone here *really* has trouble understanding "+=".
> That means that I don't really consider you idiots, I am just baffled
> as to why you insist on portraying yourselves as such. Now, if you
> quote me on this, please keep this entire paragraph intact.

I have noticed that although such short forms are available to Python
users (another language I quite like...), I've yet to find one occasion
when it has actually been used. And that's largely from browsing from
the 'official' Python homepage and its 'de-facto' standard libraries.

So why don't they use it? I don't no for sure but one of the explicit
aims of Python was to promote readability.

Perhaps, Russ, you could instil a vigorous debate over at c.l.p.
and ask them why they are being so 'idiotic'? ;-)

So, Russ, have read AI-318? Do you still think that "+=",etc is
still necessary, now there is a mechanism to avoid that extra deep
copy for things like matrices/vectors?





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04  7:28   ` Vinzent 'Gadget' Hoefler
@ 2003-11-06 20:12     ` Gautier Write-only
  0 siblings, 0 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-11-06 20:12 UTC (permalink / raw)


> Dmitry A. Kazakov wrote:
> 
> >use A.B.C.D;
> >
> >implies:
> >
> >with A.B.C.D;
> >
> >It was rejected. Does anybody remember why?

Vinzent 'Gadget' Hoefler:

> I don't know if this was the reason, but AFAICS you can't "with" a
> package inbetween a body, but you can locally *use* a package in a
> declare block:
> 
> |declare
> |   use P;
> |   ...
> 
> So this sort of use would at least require a with-declaration in the
> beginning of the package. CMIIW, but all the "with"s in the beginning
> just declare package "dependencies", nothing more.

Right, but we are discussing explicitely ;-) about "use" as a context
clause (before any unit), not the "use" as a declaration.
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 17:26                         ` Warren W. Gay VE3WWG
@ 2003-11-06 20:38                           ` Gautier Write-only
  2003-11-06 21:12                             ` Warren W. Gay VE3WWG
                                               ` (3 more replies)
  0 siblings, 4 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-11-06 20:38 UTC (permalink / raw)


> Hyman Rosen:

[...]
> > for an example of the latter form. It contains
> >     with ADA.TEXT_IO, ADA.CALENDAR, ADA.CHARACTERS.LATIN_1;
> >     use  ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;
> >
> > So upon seeing a with/use pair, I have to read it carefully to
> > see if the two lists are the same, and if they are not, try to
> > figure out why that may be.

Warren W. Gay VE3WWG:
> The other problem is that you don't always want to "use"
> every with. Consider [...]

It is exactly what the author of the above code wanted,
not to "use" ADA.CALENDAR. *This* would be a lot clearer if only

with ADA.CALENDAR;
use ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;

was sufficient (this is the "implicit 'with'" variant) - or

with ADA.CALENDAR;
with and use ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;

And the list can be long in *certain* programs, *not* the
safety-critical code or whatever "special" code where
anyway an Ada subset without "use" at all is preferable,
*but* the "everyday programming" where some general-purpose
packages for
  - the Text_IO stuff
  - the Floating-point maths
  - GUI stuff
are obviously better to be "use"-d at the unit level.
And this is still a *minority* of packages, the other ones,
specialized, would be of course only "with"ed by normal persons.

All that is a question of style, project, taste, security,
about the usage of "use", which is already in the language.
The purpose of the proposal is not to reintroduce "use" or
changing any style rule, but *only* to make the life
easier and programs clearer when (and only when) we use
"use" as a context clause.
The question of desirability of "use" in such or such context
or for such or such package is *another* problem - and sorry,
"use" exists, it won't be removed, but if one wants one can
avoid it, at worst with a language subset, and it won't hurt
anybody.

The whole debate has (as expected ;-) shifted from
"how to make use-as-a-context-clause easier"
to
"to use or not to use"
or even
"to += or not to +=".
Please (dear participants) remain on-topic...
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 20:38                           ` Gautier Write-only
@ 2003-11-06 21:12                             ` Warren W. Gay VE3WWG
  2003-11-07  7:08                             ` Russ
                                               ` (2 subsequent siblings)
  3 siblings, 0 replies; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-11-06 21:12 UTC (permalink / raw)


Gautier Write-only wrote:
>>Hyman Rosen:
> [...]
> 
>>>for an example of the latter form. It contains
>>>    with ADA.TEXT_IO, ADA.CALENDAR, ADA.CHARACTERS.LATIN_1;
>>>    use  ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;
>>>
>>>So upon seeing a with/use pair, I have to read it carefully to
>>>see if the two lists are the same, and if they are not, try to
>>>figure out why that may be.
> 
> Warren W. Gay VE3WWG:
> 
>>The other problem is that you don't always want to "use"
>>every with. Consider [...]
> 
> It is exactly what the author of the above code wanted,
> not to "use" ADA.CALENDAR. *This* would be a lot clearer if only
> 
> with ADA.CALENDAR;
> use ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;
> 
> was sufficient (this is the "implicit 'with'" variant) - or
> 
> with ADA.CALENDAR;
> with and use ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;

But as soon as you designate that, someone else will
want another variation of your "with and use" to use
all elements in the path. ;-)

> All that is a question of style, project, taste, security,
> about the usage of "use", which is already in the language.
> The purpose of the proposal is not to reintroduce "use" or
> changing any style rule, but *only* to make the life
> easier and programs clearer when (and only when) we use
> "use" as a context clause.

Well, I think the group has already responded to this
(and more), so I won't repeat my own opinion about
it. ;-)
-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 13:03                       ` Hyman Rosen
  2003-11-06 15:35                         ` Preben Randhol
  2003-11-06 17:26                         ` Warren W. Gay VE3WWG
@ 2003-11-06 22:42                         ` Dale Stanbrough
  2 siblings, 0 replies; 223+ messages in thread
From: Dale Stanbrough @ 2003-11-06 22:42 UTC (permalink / raw)


In article <1068123815.335508@master.nyc.kbcfp.com>,
 Hyman Rosen <hyrosen@mail.com> wrote:

> I mean that an Ada program can contain
>      with a, b, c, d;
>      use  a, b, c, d;
> and it may also contain
>      with a, b, c, d;
>      use  a,    c, d;


I always use the style...

   with a; use a;
   with b;
   with c; use c;
   with d; use d;

so that you don't have to match withs/uses together.

I also typically block the withs so that all of the ada
routines go together...

   with Ada.Text_IO;           use Ada.Text_IO;
   with Ada.Unbounded_Strings; use Ada.Unbounded_Strings;


   with Domain_Specific_Package; use Domain_Specific_Package;


etc. which I find increases readability enormously.

Dale

-- 
dstanbro@spam.o.matic.bigpond.net.au



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06  3:10                         ` Russ
  2003-11-06  8:26                           ` Vinzent 'Gadget' Hoefler
  2003-11-06 11:53                           ` Stephane Richard
@ 2003-11-07  0:09                           ` Mark Lorenzen
  2 siblings, 0 replies; 223+ messages in thread
From: Mark Lorenzen @ 2003-11-07  0:09 UTC (permalink / raw)


18k11tm001@sneakemail.com (Russ) writes:

> Mark Lorenzen <mark.lorenzen@ofir.dk> wrote in message news:<m365hyh65o.fsf@niflheim.malonet>...
>> 18k11tm001@sneakemail.com (Russ) writes:
>> 
>> [cut]
>> 
>> > By the way, if a C/C++ programmer writes x = x + 2; in lieu of x += 2,
>> > chances are he is not a top-notch programmer. But Ada forces such bad
>> > style, and that's bad style itself.
>> 
>> I allways write 'x = x + 2' instead of 'x += 2'. I simply despise the
>> latter form, as it is unreadable and "hackish".
>> 
>> Luckily Ada does not encourage such bad style.
>
> Oh, so x += 2 is "unreadable", eh? Do you have any idea what that says
> about your intelligence? You might as well just blurt out, "I'm an
> idiot".
>
> I hope you are near the end of your career too, because otherwise you
> have a tough row to hoe, considering that the four or five most
> popular general-purpose programming languages consider "+=" standard.
> Or do you expect to use Ada for the rest of your career? Good luck.

I am at the beginning of my career and I not care about what is
popular or not. I only care about correctness, formal methods,
calculi, algebra, ML, Ada and SPARK. Sadly I do not work with any of
these things, but I still have at least 30-35 years to find my
luck. If you want to know, then I am programmimg in C++ at the
moment. This includes using the Standard Template Library with its
hackish ++ operators on iterators.

>
> Folks, if you don't like my attitude, I really don't give a flying you
> know what. Quit making assinine assertions in reply to my posts, and
> I'll quit calling you on them.

But you are making such assertions yourself:

>> > By the way, if a C/C++ programmer writes x = x + 2; in lieu of x += 2,
>> > chances are he is not a top-notch programmer. But Ada forces such bad
>> > style, and that's bad style itself.

- Mark Lorenzen



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 20:03                               ` Martin Dowie
@ 2003-11-07  0:22                                 ` Robert I. Eachus
  2003-11-07  7:02                                   ` Martin Dowie
  2003-11-07  5:04                                 ` Russ
  2003-11-07 20:31                                 ` Russ
  2 siblings, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-07  0:22 UTC (permalink / raw)


Martin Dowie wrote:

> So, Russ, have read AI-318? Do you still think that "+=",etc is
> still necessary, now there is a mechanism to avoid that extra deep
> copy for things like matrices/vectors?

For the record, AI-318 as written applies to limited and unlimited 
types.  But the current ARG discussion has determined that there are 
significant implementation problems with requiring this feature to be 
used with non-limited return types.  I don't know what the final 
resolution will be.  It could either allow implementations to do the 
"extra" copy when the type is non-limited, or involve a notation that 
made it clear in the subprogram declaration that this style of return is 
being used.

Sorry this is one of those cases where the ARG has to be concerned about 
the "real" issues of language maintenance.  (The final resolution might 
be to permit the notation for all cases, and require the "generate 
return value in place" behaviour for limited types only.  That way a 
compiler could do the optimization if it can tell at the point of any 
calls that the function body is written this way.)

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 13:36                             ` Marin David Condic
@ 2003-11-07  1:15                               ` Stephane Richard
  0 siblings, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-07  1:15 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4867 bytes --]

I guess it depends on the point of view, from my studies and views and
career, monkey see monkey do thing was quite common.  Started as "Canadians
used it cause americans used it (believe it or not) then companies used it
because other "allied" companies used it and even in some odd cases,
companies used it because "competition" used it?

P.S. I got my quote not in my signature ;-)

-- 
"To Err is human, to really screw up, you need C++!" ;-)

St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com


"Marin David Condic" <nobody@noplace.com> wrote in message
news:3FAA4E46.5090206@noplace.com...
> Actually, if you look at the history of it, C got popular because it was
> given away free along with Unix at a time when people were regularly
> charging in 5 to 6 figures for a compiler. C was cheap, so it got used a
> lot. C++ got popular because it was upward compatible with C and
> provided more capabilities, so the large body of C programmers could
> transport their favorite code and all their skills to something new.
> Java got popular for a variety of reasons, not the least of which was
> that Sun spend large amounts of money marketing it. But part of the
> popularity was that it was C/C++-ish and hence all the C/C++ guys were
> staring at what they were always used to seeing.
>
> It didn't really have much to do with either inherent goodness of some
> cryptic operators nor was it strictly "monkey see - monkey do". It had a
> lot more to do with simple economics and an natural desire on the part
> of people to use what is familiar to them.
>
> In a sense, the "monkey see - monkey do" factor is also economic. I'd
> describe it more as a "Get on the bandwagon" phenomenon. Once a software
> thing crosses a certain threshold of popularity, there are economic
> advantages to using it even if it is *not* the best technology. (And
> lets face it, that is what is going to drive the choices made by
> businesses everywhere. Ada should learn that lesson well and figure out
> how to deal with it.) A larger user base means overall lower cost for
> acquisition of the technology, more plentiful and less expensive
> supporting technology, more interoperability with other tools (at less
> cost), more plentiful (and hence less expensive) technology experts,
> etc, etc, etc,. Its Supply and Demand, man! You can *never* escape it.
>
> That's why Ada can stand around arguing about how it is less expensive
> overall because of maintainability and nobody is paying much attention.
> Two or three other factors weigh in: "Yeah, *maybe* it saves some money
> down the line, but that's all guesswork & speculation and maybe it
> doesn't really save that much - but I *can* count the up-front costs and
> there Ada loses." or "I don't care about maintainability, because I
> won't be maintaining anything..." or "Maintenance is nothing to me -
> Time To Market is *everything* and Ada loses because I don't have the
> infrastructure..."
>
> These are the sort of issues that go into language selection at the
> "Macro" level (larger business users). At the "Micro" level (individual
> programmers with their home-hobbyist or work/nobody-cares types of
> needs) you have some different factors - but I dare say they won't be
> "Engineering" or "Business Analysis" factors. Much more likely: "What do
> I have available cheap or free and what is familiar to me so I won't
> have to learn a bunch of new stuff..." Understand the market and it
> helps sort out what Ada should be hoping to achieve. Something like "+="
> doesn't buy much as far as I can see.
>
> MDC
>
>
> Stephane Richard wrote:
> >
> > *** Look at a bit of history, when we say C/C++ became popular for the
wrong
> > reasons, language rich features capacities, even performances were not
even
> > considered when selecting C or C++ as the language.  Like I said
elsewhere
> > it was all based on a "monkey see monkey do" concept.  "Hey we'll use
C++
> > because this and/or that company is using it.  You call that research to
> > back up their decisions? I beg to differ.  I'm not taking anything out
of C
>
> -- 
> ======================================================================
> Marin David Condic
> I work for: http://www.belcan.com/
> My project is: http://www.jsf.mil/NSFrames.htm
>
> Send Replies To: m   o   d   c @ a   m   o   g
>                     c   n   i       c   .   r
>
>      "So if I understand 'The Matrix Reloaded' correctly, the Matrix is
>      basically a Microsoft operating system - it runs for a while and
>      then crashes and reboots. By design, no less. Neo is just a
>      memory leak that's too hard to fix, so they left him in... The
>      users don't complain because they're packed in slush and kept
>      sedated"
>
>          --  Marin D. Condic
> ======================================================================
>





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 20:03                               ` Martin Dowie
  2003-11-07  0:22                                 ` Robert I. Eachus
@ 2003-11-07  5:04                                 ` Russ
  2003-11-07 20:31                                 ` Russ
  2 siblings, 0 replies; 223+ messages in thread
From: Russ @ 2003-11-07  5:04 UTC (permalink / raw)


"Martin Dowie" <martin.dowie@btopenworld.com> wrote in message news:<boe9es$ep5$1@hercules.btinternet.com>...
> "Russ" <18k11tm001@sneakemail.com> wrote in message
> news:bebbba07.0311061052.772a095@posting.google.com...
> > If you honestly find "+=" to be "unreadable," then I'd say that, yes,
> > you are indeed an idiot. I certainly would never hire a programmer who
> > has to grapple with the meaning of "+=". For Pete's sake, I have real
> > work to do. Would you hire such a person? If so, I can't imagine how
> > you could get any significant amount of work done. Go ask anyone who
> > hires programmers, and ask them if they would hire anyone who
> > struggles with the meaning of "+=". Having said that, I don't think
> > for a second that anyone here *really* has trouble understanding "+=".
> > That means that I don't really consider you idiots, I am just baffled
> > as to why you insist on portraying yourselves as such. Now, if you
> > quote me on this, please keep this entire paragraph intact.
> 
> I have noticed that although such short forms are available to Python
> users (another language I quite like...), I've yet to find one occasion
> when it has actually been used. And that's largely from browsing from
> the 'official' Python homepage and its 'de-facto' standard libraries.
> 
> So why don't they use it? I don't no for sure but one of the explicit
> aims of Python was to promote readability.
> 
> Perhaps, Russ, you could instil a vigorous debate over at c.l.p.
> and ask them why they are being so 'idiotic'? ;-)

I like Python too, and I use it daily. I suspect the reason you didn't
find much use of += in the libraries is that it was just added in
version 2.1 or thereabouts. That would be something like a year or two
ago.

> So, Russ, have read AI-318? Do you still think that "+=",etc is
> still necessary, now there is a mechanism to avoid that extra deep
> copy for things like matrices/vectors?

No, I haven't, but I'll do so ASAP.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07  0:22                                 ` Robert I. Eachus
@ 2003-11-07  7:02                                   ` Martin Dowie
  2003-11-07 19:04                                     ` Robert I. Eachus
  0 siblings, 1 reply; 223+ messages in thread
From: Martin Dowie @ 2003-11-07  7:02 UTC (permalink / raw)


"Robert I. Eachus" <rieachus@comcast.net> wrote in message
news:TMadnZEmI4tMeDeiRVn-gQ@comcast.com...
> For the record, AI-318 as written applies to limited and unlimited

Yes, it's also a "Work Item" so maybe there will be too much trouble
in implementing it - but I was really just trying to point out that the
ARG _is_ thinking about this sort of problem but doing it in an Ada!

:-)





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 20:38                           ` Gautier Write-only
  2003-11-06 21:12                             ` Warren W. Gay VE3WWG
@ 2003-11-07  7:08                             ` Russ
  2003-11-07  8:48                             ` Preben Randhol
  2003-11-07 15:54                             ` Frank J. Lhota
  3 siblings, 0 replies; 223+ messages in thread
From: Russ @ 2003-11-07  7:08 UTC (permalink / raw)


Gautier Write-only <gautier@fakeaddress.nil> wrote in message news:<3FAAB12E.C7593B45@fakeaddress.nil>...
> > Hyman Rosen:
> 
> [...]
> > > for an example of the latter form. It contains
> > >     with ADA.TEXT_IO, ADA.CALENDAR, ADA.CHARACTERS.LATIN_1;
> > >     use  ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;
> > >
> > > So upon seeing a with/use pair, I have to read it carefully to
> > > see if the two lists are the same, and if they are not, try to
> > > figure out why that may be.
> 
> Warren W. Gay VE3WWG:
> > The other problem is that you don't always want to "use"
> > every with. Consider [...]
> 
> It is exactly what the author of the above code wanted,
> not to "use" ADA.CALENDAR. *This* would be a lot clearer if only
> 
> with ADA.CALENDAR;
> use ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;
> 
> was sufficient (this is the "implicit 'with'" variant) - or
> 
> with ADA.CALENDAR;
> with and use ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1;
> 
> And the list can be long in *certain* programs, *not* the
> safety-critical code or whatever "special" code where
> anyway an Ada subset without "use" at all is preferable,
> *but* the "everyday programming" where some general-purpose
> packages for
>   - the Text_IO stuff
>   - the Floating-point maths
>   - GUI stuff
> are obviously better to be "use"-d at the unit level.
> And this is still a *minority* of packages, the other ones,
> specialized, would be of course only "with"ed by normal persons.
> 
> All that is a question of style, project, taste, security,
> about the usage of "use", which is already in the language.
> The purpose of the proposal is not to reintroduce "use" or
> changing any style rule, but *only* to make the life
> easier and programs clearer when (and only when) we use
> "use" as a context clause.
> The question of desirability of "use" in such or such context
> or for such or such package is *another* problem - and sorry,
> "use" exists, it won't be removed, but if one wants one can
> avoid it, at worst with a language subset, and it won't hurt
> anybody.
> 
> The whole debate has (as expected ;-) shifted from
> "how to make use-as-a-context-clause easier"
> to
> "to use or not to use"
> or even
> "to += or not to +=".
> Please (dear participants) remain on-topic...

I'm with you on this one. Whether it's "with and use," with/use", or
simply "use" (as context clause) implies "with" (my preference), I
just don't see any rational argument against it. Programmers would
still be able to use "with" and "use" exactly as they do now.

You've heard of a "tin ear", but I think it takes a "tin eye" to
insist on repetitive "with" and "use" for things like basic I/O. Try
to imagine how many potential Ada users are turned off by such
clutter.

By the way, I am not the one who introduced "+=" on this thread. I
merely replied to someone else's offhand remark.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Intelligence, was: Clause "with and use"
  2003-11-06  8:39 Clause "with and use" christoph.grein
@ 2003-11-07  8:07 ` Anders Wirzenius
  2003-11-07 10:54   ` Dmitry A. Kazakov
  2003-11-07 15:57   ` Frank J. Lhota
  0 siblings, 2 replies; 223+ messages in thread
From: Anders Wirzenius @ 2003-11-07  8:07 UTC (permalink / raw)



<christoph.grein@eurocopter.com> wrote in message
news:mailman.290.1068108838.25614.comp.lang.ada@ada-france.org...
> "Vinzent 'Gadget' Hoefler" <ada.rocks@jlfencey.com> wrote:
>
> > Russ wrote:
> > >Do you have any idea what that says
> > >about your intelligence?
> >
> > Referring to some other posting from you that follow the same
style,
> > I'd say: "Yes, I am an idiot." Satisfied?
> >
> > >You might as well just blurt out, "I'm an idiot".
> >
> > Well, and after all I've read from you, you might as well say,
"All
> > Ada programmers are idiots". Be it so.
>
> Well said :-) I know I'm an idiot, too, but I like it...
>

So be it.
I don�t consider me to be an idiot and I think other�s opinions about
me as an idiot or not don�t count very high in my priorities. A person
with a lower IQ is usually happy with himself until "corrected" by
another person.

Wasn�t Vincent Van Gogh mentally ill? But he made lovely paintings!

Wasn't Beethoven deaf when he wrote his ninth symphony?

Why cannot an idiot write excellent code?

I somewhere read about an intelligence investigation that considered
some jungle tribe to have a lower IQ because they where not quite
familiar with the usage of a simple phone model.

Anders




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 20:38                           ` Gautier Write-only
  2003-11-06 21:12                             ` Warren W. Gay VE3WWG
  2003-11-07  7:08                             ` Russ
@ 2003-11-07  8:48                             ` Preben Randhol
  2003-11-08 10:56                               ` Gautier Write-only
  2003-11-08 20:08                               ` Russ
  2003-11-07 15:54                             ` Frank J. Lhota
  3 siblings, 2 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-07  8:48 UTC (permalink / raw)


On 2003-11-06, Gautier Write-only <gautier@fakeaddress.nil> wrote:
> And the list can be long in *certain* programs, *not* the
> safety-critical code or whatever "special" code where

Well I usually write it like this:


with Gdk.Types.Keysyms;          use Gdk.Types.Keysyms;
with Gtk.Accel_Group;            use Gtk.Accel_Group;
with Gtk;                        use Gtk;
with Glib;                       use Glib;
with Gdk.Types;                  use Gdk.Types;
with Gtkada.Handlers;            use Gtkada.Handlers;
with Gtk.Enums;                  use Gtk.Enums;
with Program_Intl;               use Program_Intl;
with Window.Callbacks;
with Program_Callbacks;
with Settings.Gui;
with Welcome;
with Examine;
with Result;
with Listing;
with Listing.Setup;
with Setup;
with Gac.Help;

and I sort it so that all the with use pairs comes first.

I find that nice and readable.

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Intelligence, was: Clause "with and use"
  2003-11-07  8:07 ` Intelligence, was: " Anders Wirzenius
@ 2003-11-07 10:54   ` Dmitry A. Kazakov
  2003-11-07 11:54     ` Anders Wirzenius
  2003-11-07 15:57   ` Frank J. Lhota
  1 sibling, 1 reply; 223+ messages in thread
From: Dmitry A. Kazakov @ 2003-11-07 10:54 UTC (permalink / raw)


On Fri, 07 Nov 2003 08:07:44 GMT, "Anders Wirzenius"
<anders.wirzenius@pp.qnet.fi> wrote:

><christoph.grein@eurocopter.com> wrote in message
>news:mailman.290.1068108838.25614.comp.lang.ada@ada-france.org...
>> "Vinzent 'Gadget' Hoefler" <ada.rocks@jlfencey.com> wrote:
>>
>> > Russ wrote:
>> > >Do you have any idea what that says
>> > >about your intelligence?
>> >
>> > Referring to some other posting from you that follow the same
>style,
>> > I'd say: "Yes, I am an idiot." Satisfied?
>> >
>> > >You might as well just blurt out, "I'm an idiot".
>> >
>> > Well, and after all I've read from you, you might as well say,
>"All
>> > Ada programmers are idiots". Be it so.
>>
>> Well said :-) I know I'm an idiot, too, but I like it...
>>
>
>So be it.
>I don�t consider me to be an idiot and I think other�s opinions about
>me as an idiot or not don�t count very high in my priorities. A person
>with a lower IQ is usually happy with himself until "corrected" by
>another person.
>
>Wasn�t Vincent Van Gogh mentally ill? But he made lovely paintings!

Painting does not require the mental power which people usually called
idiots lack. An idiot could well be a genial painter or writer. I
would say that a truly great one also should be, to some extent.

>Wasn't Beethoven deaf when he wrote his ninth symphony?

As for this particular case, he wasn't an idiot!

>Why cannot an idiot write excellent code?

Put it otherwise. What is the probability that a piece of an excellent
code was written by an idiot?

>I somewhere read about an intelligence investigation that considered
>some jungle tribe to have a lower IQ because they where not quite
>familiar with the usage of a simple phone model.

A plainly incorrect experiment! Jungle trimes should have much higher
IQ than we, because they don't use C++! (:-))

---
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Intelligence, was: Clause "with and use"
  2003-11-07 10:54   ` Dmitry A. Kazakov
@ 2003-11-07 11:54     ` Anders Wirzenius
  2003-11-07 13:34       ` Dmitry A. Kazakov
  0 siblings, 1 reply; 223+ messages in thread
From: Anders Wirzenius @ 2003-11-07 11:54 UTC (permalink / raw)



"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
news:0mtmqvsker4h2d4p7p16vn970mf02ndpii@4ax.com...
> On Fri, 07 Nov 2003 08:07:44 GMT, "Anders Wirzenius"
> <anders.wirzenius@pp.qnet.fi> wrote:
> >Wasn�t Vincent Van Gogh mentally ill? But he made lovely paintings!
>
> Painting does not require the mental power which people usually
called
> idiots lack. An idiot could well be a genial painter or writer. I
> would say that a truly great one also should be, to some extent.
>
> >Wasn't Beethoven deaf when he wrote his ninth symphony?
>
> As for this particular case, he wasn't an idiot!
>
> >Why cannot an idiot write excellent code?
>
> Put it otherwise. What is the probability that a piece of an
excellent
> code was written by an idiot?

... then put it back one step. What is the probability that an
excellent piece of music is composed by a deaf person? ;-)

Anders




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Intelligence, was: Clause "with and use"
  2003-11-07 11:54     ` Anders Wirzenius
@ 2003-11-07 13:34       ` Dmitry A. Kazakov
  0 siblings, 0 replies; 223+ messages in thread
From: Dmitry A. Kazakov @ 2003-11-07 13:34 UTC (permalink / raw)


On Fri, 07 Nov 2003 11:54:10 GMT, "Anders Wirzenius"
<anders.wirzenius@pp.qnet.fi> wrote:

>"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
>news:0mtmqvsker4h2d4p7p16vn970mf02ndpii@4ax.com...
>> On Fri, 07 Nov 2003 08:07:44 GMT, "Anders Wirzenius"
>> <anders.wirzenius@pp.qnet.fi> wrote:
>> >Wasn�t Vincent Van Gogh mentally ill? But he made lovely paintings!
>>
>> Painting does not require the mental power which people usually
>called
>> idiots lack. An idiot could well be a genial painter or writer. I
>> would say that a truly great one also should be, to some extent.
>>
>> >Wasn't Beethoven deaf when he wrote his ninth symphony?
>>
>> As for this particular case, he wasn't an idiot!
>>
>> >Why cannot an idiot write excellent code?
>>
>> Put it otherwise. What is the probability that a piece of an
>excellent
>> code was written by an idiot?
>
>... then put it back one step. What is the probability that an
>excellent piece of music is composed by a deaf person? ;-)

... close to the probability for an excellent code to be written by a
blind man!

---
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 20:38                           ` Gautier Write-only
                                               ` (2 preceding siblings ...)
  2003-11-07  8:48                             ` Preben Randhol
@ 2003-11-07 15:54                             ` Frank J. Lhota
  3 siblings, 0 replies; 223+ messages in thread
From: Frank J. Lhota @ 2003-11-07 15:54 UTC (permalink / raw)


"Gautier Write-only" <gautier@fakeaddress.nil> wrote in message
news:3FAAB12E.C7593B45@fakeaddress.nil...
> ...
> The whole debate has (as expected ;-) shifted from
> "how to make use-as-a-context-clause easier"
> to
> "to use or not to use"
> or even
> "to += or not to +=".
> Please (dear participants) remain on-topic...

I've got it!

    with +:= use Ada.Text_Io;





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Intelligence, was: Clause "with and use"
  2003-11-07  8:07 ` Intelligence, was: " Anders Wirzenius
  2003-11-07 10:54   ` Dmitry A. Kazakov
@ 2003-11-07 15:57   ` Frank J. Lhota
  2003-11-07 16:18     ` Stephane Richard
  1 sibling, 1 reply; 223+ messages in thread
From: Frank J. Lhota @ 2003-11-07 15:57 UTC (permalink / raw)


"Anders Wirzenius" <anders.wirzenius@pp.qnet.fi> wrote in message
news:kpIqb.65$cO3.9@read3.inet.fi...
> Why cannot an idiot write excellent code?

http://www.alsongs.com/index.cfm?view=alsong&SongNumber=25





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Intelligence, was: Clause "with and use"
  2003-11-07 15:57   ` Frank J. Lhota
@ 2003-11-07 16:18     ` Stephane Richard
  0 siblings, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-07 16:18 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]

Well I fell of MY chair on that one Frank.  There's no better song for the
situation ;-).

-- 
"To err is human.  To really screw up, you need C++!"

St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com


"Frank J. Lhota" <NOSPAM.lhota.adarose@verizon.net> wrote in message
news:whPqb.1141$hB5.338@nwrdny02.gnilink.net...
> "Anders Wirzenius" <anders.wirzenius@pp.qnet.fi> wrote in message
> news:kpIqb.65$cO3.9@read3.inet.fi...
> > Why cannot an idiot write excellent code?
>
> http://www.alsongs.com/index.cfm?view=alsong&SongNumber=25
>
>





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07  7:02                                   ` Martin Dowie
@ 2003-11-07 19:04                                     ` Robert I. Eachus
  2003-11-07 19:23                                       ` Martin Dowie
  0 siblings, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-07 19:04 UTC (permalink / raw)


Martin Dowie wrote:

> Yes, it's also a "Work Item" so maybe there will be too much trouble
> in implementing it - but I was really just trying to point out that the
> ARG _is_ thinking about this sort of problem but doing it in an Ada!

Oh, I think it definitely will happen for functions returning limited 
objects--definitely useful for constructors.  The trick is to figure out 
how to allow compilers to take advantage of the potential optimization 
in the non-limited case while not requiring the "optimization" which may 
cost more than it helps.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07 19:04                                     ` Robert I. Eachus
@ 2003-11-07 19:23                                       ` Martin Dowie
  2003-11-07 19:38                                         ` Robert I. Eachus
  0 siblings, 1 reply; 223+ messages in thread
From: Martin Dowie @ 2003-11-07 19:23 UTC (permalink / raw)


"Robert I. Eachus" <rieachus@comcast.net> wrote in message
news:kO6dnVFlLM5RcTaiRVn-tg@comcast.com...
> Martin Dowie wrote:
>
> > Yes, it's also a "Work Item" so maybe there will be too much trouble
> > in implementing it - but I was really just trying to point out that the
> > ARG _is_ thinking about this sort of problem but doing it in an Ada!
>
> Oh, I think it definitely will happen for functions returning limited
> objects--definitely useful for constructors.  The trick is to figure out
> how to allow compilers to take advantage of the potential optimization
> in the non-limited case while not requiring the "optimization" which may
> cost more than it helps.

I was also wondering how it would cope with non-limited types in
situations like:

   A := A * B;
   -- A and B are for the sake of arguement 'matrices', see the AI on
   -- matrices & vectors ;-)

In this case could you safely manipulate A 'in-situ'?..

I notice the Python RM is careful to talk of doing the in-situ work
'where possible'.






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07 19:23                                       ` Martin Dowie
@ 2003-11-07 19:38                                         ` Robert I. Eachus
  2003-11-07 22:46                                           ` Martin Dowie
  0 siblings, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-07 19:38 UTC (permalink / raw)


Martin Dowie wrote:

> I was also wondering how it would cope with non-limited types in
> situations like:
> 
>    A := A * B;
>    -- A and B are for the sake of arguement 'matrices', see the AI on
>    -- matrices & vectors ;-)
> 
> In this case could you safely manipulate A 'in-situ'?..

You see why ammending the reference manual is no easy task.  Of course 
we don't want to allow or require a compiler to mess up in that case, 
but want to permit it to do: A := B * C; right.  (That doesn't mean I 
can easily define what "right" means if A, B, and C are bit vectors.)

Oh, and just to rain a bit more on the parade, if A in your example is a 
3x4 matrix and B is 4x3, then is it legal to raise Constraint_Error 
before doing the arithmetic?  A more interesting question is that 
obviously if A in A := B * C; is indefinite, you want it to get the 
"right" constraint from the "*" function.  But what if the return value 
is declared indefinite?  Can it take its constraints from the target object?

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 20:03                               ` Martin Dowie
  2003-11-07  0:22                                 ` Robert I. Eachus
  2003-11-07  5:04                                 ` Russ
@ 2003-11-07 20:31                                 ` Russ
  2003-11-07 22:59                                   ` Martin Dowie
                                                     ` (2 more replies)
  2 siblings, 3 replies; 223+ messages in thread
From: Russ @ 2003-11-07 20:31 UTC (permalink / raw)


"Martin Dowie" <martin.dowie@btopenworld.com> wrote in message news:<boe9es$ep5$1@hercules.btinternet.com>...
> "Russ" <18k11tm001@sneakemail.com> wrote in message
> news:bebbba07.0311061052.772a095@posting.google.com...
> > If you honestly find "+=" to be "unreadable," then I'd say that, yes,
> > you are indeed an idiot. I certainly would never hire a programmer who
> > has to grapple with the meaning of "+=". For Pete's sake, I have real
> > work to do. Would you hire such a person? If so, I can't imagine how
> > you could get any significant amount of work done. Go ask anyone who
> > hires programmers, and ask them if they would hire anyone who
> > struggles with the meaning of "+=". Having said that, I don't think
> > for a second that anyone here *really* has trouble understanding "+=".
> > That means that I don't really consider you idiots, I am just baffled
> > as to why you insist on portraying yourselves as such. Now, if you
> > quote me on this, please keep this entire paragraph intact.
> 
> I have noticed that although such short forms are available to Python
> users (another language I quite like...), I've yet to find one occasion
> when it has actually been used. And that's largely from browsing from
> the 'official' Python homepage and its 'de-facto' standard libraries.
> 
> So why don't they use it? I don't no for sure but one of the explicit
> aims of Python was to promote readability.

I will reply a second time to this post so that I may clarify a couple
of points.

As I wrote the first time, "+=" was introduced in Python only
relatively recently, which explains why it does not appear much in the
libraries.

> Perhaps, Russ, you could instil a vigorous debate over at c.l.p.
> and ask them why they are being so 'idiotic'? ;-)

Well, I see your little ";-)", so I realize that you are not
exhibiting overt hostility. Nevertheless, it is clear to me that you
and others have misconstrued what I wrote about idiots and idiocy.

I never called anyone an idiot for not using "+=" (as your statement
above implies), nor did I ever call anyone an idiot for opposing
augmented assignment operators in Ada. As far as I can recall, all I
said is that any professional programmer who has difficulty grasping
the concept of "+=", or who considers it "unreadable," must be an
idiot. I will add that I don't think anyone who is intelligent enough
to become a professional programmer could possibly fall into that
category.

Imagine you were interviewing a programmer for a job, and he mentioned
that he really has difficulty reading and understanding the meaning of
"+=". What would you think? Would you hire the guy?

Imagine a journalist is applying for a job with the local newspaper.
Now imagine that, in the course of the interview, he says, "I really
have trouble with some  vowels. I can handle a, e, and i, but o and u
throw me for a loop. And y is just completely unreadable!" Do you
suppose he would get the job? Well, that's comparable to a
professional programmer who has problems understanding "+=".

> So, Russ, have read AI-318? Do you still think that "+=",etc is
> still necessary, now there is a mechanism to avoid that extra deep
> copy for things like matrices/vectors?

I started to read it, but it's a bit too technical for me. Too many of
those wierd vowels. 8^) I don't know if it solves the problem of
efficient vector/matrix operations, but it if does, it sure looks a
lot more complicated to me than "+=" (or ":+"). If you have time, I
would appreciate an example of how it would be used for matrix
addition, for example. Just the calling statement using an overloaded
"+" will be sufficient.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07 19:38                                         ` Robert I. Eachus
@ 2003-11-07 22:46                                           ` Martin Dowie
  2003-11-09  6:49                                             ` Robert I. Eachus
  0 siblings, 1 reply; 223+ messages in thread
From: Martin Dowie @ 2003-11-07 22:46 UTC (permalink / raw)


"Robert I. Eachus" <rieachus@comcast.net> wrote in message
news:M5SdnWLXHfI4aTaiRVn-hQ@comcast.com...
> Martin Dowie wrote:
> > I was also wondering how it would cope with non-limited types in
> > situations like:
> >
> >    A := A * B;
> >    -- A and B are for the sake of arguement 'matrices', see the AI on
> >    -- matrices & vectors ;-)
> >
> > In this case could you safely manipulate A 'in-situ'?..
>
> You see why ammending the reference manual is no easy task.

I've tried to write an AI *once*! :-) (for a cr*ppy little pragma) and
it took forever and no one was interested anyway (apart from me ;-)


> Of course
> we don't want to allow or require a compiler to mess up in that case,
> but want to permit it to do: A := B * C; right.  (That doesn't mean I
> can easily define what "right" means if A, B, and C are bit vectors.)
>
> Oh, and just to rain a bit more on the parade, if A in your example is a
> 3x4 matrix and B is 4x3, then is it legal to raise Constraint_Error
> before doing the arithmetic?

Absolutely - just like the AI for matrices/vectors says!


>  A more interesting question is that
> obviously if A in A := B * C; is indefinite, you want it to get the
> "right" constraint from the "*" function.  But what if the return value
> is declared indefinite?  Can it take its constraints from the target
object?

Sorry, it is v.late, I'm not sure what you mean here... Do you mean
'what if "B" and "C" are functions returning indefinite values?'






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07 20:31                                 ` Russ
@ 2003-11-07 22:59                                   ` Martin Dowie
  2003-11-07 23:33                                     ` Martin Dowie
  2003-11-08  8:22                                     ` Russ
  2003-11-09  6:59                                   ` Robert I. Eachus
  2003-11-09 14:27                                   ` Martin Dowie
  2 siblings, 2 replies; 223+ messages in thread
From: Martin Dowie @ 2003-11-07 22:59 UTC (permalink / raw)


"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311071231.239981ea@posting.google.com...
> "Martin Dowie" <martin.dowie@btopenworld.com> wrote in message
news:<boe9es$ep5$1@hercules.btinternet.com>...
[snip]
> > So why don't they use it? I don't no for sure but one of the explicit
> > aims of Python was to promote readability.
>
> I will reply a second time to this post so that I may clarify a couple
> of points.
>
> As I wrote the first time, "+=" was introduced in Python only
> relatively recently, which explains why it does not appear much in the
> libraries.

Well, it's been >2 years... and so far I've seen little use of it yet - but
I stand to be corrected...


[snip]
> > Perhaps, Russ, you could instil a vigorous debate over at c.l.p.
> > and ask them why they are being so 'idiotic'? ;-)
>
> Well, I see your little ";-)", so I realize that you are not
> exhibiting overt hostility. Nevertheless, it is clear to me that you
> and others have misconstrued what I wrote about idiots and idiocy.

Sorry - just yanking your chain! :-)


[snip]
> > So, Russ, have read AI-318? Do you still think that "+=",etc is
> > still necessary, now there is a mechanism to avoid that extra deep
> > copy for things like matrices/vectors?
>
> I started to read it, but it's a bit too technical for me. Too many of
> those wierd vowels. 8^) I don't know if it solves the problem of
> efficient vector/matrix operations, but it if does, it sure looks a
> lot more complicated to me than "+=" (or ":+"). If you have time, I
> would appreciate an example of how it would be used for matrix
> addition, for example. Just the calling statement using an overloaded
> "+" will be sufficient.

That's exactly what it's getting at (provided the "+" operator is defined
correctly :-)

   A := B * C;  -- would not require an extra copy

where "*" is still defined as per any other function:

   function "*" (Left, Right : Real_Matrix) return Real_Matrix;

the difference would be in the body (as currently spec-ed):

   function "*" (Left, Right : Real_Matrix) return Real_Matrix is
   begin
      -- Do some checks on 'Left' and 'Right', raise Constraint_Error
      -- if erroneous
      declare
         Result : out Real_Matrix (..., ...);  -- Ranges based on Left and
Right
      begin
          return Result;  -- Actually returns a value 'in-situ'
      end;
   end "*";

BUT as per my other chat with RIE:

  A := A * C;  -- might very well require an 'extra' copy

but that extra copy may be necessary to do it 'right' - as in Python.

-- Martin





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07 22:59                                   ` Martin Dowie
@ 2003-11-07 23:33                                     ` Martin Dowie
  2003-11-08  8:22                                     ` Russ
  1 sibling, 0 replies; 223+ messages in thread
From: Martin Dowie @ 2003-11-07 23:33 UTC (permalink / raw)


"Martin Dowie" <martin.dowie@btopenworld.com> wrote in message
news:boh842$h8v$1@hercules.btinternet.com...
>          Result : out Real_Matrix (..., ...);  -- Ranges based on Left and

or "Result : return Real_Matrix (...);" - whatever the current syntax is.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07 22:59                                   ` Martin Dowie
  2003-11-07 23:33                                     ` Martin Dowie
@ 2003-11-08  8:22                                     ` Russ
  2003-11-08  9:04                                       ` Martin Dowie
  1 sibling, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-08  8:22 UTC (permalink / raw)


"Martin Dowie" <martin.dowie@btopenworld.com> wrote in message news:<boh842$h8v$1@hercules.btinternet.com>...
> "Russ" <18k11tm001@sneakemail.com> wrote in message
> news:bebbba07.0311071231.239981ea@posting.google.com...

> > > So, Russ, have read AI-318? Do you still think that "+=",etc is
> > > still necessary, now there is a mechanism to avoid that extra deep
> > > copy for things like matrices/vectors?
> >
> > I started to read it, but it's a bit too technical for me. Too many of
> > those wierd vowels. 8^) I don't know if it solves the problem of
> > efficient vector/matrix operations, but it if does, it sure looks a
> > lot more complicated to me than "+=" (or ":+"). If you have time, I
> > would appreciate an example of how it would be used for matrix
> > addition, for example. Just the calling statement using an overloaded
> > "+" will be sufficient.
> 
> That's exactly what it's getting at (provided the "+" operator is defined
> correctly :-)

I certainly appreciate your taking the time to answer my question.

>    A := B * C;  -- would not require an extra copy

I'm just a bit puzzled as to why you immediately shifted from "+" to
"*". Correct me if I am wrong, but I believe that general matrix
multiplication is  impossible to do without a temporary matrix (or
other work space). Unlike matrix addition, you cannot simply overwrite
the elements of one of the input matrices. So although you can
eliminate a copy operation, you probably cannot eliminate the
construction and destruction of a temporary (assuming you require
reentrant code).

In any case, am I correct in assuming that AI-318 would eliminate
*both* the copy operation *and* the temporary for matrix addition (as
"+=" would do)? That is, can I use

   A := A + B; -- or
   A := B + C;

and avoid both the temporary and the copy operation? If so, then I
gladly concede that my case for "+=" (or ":+") is weakened. As you
know, however, I am a hard-core fanatic, and I still think ":+" is a
good idea even just for scalar operations.

By the way, it would be nice to retain the full efficiency even for
cascaded expressions such as

   A := B + C + D;

However, it is not critical because you can always break these
expressions up into simpler expressions. Of course, you will only do
that if you are aware of what causes temporaries and extra copying to
be generated.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-08  8:22                                     ` Russ
@ 2003-11-08  9:04                                       ` Martin Dowie
  0 siblings, 0 replies; 223+ messages in thread
From: Martin Dowie @ 2003-11-08  9:04 UTC (permalink / raw)


"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311080022.7066f205@posting.google.com...
> >    A := B * C;  -- would not require an extra copy
>
> I'm just a bit puzzled as to why you immediately shifted from "+" to
> "*".

It was really, really late... Nothing sinister!


> In any case, am I correct in assuming that AI-318 would eliminate
> *both* the copy operation *and* the temporary for matrix addition (as
> "+=" would do)? That is, can I use
>
>    A := A + B; -- or
>    A := B + C;
> and avoid both the temporary and the copy operation?

That's my reading of it.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07  8:48                             ` Preben Randhol
@ 2003-11-08 10:56                               ` Gautier Write-only
  2003-11-08 11:35                                 ` Preben Randhol
  2003-11-08 19:40                                 ` Russ
  2003-11-08 20:08                               ` Russ
  1 sibling, 2 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-11-08 10:56 UTC (permalink / raw)


Preben Randhol:

> Well I usually write it like this:
> 
> with Gdk.Types.Keysyms;          use Gdk.Types.Keysyms;
> with Gtk.Accel_Group;            use Gtk.Accel_Group;
> with Gtk;                        use Gtk;
> with Glib;                       use Glib;
> with Gdk.Types;                  use Gdk.Types;
> with Gtkada.Handlers;            use Gtkada.Handlers;
> with Gtk.Enums;                  use Gtk.Enums;
> with Program_Intl;               use Program_Intl;
> with Window.Callbacks;
> with Program_Callbacks;
> with Settings.Gui;
> with Welcome;
> with Examine;
> with Result;
> with Listing;
> with Listing.Setup;
> with Setup;
> with Gac.Help;
> 
> and I sort it so that all the with use pairs comes first.
> 
> I find that nice and readable.

I agree that it's an optimum, but under the constraint
of the present syntax. I would be very happier if I could
have it so:

[with and ]use
  Gdk.Types, Gdk.Types.Keysyms,
  Gtk, Gtk.Accel_Group, Gtk.Enums,
  Gtkada.Handlers,
  Glib,
  Program_Intl;

with
  Window.Callbacks, Program_Callbacks,
  Settings.Gui,
  Welcome, Examine, Result,
  Listing, Listing.Setup, Setup,
  Gac.Help;

Wouldn't you ?
It's nicer, a bit easier to manage and hopefully the
title of the unit below will appear already on the first page
of a listing...

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-08 10:56                               ` Gautier Write-only
@ 2003-11-08 11:35                                 ` Preben Randhol
  2003-11-11 22:28                                   ` Gautier Write-only
  2003-11-08 19:40                                 ` Russ
  1 sibling, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-08 11:35 UTC (permalink / raw)


On 2003-11-08, Gautier Write-only <gautier@fakeaddress.nil> wrote:
>
> I agree that it's an optimum, but under the constraint
> of the present syntax. I would be very happier if I could
> have it so:
>
> [with and ]use
>   Gdk.Types, Gdk.Types.Keysyms,
>   Gtk, Gtk.Accel_Group, Gtk.Enums,
>   Gtkada.Handlers,
>   Glib,
>   Program_Intl;
>
> with
>   Window.Callbacks, Program_Callbacks,
>   Settings.Gui,
>   Welcome, Examine, Result,
>   Listing, Listing.Setup, Setup,
>   Gac.Help;
>
> Wouldn't you ?
> It's nicer, a bit easier to manage and hopefully the
> title of the unit below will appear already on the first page
> of a listing...

No, I wouldn't actually for these reasons:

   1. It doesn't become more readable.
   2. It doesn't make it easier to change a with-ed package to a
      with and use (or only use) package. 
   3. It isn't a feature which will imporve the language IMHO.
   4. I find the way I wrote the wit and use more readable and easier to
      modify (cut'n'paste, for example)
   5. It would totally break with Ada 95 (if use implicitly with a unit)
   6. Reason as stated in my signature.

Now I'll continue my ada-suit for vim so I can share it to other vim
users as soon as possible. 

I'll make the with use macro now ;-)

Preben

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-08 10:56                               ` Gautier Write-only
  2003-11-08 11:35                                 ` Preben Randhol
@ 2003-11-08 19:40                                 ` Russ
  2003-11-10  7:38                                   ` Preben Randhol
  1 sibling, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-08 19:40 UTC (permalink / raw)


Gautier Write-only <gautier@fakeaddress.nil> wrote in message news:<3FACCBFB.9D288CF2@fakeaddress.nil>...
> Preben Randhol:
> 
> > Well I usually write it like this:
> > 
> > with Gdk.Types.Keysyms;          use Gdk.Types.Keysyms;
> > with Gtk.Accel_Group;            use Gtk.Accel_Group;
> > with Gtk;                        use Gtk;
> > with Glib;                       use Glib;
> > with Gdk.Types;                  use Gdk.Types;
> > with Gtkada.Handlers;            use Gtkada.Handlers;
> > with Gtk.Enums;                  use Gtk.Enums;
> > with Program_Intl;               use Program_Intl;
> > with Window.Callbacks;
> > with Program_Callbacks;
> > with Settings.Gui;
> > with Welcome;
> > with Examine;
> > with Result;
> > with Listing;
> > with Listing.Setup;
> > with Setup;
> > with Gac.Help;
> > 
> > and I sort it so that all the with use pairs comes first.
> > 
> > I find that nice and readable.
> 
> I agree that it's an optimum, but under the constraint
> of the present syntax. I would be very happier if I could
> have it so:
> 
> [with and ]use
>   Gdk.Types, Gdk.Types.Keysyms,
>   Gtk, Gtk.Accel_Group, Gtk.Enums,
>   Gtkada.Handlers,
>   Glib,
>   Program_Intl;
> 
> with
>   Window.Callbacks, Program_Callbacks,
>   Settings.Gui,
>   Welcome, Examine, Result,
>   Listing, Listing.Setup, Setup,
>   Gac.Help;
> 
> Wouldn't you ?
> It's nicer, a bit easier to manage and hopefully the
> title of the unit below will appear already on the first page
> of a listing...

Once again, I agree completely. And I think that most of the people
who disagree will reflexively defend the current Ada way no matter how
solid your arguments. They are set in their ways. We can only hope
that the people with the authority to change the language are more
open minded.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07  8:48                             ` Preben Randhol
  2003-11-08 10:56                               ` Gautier Write-only
@ 2003-11-08 20:08                               ` Russ
  2003-11-09  4:23                                 ` Alexandre E. Kopilovitch
  1 sibling, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-08 20:08 UTC (permalink / raw)


Preben Randhol <randhol+valid_for_reply_from_news@pvv.org> wrote in message news:<slrnbqmn3k.pk.randhol+valid_for_reply_from_news@kiuk0156.chembio.ntnu.no>...
> 
> Well I usually write it like this:
> 
> with Gdk.Types.Keysyms;          use Gdk.Types.Keysyms;
> with Gtk.Accel_Group;            use Gtk.Accel_Group;
> with Gtk;                        use Gtk;
> with Glib;                       use Glib;
> with Gdk.Types;                  use Gdk.Types;
> with Gtkada.Handlers;            use Gtkada.Handlers;
> with Gtk.Enums;                  use Gtk.Enums;
> with Program_Intl;               use Program_Intl;
> with Window.Callbacks;
> with Program_Callbacks;
> with Settings.Gui;
> with Welcome;
> with Examine;
> with Result;
> with Listing;
> with Listing.Setup;
> with Setup;
> with Gac.Help;
> 
> and I sort it so that all the with use pairs comes first.
> 
> I find that nice and readable.

It just occurrred to me that perhaps your definition of "readable"
differs from mine. You claim, for example, that

   with Gdk.Types.Keysyms;          use Gdk.Types.Keysyms;

is "more readable" than simply

   use Gdk.Types.Keysyms;

I will agree that the former requires more reading. Is that what you
mean by "more readable"?

Well, my definition of "more readable" is not "requires more reading."
This may be controversial, but my definition of "more readable" is
"easier to read."

The latter form above is clearly easier to read because it requires
only *half* the amount of reading. And not only does it cut the
reading in half, it eliminates the need to cross check to be sure that
the two identical names are indeed indentical.

How any reasonable person could possibly assert with a straight face
that twice the reading is "more readable" is beyond me. Let me propose
a thought experiment. Make an extra copy of this post, then read both
copies and verify, character by character, that the two are identical.
Then tell me if that made it "more readable."

"When you're arguing with a fool, make sure he isn't doing the same
thing." --Anon



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-08 20:08                               ` Russ
@ 2003-11-09  4:23                                 ` Alexandre E. Kopilovitch
  0 siblings, 0 replies; 223+ messages in thread
From: Alexandre E. Kopilovitch @ 2003-11-09  4:23 UTC (permalink / raw)
  To: comp.lang.ada

Russ wrote:

>It just occurrred to me that perhaps your definition of "readable"
>differs from mine.

It is normal and common thing, this difference. For example, if I have 1 hour
and entirely foreign program of 10K lines of code and I must try to diagnose
a bug in it and install a temporary hack - then I wish that program be in C/C++
(not in Ada) - just because both C and C++ are *better readable* than Ada.
But if I have 2 weeks and must provide robust permanent upgrade - then certainly
I wish it be in Ada - for the same reason: Ada is *better readable* that C or
C++. That's it.




Alexander Kopilovitch                      aek@vib.usr.pu.ru
Saint-Petersburg
Russia




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07 22:46                                           ` Martin Dowie
@ 2003-11-09  6:49                                             ` Robert I. Eachus
  0 siblings, 0 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-09  6:49 UTC (permalink / raw)


Martin Dowie wrote:

>> A more interesting question is that
>>obviously if A in A := B * C; is indefinite, you want it to get the
>>"right" constraint from the "*" function.  But what if the return value
>>is declared indefinite?  Can it take its constraints from the target
> 
> object?
> 
> Sorry, it is v.late, I'm not sure what you mean here... Do you mean
> 'what if "B" and "C" are functions returning indefinite values?'

No, you have to think about this in the sequence I stated:

A: Matrix := B * C;
-- In this case A is not constrained and must get its constraint from
-- the function return value.  This is expected and should be allowed.

A: Matrix(1..4;1..4) := B * C;
-- Here we have a constrained object, now let's look inside the
-- function:

    function "*" (L,R: Matrix) return Matrix is
      Result: return Maxtrix := (others => others => 0.0);
      -- here we have a result--with whatever the declaration syntax is
      -- is this declaration--where the bounds come from the target.
      -- Should this be legal?

      -- In the non-limited case, the answer seems to be "What are you,
      -- nuts?  Of course you can't do that.  But where the type of the
      -- result is limited, the answer isn't so clear.  The result is
      -- going to have to be "built in place" in storage passed by the
      -- caller.  Being able to query the attributes of the result
      -- object is not so crazy in that case.  But do we want the rules
      -- to differ based on whether or not the object is limited?

      -- Remember the view of the type at the place of the call could be
      -- different from inside the function.

      -- My answer is that any rules are going to have to depend on the
      -- status of the type at the point of the function declaration.

      -- But that rule starts to produce other anomalies.  A rule that
      -- peeks inside the private part of a package with a function
      -- limited return type is possible.
    begin
      some code;
    end "*";

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07 20:31                                 ` Russ
  2003-11-07 22:59                                   ` Martin Dowie
@ 2003-11-09  6:59                                   ` Robert I. Eachus
  2003-11-09 14:27                                   ` Martin Dowie
  2 siblings, 0 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-09  6:59 UTC (permalink / raw)


Russ wrote:

> I started to read it, but it's a bit too technical for me. Too many of
> those wierd vowels. 8^) I don't know if it solves the problem of
> efficient vector/matrix operations, but it if does, it sure looks a
> lot more complicated to me than "+=" (or ":+"). If you have time, I
> would appreciate an example of how it would be used for matrix
> addition, for example. Just the calling statement using an overloaded
> "+" will be sufficient.

You are beginning to see the light.  The rest of us see your proposal to 
  add "+=" to Ada as at least several "hard" AIs worth of work.  Way to 
much to even want to think about.  Adding a procedure (Inc) with no side 
effects is a much, much easier language change to even think about.

Or to try to mix it into your metaphor, it is like asking a programmer 
as part of a job interview to write a program in any ancient language 
other than Latin or Greek.  Or your potential newspaper employee about 
his speed in writing cuniform on clay tablets.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-07 20:31                                 ` Russ
  2003-11-07 22:59                                   ` Martin Dowie
  2003-11-09  6:59                                   ` Robert I. Eachus
@ 2003-11-09 14:27                                   ` Martin Dowie
  2 siblings, 0 replies; 223+ messages in thread
From: Martin Dowie @ 2003-11-09 14:27 UTC (permalink / raw)


18k11tm001@sneakemail.com (Russ) wrote in message news:<bebbba07.0311071231.239981ea@posting.google.com>...
[snip]
> I never called anyone an idiot for not using "+=" (as your statement
> above implies), nor did I ever call anyone an idiot for opposing
> augmented assignment operators in Ada. As far as I can recall, all I
> said is that any professional programmer who has difficulty grasping
> the concept of "+=", or who considers it "unreadable," must be an
> idiot. I will add that I don't think anyone who is intelligent enough
> to become a professional programmer could possibly fall into that
> category.

For my part I don't find it unreadable, but I have found it _unreliable_
in languages like C/C++ (just yesterday, in fact!). Yesterdays bug was a
case of "i+-2" instead of "i+=2". Now that would clearly be caught by the
compiler with your proposal as it's changed a statement into an
expression. But I think it shows the 'baggage' that this sort of short
form comes with.

FUD.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-08 19:40                                 ` Russ
@ 2003-11-10  7:38                                   ` Preben Randhol
  2003-11-10 13:03                                     ` Marin David Condic
  0 siblings, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-10  7:38 UTC (permalink / raw)


On 2003-11-08, Russ <18k11tm001@sneakemail.com> wrote:
>
> Once again, I agree completely. And I think that most of the people
> who disagree will reflexively defend the current Ada way no matter how
> solid your arguments. They are set in their ways. We can only hope
> that the people with the authority to change the language are more
> open minded.

And you are reflexively promoting any new change no matter what the
change is. Sure I don't want to have a lot of trivial non-important
changes to the language. Why? Because I want changes that really do
matter and which will make the language richer.

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-06 18:52                             ` Russ
  2003-11-06 20:03                               ` Martin Dowie
@ 2003-11-10  7:47                               ` Vinzent 'Gadget' Hoefler
  1 sibling, 0 replies; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-10  7:47 UTC (permalink / raw)


Russ wrote:

>Vinzent 'Gadget' Hoefler <ada.rocks@jlfencey.com> wrote in message news:<bod0mk$1cg6bn$2@ID-175126.news.uni-berlin.de>...
>
>If you honestly find "+=" to be "unreadable," then I'd say that, yes,
>you are indeed an idiot.

Ok. So we have clarified this.

>I certainly would never hire a programmer who
>has to grapple with the meaning of "+=".

No problem. I don't take jobs where the job description says I have to
use "+=" under all circumstances.

>work to do. Would you hire such a person? If so, I can't imagine how
>you could get any significant amount of work done.

Funny. Have you perhaps noticed that the languages I am using mostly,
simply don't have a "+="?

>Having said that, I don't think
>for a second that anyone here *really* has trouble understanding "+=".

Precisely. I *know* what it is supposed to mean. That doesn't mean, I
am getting much excited from this so that I would like to (mis)use it
over and over again.

>That means that I don't really consider you idiots, I am just baffled
>as to why you insist on portraying yourselves as such. Now, if you
>quote me on this, please keep this entire paragraph intact.

Is that ok so? Does my quoting satisfy you needs?

BTW, someone who can't tell the difference between "I consider a
cosntruct unreadable" and "I can't understand the construct" must be
an idiot, too, because these are truly different things. So this
obviously applies to you, Russ. Or to say it in a different way: "I
consider C unreadable", doesn't mean, that I can't understand it.

Got it, dumbass?


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-10  7:38                                   ` Preben Randhol
@ 2003-11-10 13:03                                     ` Marin David Condic
  2003-11-10 13:19                                       ` Preben Randhol
  2003-11-11  7:20                                       ` Russ
  0 siblings, 2 replies; 223+ messages in thread
From: Marin David Condic @ 2003-11-10 13:03 UTC (permalink / raw)


Obviously, there are limited resources for modifying Ada compilers. 
Obviously, there is a large corpus of existing Ada code that must not be 
broken by language-rule changes. Just as obviously, there are 
implications that are not intuitively obvious to the casual observer 
when adding something like the infamous "+=" or now the "with and use". 
Hence, it ought to be obvious that any proposed language change had 
better have some significant food-value associated with it to make it 
worth the research time into implications, the compiler changes 
necessary and the possible risk to breaking any existing code. I don't 
see any big advantages in what has been proposed here - not enough to 
make it worth the effort.

It would be more productive to figure out if there is some major 
shortcoming in Ada or some major capabilities that Ada could use rather 
than worry about relatively trivial syntax changes that don't address 
some gaping hole in Ada's capabilities.

MDC

Preben Randhol wrote:
> 
> And you are reflexively promoting any new change no matter what the
> change is. Sure I don't want to have a lot of trivial non-important
> changes to the language. Why? Because I want changes that really do
> matter and which will make the language richer.
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-10 13:03                                     ` Marin David Condic
@ 2003-11-10 13:19                                       ` Preben Randhol
  2003-11-10 13:38                                         ` Marin David Condic
  2003-11-11  7:20                                       ` Russ
  1 sibling, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-10 13:19 UTC (permalink / raw)


On 2003-11-10, Marin David Condic <nobody@noplace.com> wrote:
> Obviously, there are limited resources for modifying Ada compilers. 
> Obviously, there is a large corpus of existing Ada code that must not be 
> broken by language-rule changes. Just as obviously, there are 
> implications that are not intuitively obvious to the casual observer 
> when adding something like the infamous "+=" or now the "with and use". 
> Hence, it ought to be obvious that any proposed language change had 
> better have some significant food-value associated with it to make it 
> worth the research time into implications, the compiler changes 
> necessary and the possible risk to breaking any existing code. I don't 
> see any big advantages in what has been proposed here - not enough to 
> make it worth the effort.
>
> It would be more productive to figure out if there is some major 
> shortcoming in Ada or some major capabilities that Ada could use rather 
> than worry about relatively trivial syntax changes that don't address 
> some gaping hole in Ada's capabilities.

Exactly.

Preben
-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-10 13:19                                       ` Preben Randhol
@ 2003-11-10 13:38                                         ` Marin David Condic
  0 siblings, 0 replies; 223+ messages in thread
From: Marin David Condic @ 2003-11-10 13:38 UTC (permalink / raw)


I don't think Ada should slavishly start emulating whatever exists in 
some other languages, but its worth looking at what things like C++ or 
Java have that Ada doesn't in so far as it covers some significant 
*capability*. C++ has the STL - it would be worth trying to get 
something like that into Ada. Java has a large library with other 
capabilities - Ada ought to consider that as a possibility. If we're 
talking syntax/semantics, is there something similar - like having a 
more class-like package construct? I'd even be willing to debate the 
relative merits of something like the method->object versus 
objec->method syntax since it seems to at least be non-trivial (although 
I think it doesn't really add any *capability* - just a syntax that 
might be more expressive of a given idiom and hence, probably not worth 
the effort.)

In "Ada Letters (Vol XXIII, Num 3) Pascal Leroy outlined some of the 
changes expected in Ada and that shows some good examples of the kinds 
of things the ARG was willing to look into changing. Mutually dependent 
types, Type Stubs, Access To Private Units, etc. They seem to address 
some real limitation that makes it tough to express certain things in 
Ada. I don't see the "with and use" or the "+=" as being in the same 
category - they don't fix a hinderance to expressing something - except 
in a trivial way.

The point is, let's not over-burden the ARG & compiler vendors with 
things that are not going to give the programmer something they couldn't 
get in some similar way with a little extra typing.

MDC


Preben Randhol wrote:
> On 2003-11-10, Marin David Condic <nobody@noplace.com> wrote:
>>
>>It would be more productive to figure out if there is some major 
>>shortcoming in Ada or some major capabilities that Ada could use rather 
>>than worry about relatively trivial syntax changes that don't address 
>>some gaping hole in Ada's capabilities.
> 
> 
> Exactly.
> 
> Preben


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-10 13:03                                     ` Marin David Condic
  2003-11-10 13:19                                       ` Preben Randhol
@ 2003-11-11  7:20                                       ` Russ
  2003-11-11  8:12                                         ` Preben Randhol
                                                           ` (3 more replies)
  1 sibling, 4 replies; 223+ messages in thread
From: Russ @ 2003-11-11  7:20 UTC (permalink / raw)


Marin David Condic <nobody@noplace.com> wrote in message news:<3FAF8C99.5040201@noplace.com>...

> Obviously, there are limited resources for modifying Ada compilers. 
> Obviously, there is a large corpus of existing Ada code that must not be 
> broken by language-rule changes. Just as obviously, there are 
> implications that are not intuitively obvious to the casual observer 
> when adding something like the infamous "+=" or now the "with and use". 
> Hence, it ought to be obvious that any proposed language change had 
> better have some significant food-value associated with it to make it 
> worth the research time into implications, the compiler changes 
> necessary and the possible risk to breaking any existing code. I don't 
> see any big advantages in what has been proposed here - not enough to 
> make it worth the effort.
> 
> It would be more productive to figure out if there is some major 
> shortcoming in Ada or some major capabilities that Ada could use rather 
> than worry about relatively trivial syntax changes that don't address 
> some gaping hole in Ada's capabilities.

If the choice of programming languages in the real world were based
strictly on objective, rational considerations by language experts,
than what you say might be wise. Unfortunately, that just isn't how
the real world works, and I think your advice is extremely unwise.

Suppose you were selling a house. You hire an expert home inspector,
and he says you've got a leaky roof and some plumbing problems. Then
you hire a real estate agent. She comes out and advises you to remove
the clutter from the front yard and do some basic gardening work to
give it some "curb appeal."

Well, you don't have a lot of money, and you know what's important.
The leaky roof *must* be fixed, but the clutter in the yard is
"cosmetic" stuff, and it can take a back seat to the "important"
stuff. You have a limited budget, and you aren't about to waste it on
trivial cosmetic stuff.

I think that's a very good analogy to what you are saying. The
"context" section at the beginning of nearly every Ada file is like
the front yard of a home. It's the first thing anyone who reads the
file sees. If it's unnecessarily cluttered, people may not complain
about it, but it will leave a lasting first impression.

What you're saying is that we should forget about the cosmetic stuff,
but any competent real estate agent will tell you that is sheer folly.
Yes, fix the roof if it needs to be fixed, but for crying out loud
don't leave the junk piled in the front yard. The loss in market value
will *greatly* exceed the cost of removing the clutter -- even if you
hire the most expensive junk hauler in the country. Smart buyers will
love you, of course, because they will gladly remove the clutter
themselves -- it'll cost them about 5% of the $5000 they save on the
purchase price of the house.

Making "use" in a context clause imply "with" is not a great technical
challenge. For Pete's sake, I could probably write a Python script in
less than an hour to do the job (including a half hour to think about
it, and 15 minutes to test it). Yet it would not break any existing
code, and anyone who wants to continue doing it the old way would be
perfectly free to do so.

I have always been impressed with your level of technical knowledge of
Ada, but I am seriously concerned with your lack of "marketing" sense.
You said yourself in a recent post that languages are often chosen for
the "wrong" reasons, such as similarity to familiar languages.
Unnecessary clutter at the beginning of each file cannot possibly help
to sell Ada, but it can certainly hurt. And it might hurt much more
than you realize, because you're so used to the clutter you probably
don't even notice it anymore.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11  7:20                                       ` Russ
@ 2003-11-11  8:12                                         ` Preben Randhol
  2003-11-11 19:43                                           ` Russ
  2003-11-11  8:31                                         ` Preben Randhol
                                                           ` (2 subsequent siblings)
  3 siblings, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-11  8:12 UTC (permalink / raw)


On 2003-11-11, Russ <18k11tm001@sneakemail.com> wrote:
> If the choice of programming languages in the real world were based
> strictly on objective, rational considerations by language experts,
> than what you say might be wise. Unfortunately, that just isn't how
> the real world works, and I think your advice is extremely unwise.

So what you are saying is: "C is a very popular language, therefore, we
must make Ada like C. C is not safe, so Ada shouldn't be either."

> I have always been impressed with your level of technical knowledge of
> Ada, but I am seriously concerned with your lack of "marketing" sense.

Oh? I think it is much better marketing strategy to get the imporant
things into the language than to run araound saying: "Hey! We now got +=
come and use the language!"


-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11  7:20                                       ` Russ
  2003-11-11  8:12                                         ` Preben Randhol
@ 2003-11-11  8:31                                         ` Preben Randhol
  2003-11-11  8:57                                           ` Vinzent 'Gadget' Hoefler
  2003-11-11 14:35                                           ` Hyman Rosen
  2003-11-11 15:36                                         ` Robert I. Eachus
  2003-11-11 16:24                                         ` Vinzent 'Gadget' Hoefler
  3 siblings, 2 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-11  8:31 UTC (permalink / raw)


On 2003-11-11, Russ <18k11tm001@sneakemail.com> wrote:
> Making "use" in a context clause imply "with" is not a great technical
> challenge. For Pete's sake, I could probably write a Python script in
> less than an hour to do the job (including a half hour to think about
> it, and 15 minutes to test it). Yet it would not break any existing
> code, and anyone who wants to continue doing it the old way would be
> perfectly free to do so.

But what is the point? What do you save by doing this? Absolutely
nothing. It took me 2 min to make two macros in vim which either add a
use unit or removes it.

If you are interested in fixing leaks in the roof (to use your analogy),
I suggest that is what you should worry about too. Not run around in
the shed reorganising the tools.

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11  8:31                                         ` Preben Randhol
@ 2003-11-11  8:57                                           ` Vinzent 'Gadget' Hoefler
  2003-11-11 10:10                                             ` Marin David Condic
  2003-11-11 20:35                                             ` Russ
  2003-11-11 14:35                                           ` Hyman Rosen
  1 sibling, 2 replies; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-11  8:57 UTC (permalink / raw)


Preben Randhol wrote:

>If you are interested in fixing leaks in the roof (to use your analogy),
>I suggest that is what you should worry about too. Not run around in
>the shed reorganising the tools.

I guess, that's what Russ tried to point out. A typical manager would
reorganize the complete toolchain first. BTST.

So it seems that a whole bunch of Ada users have a hard time dealing
with manager's thinking and talking marketing speech. Oh, not that I
would actually miss that. :-P


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11  8:57                                           ` Vinzent 'Gadget' Hoefler
@ 2003-11-11 10:10                                             ` Marin David Condic
  2003-11-11 10:49                                               ` Stephane Richard
                                                                 ` (2 more replies)
  2003-11-11 20:35                                             ` Russ
  1 sibling, 3 replies; 223+ messages in thread
From: Marin David Condic @ 2003-11-11 10:10 UTC (permalink / raw)


There isn't anything wrong with "marketing" per se. It serves a useful 
purpose. But it isn't done by some manager getting into his head that 
"XYZ is what the public will love, so let's make our product have XYZ in 
it..." Marketing is done with research and statistics, among other 
tools. You don't *assume* that your potential customers want XYZ - you 
go find out for sure what they want by asking them.

A fair approach would be to have a survey of some sample set of 
C/C++/Java users who had some familiarity with Ada and ask them if they 
would consider doing their next project in Ada if....... (fill in the 
blank with a number of possible changes) I'd imagine that doing so would 
likely reveal that either they'd not be willing to consider it at all, 
or they'd only consider it if there were such radical surgery on it that 
it basically stopped being Ada.

Guesswork is interesting in a newsgroup, but deadly when trying to make 
major decisions about a product in a business environment. You don't 
guess at what is going to make your existing customers happy. You 
respond to their requests for changes based on the priorities they set. 
You also don't guess about what would attract new business from 
potential customers. You ask them what they'd want in your product and 
try to address the highest priorities they set. To do otherwise will 
have you bankrupt very quickly.

MDC


Vinzent 'Gadget' Hoefler wrote:
> 
> So it seems that a whole bunch of Ada users have a hard time dealing
> with manager's thinking and talking marketing speech. Oh, not that I
> would actually miss that. :-P

-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 10:10                                             ` Marin David Condic
@ 2003-11-11 10:49                                               ` Stephane Richard
  2003-11-11 14:17                                               ` Vinzent 'Gadget' Hoefler
  2003-11-11 19:49                                               ` Russ
  2 siblings, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-11 10:49 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2928 bytes --]

Again to use Russ's analogy,

As we keep on saying, C++ didn't become popular because of it's syntax, I've
never seen a C/C++ advertisement campaign that bragged about how clear C is
ever, they pushed for power over clarity, at least in any commercial I've
seen (which weren't that many) in flyers, magazines and others again they
always talked about how powerful they were, bragged about averything else
but the syntax.

Maybe we shouldn't fix the roof leak or the plumbing and instead try to tell
then that with the pile of junk in the front yard, if used wisely, they can
create a  fix for the leak that can be adapted to the plumbing problem as
well?  ;-)

-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com


"Marin David Condic" <nobody@noplace.com> wrote in message
news:3FB0B57D.6070906@noplace.com...
> There isn't anything wrong with "marketing" per se. It serves a useful
> purpose. But it isn't done by some manager getting into his head that
> "XYZ is what the public will love, so let's make our product have XYZ in
> it..." Marketing is done with research and statistics, among other
> tools. You don't *assume* that your potential customers want XYZ - you
> go find out for sure what they want by asking them.
>
> A fair approach would be to have a survey of some sample set of
> C/C++/Java users who had some familiarity with Ada and ask them if they
> would consider doing their next project in Ada if....... (fill in the
> blank with a number of possible changes) I'd imagine that doing so would
> likely reveal that either they'd not be willing to consider it at all,
> or they'd only consider it if there were such radical surgery on it that
> it basically stopped being Ada.
>
> Guesswork is interesting in a newsgroup, but deadly when trying to make
> major decisions about a product in a business environment. You don't
> guess at what is going to make your existing customers happy. You
> respond to their requests for changes based on the priorities they set.
> You also don't guess about what would attract new business from
> potential customers. You ask them what they'd want in your product and
> try to address the highest priorities they set. To do otherwise will
> have you bankrupt very quickly.
>
> MDC
>
>
> Vinzent 'Gadget' Hoefler wrote:
> >
> > So it seems that a whole bunch of Ada users have a hard time dealing
> > with manager's thinking and talking marketing speech. Oh, not that I
> > would actually miss that. :-P
>
> -- 
> ======================================================================
> Marin David Condic
> I work for: http://www.belcan.com/
> My project is: http://www.jsf.mil/NSFrames.htm
>
> Send Replies To: m   o   d   c @ a   m   o   g
>                     c   n   i       c   .   r
>
>      "Trying is the first step towards failure."
>          --  Homer Simpson
>
> ======================================================================
>





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 10:10                                             ` Marin David Condic
  2003-11-11 10:49                                               ` Stephane Richard
@ 2003-11-11 14:17                                               ` Vinzent 'Gadget' Hoefler
  2003-11-11 15:36                                                 ` Wes Groleau
  2003-11-12 11:55                                                 ` Marin David Condic
  2003-11-11 19:49                                               ` Russ
  2 siblings, 2 replies; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-11 14:17 UTC (permalink / raw)


Marin David Condic wrote:

>There isn't anything wrong with "marketing" per se. It serves a useful 
>purpose. But it isn't done by some manager getting into his head that 
>"XYZ is what the public will love, so let's make our product have XYZ in 
>it..."

Well, actually that is the impression I get when it boils down to what
tools (programming languages) someone should use. "The others use
Java? So let's use it, too. It must be good."

Well, the H&R-people are similar, instead of asking you "Are you able
to build and maintain a large software-system" they ask you "Do you
know $LANGUAGE"? This is as much idiotic as asking someone "Do you
have at least five years experience with the medium-size-hammer from
$BRANDNAME?" instead of asking "Are able to simply put a nail into the
wall?"

Answer_1: "Oh yes, I have been trying to put a nail into the wall with
that hammer for seven years. Now still every seconds nail gets bended,
but that doesn't matter, I have enough nails."

Answer_2: "Well, not with that particular thing, but I did that with
the small-sized one, it better fits the job to be done. But now I know
how to handle that I think I can quickly learn how to handle the one
you want me to use."

Guess, who gets hired.

>Marketing is done with research and statistics, among other 
>tools. You don't *assume* that your potential customers want XYZ - you 
>go find out for sure what they want by asking them.

Quite true. If you were talking about the ideal approach, I even would
agree with you. But even then: the decision to use a programming
language has seldom to do with *any* of that.

>A fair approach would be to have a survey of some sample set of 
>C/C++/Java users who had some familiarity with Ada

It might be hard to find enough people so one could claim statistical
significance. Literally spoken, almost every idiot out there on the
street claims to have knowledge of C/C++/Java but if you ask them
about Ada the best response I'd ever get was something like "oh that's
the language from the eighties?" ... The same guy told me that Jython
is something similar and I would like it, because it would fit my
needs for a programming language like Ada. Huh? WTF is he talking
about?

>Guesswork is interesting in a newsgroup, but deadly when trying to make 
>major decisions about a product in a business environment.

Yes. But reality says, hell a *lot* of (especially software) projects
just went dead, so there might be a lot of guesswork involved (either
in the requirements, the schedule, ...).

>You don't 
>guess at what is going to make your existing customers happy.

Well, the customer usually wants a product and doesn't care about the
tool you used to develop the product with. But the customer will
probably care about the final price, so you should be able to make a
good decision to keep this price low. And usually you shouldn't care
about some initial costs, you should look further and see what's
better in the long run. Well, statistically I still have some years of
my life left to actually find a manager who really thinks this way, so
I just keep my hope. :->

These days I still wonder why all my deadlines are already scheduled
for yesterday. Even those for the projects which didn't even start
yet. ;-)

>You also don't guess about what would attract new business from 
>potential customers. You ask them what they'd want in your product and 
>try to address the highest priorities they set.

Yes. But I'd assume that the decision which tools you use to be able
to actually deliver the product to the customer has at least
*something* to do with management, hasn't it? Well, I think it should.
Unfortunately, a bunch of managers ouside there seem to have no clue
of *what* they are managing.

>To do otherwise will have you bankrupt very quickly.

Indeed. :->


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11  8:31                                         ` Preben Randhol
  2003-11-11  8:57                                           ` Vinzent 'Gadget' Hoefler
@ 2003-11-11 14:35                                           ` Hyman Rosen
  2003-11-11 15:04                                             ` Preben Randhol
  1 sibling, 1 reply; 223+ messages in thread
From: Hyman Rosen @ 2003-11-11 14:35 UTC (permalink / raw)


Preben Randhol wrote:
> But what is the point? What do you save by doing this? Absolutely
> nothing. It took me 2 min to make two macros in vim which either add a
> use unit or removes it.

That's *not* the point. As is so often said around here,
Ada doesn't care about the convenience of the writer of
the code. Perhaps if you had written macros to tell the
reader of the code which withed packages were also used,
you would have demonstrated something useful.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 14:35                                           ` Hyman Rosen
@ 2003-11-11 15:04                                             ` Preben Randhol
  2003-11-11 20:01                                               ` Russ
  0 siblings, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-11 15:04 UTC (permalink / raw)


On 2003-11-11, Hyman Rosen <hyrosen@mail.com> wrote:
> Preben Randhol wrote:
>> But what is the point? What do you save by doing this? Absolutely
>> nothing. It took me 2 min to make two macros in vim which either add a
>> use unit or removes it.
>
> That's *not* the point. As is so often said around here,
> Ada doesn't care about the convenience of the writer of
> the code. Perhaps if you had written macros to tell the
> reader of the code which withed packages were also used,
> you would have demonstrated something useful.

You misunderstood.

In my code I write:

with Ada.Text_IO; \au

The \au which is my shortcut (it could have been Ctrl-J or F4 etc...
depending on preference) will then make this line look like:

with Ada.Text_IO; use Ada.Text_IO;

and I can continue typing. 

It will work with any withed package as it simply copies what comes
after with until the ;. A shortcut \aU removes the use Package; from a
line.

There is no preprosessors involded. As I have said: the convenience of
the writer is the responsibility of the text editor (in my case vim) not
Ada.

As to telling the reader which packages are used, the source code will
say so and you cannot manage to make it much clearer IMHO.

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 14:17                                               ` Vinzent 'Gadget' Hoefler
@ 2003-11-11 15:36                                                 ` Wes Groleau
  2003-11-11 16:08                                                   ` Preben Randhol
  2003-11-11 16:24                                                   ` Vinzent 'Gadget' Hoefler
  2003-11-12 11:55                                                 ` Marin David Condic
  1 sibling, 2 replies; 223+ messages in thread
From: Wes Groleau @ 2003-11-11 15:36 UTC (permalink / raw)


Vinzent 'Gadget' Hoefler wrote:
> know $LANGUAGE"? This is as much idiotic as asking someone "Do you
> have at least five years experience with the medium-size-hammer from
> $BRANDNAME?" instead of asking "Are able to simply put a nail into the
> wall?"
> 
> Answer_1: "Oh yes, I have been trying to put a nail into the wall with
> that hammer for seven years. Now still every seconds nail gets bended,
> but that doesn't matter, I have enough nails."
> 
> Answer_2: "Well, not with that particular thing, but I did that with
> the small-sized one, it better fits the job to be done. But now I know
> how to handle that I think I can quickly learn how to handle the one
> you want me to use."
> 
> Guess, who gets hired.

No. 1 gets hired, because the above is only what he's thinking.
He has the marketing sense to actually _say_ "Oh, yes, I've
been pounding on nails with that hammer for seven years."

And the interviewer doesn't have the sense to ask,
"How many have you actually driven in?"

-- 
Wes Groleau
Alive and Well
http://freepages.religions.rootsweb.com/~wgroleau/




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11  7:20                                       ` Russ
  2003-11-11  8:12                                         ` Preben Randhol
  2003-11-11  8:31                                         ` Preben Randhol
@ 2003-11-11 15:36                                         ` Robert I. Eachus
  2003-11-13  6:37                                           ` Chad R. Meiners
  2003-11-11 16:24                                         ` Vinzent 'Gadget' Hoefler
  3 siblings, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-11 15:36 UTC (permalink / raw)


Russ wrote:

> I think that's a very good analogy to what you are saying. The
> "context" section at the beginning of nearly every Ada file is like
> the front yard of a home. It's the first thing anyone who reads the
> file sees. If it's unnecessarily cluttered, people may not complain
> about it, but it will leave a lasting first impression.

I think again you are missing the entire point.  Why is all that stuff 
you call junk in the front yard in the first place?  Because a lot of 
effort when into developing a set of requirements that specified where 
that "junk" goes.  Some of it doesn't look pretty, but burying it in the 
back yard to conceal it results in disaster.

The solution, as you point out, is to get someone to haul the junk away, 
to give your code better "curb appeal."  In C you can use nested 
includes to accomplish that.  In Ada, it takes a effort devoted to 
coherence and information hiding.  A package spec that has more than 
three or four with clauses is a clue that problems exist in the code. 
Ada was designed that way.

Package bodies often have as many as a dozen with clauses on large 
projects, but again, beyond that you have to wonder if it indicates a 
problem with the coherence of the package body.  Often use of generics, 
child packages, and separate bodies can reduce the clutter.  Sometimes 
the only way to "fix" the problem is to start the design over and 
refactor the problem differently.  (Note: putting an absolute maximum 
limit on the number of with clauses in the software coding standards 
fixes nothing.  If there is a problem it is in the design not the code, 
and it can't be fixed by coding standards.  Also the average number of 
with clauses will go up with the size of the project.

Don't say that too many with and use clauses produce clutter that 
reduces the appeal of Ada as a programming language.  Say instead that 
bad design in Ada results in cluttered looking with and use clauses.

If you want a single number to measure the "goodness" of the design, I 
have been comfortable with (2S + B)/(N * ln(N)) where N is the total 
number of compilation units and subunits, S is the number of with 
clauses on package specs (including generic package specs) and B is the 
number of with clauses on other units.  Some people may disagree with 
including separate subunits in N, but I seldom find designs abusing 
that.  There is a problem though is some compilation units are too 
small, so I get concerned when the average size of compilation units is 
outside the 100 to 1000 NCSLOC (non-comment source lines of code) range.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 15:36                                                 ` Wes Groleau
@ 2003-11-11 16:08                                                   ` Preben Randhol
  2003-11-11 16:24                                                   ` Vinzent 'Gadget' Hoefler
  1 sibling, 0 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-11 16:08 UTC (permalink / raw)


On 2003-11-11, Wes Groleau <groleau@freeshell.org> wrote:
> No. 1 gets hired, because the above is only what he's thinking.
> He has the marketing sense to actually _say_ "Oh, yes, I've
> been pounding on nails with that hammer for seven years."

Adding, " and they are all black and blue now..."

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 15:36                                                 ` Wes Groleau
  2003-11-11 16:08                                                   ` Preben Randhol
@ 2003-11-11 16:24                                                   ` Vinzent 'Gadget' Hoefler
  2003-11-12 12:01                                                     ` Marin David Condic
  1 sibling, 1 reply; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-11 16:24 UTC (permalink / raw)


Wes Groleau wrote:

>No. 1 gets hired, because the above is only what he's thinking.

Precisely.

>He has the marketing sense to actually _say_ "Oh, yes, I've
>been pounding on nails with that hammer for seven years."

"Marketing sense", yes. Some people would call it a lie. :-)

>And the interviewer doesn't have the sense to ask,
>"How many have you actually driven in?"

Bingo. You just earned 100 bonus points.

And now someone will tell me how proper and real-world marketing
differs from that. ;)


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11  7:20                                       ` Russ
                                                           ` (2 preceding siblings ...)
  2003-11-11 15:36                                         ` Robert I. Eachus
@ 2003-11-11 16:24                                         ` Vinzent 'Gadget' Hoefler
  2003-11-11 17:36                                           ` Stephane Richard
  3 siblings, 1 reply; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-11 16:24 UTC (permalink / raw)


Russ wrote:

>I think that's a very good analogy to what you are saying. The
>"context" section at the beginning of nearly every Ada file is like
>the front yard of a home. It's the first thing anyone who reads the
>file sees.

And sees what the house is basically made from?

>If it's unnecessarily cluttered,

it is a bad design. Simple as that.

>people may not complain
>about it, but it will leave a lasting first impression.

You mean, like - for example - the following real world snippet from
the first lines of a main.c?

|/* eventually we have to downgrade the driver */
|#if 0
|#  include <linux/config.h>
|#  include <linux/version.h>
|#endif /*0*/
|
|#include <linux/module.h>    /* for MOD_INC_USE_COUNT, automatic */
|                             /* module or kernel compilation */
|#if 0
|#  include <linux/types.h>
|#  include <linux/fs.h>
|#  include <linux/string.h>
|#  include <linux/ptrace.h>
|#  include <linux/mm.h>     /* for verify_area */
|#  include <linux/malloc.h>
|#  include <linux/errno.h>  /* for -EBUSY */
|#  include <linux/ioport.h> /* for check_region, request_region */
|#  include <linux/delay.h>  /* for loops_per_sec */
|#  include <asm/segment.h>  /* for put_user_byte */
|#  include <asm/io.h>       /* for inb_p, outb_p, inb, outb, etc. */
|#endif /*0*/
|
|#include <asm/uaccess.h>    /* for get_user, copy_from_user, etc. */
|
|#if 0
|#  include <linux/wait.h>       /* for wait_queue */
|#  include <linux/poll.h>       /* for POLLING, etc. */
|#  include <linux/miscdevice.h> /* for miscdevice */
|#endif /*0*/
|
|#include <linux/proc_fs.h>           /* for procfs functions */
|#include <linux/devfs_fs_kernel.h> /* for devfs functions */
|#include <linux/pci.h>             /* for new pci functions */
|
|#if 0
|#  include <linux/time.h>
|#  include <linux/timer.h>
|#  include <linux/delay.h>
|#endif /*0*/
|
|#if (LINUX_VERSION_CODE >= 131343)
|#  include <linux/init.h> /* for __init, module_{init,exit}; */
|                          /* automatic freeing of kernel code after */
|                          /* booting/loading */
|#else
|#  define __init
|#  define __initdata
|#endif

I won't tell you about the difference, but you can surely do that for
me. :->


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 16:24                                         ` Vinzent 'Gadget' Hoefler
@ 2003-11-11 17:36                                           ` Stephane Richard
  0 siblings, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-11 17:36 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

|/* eventually we have to downgrade the driver */
|#if 0
|#  include <linux/config.h>
|#  include <linux/version.h>
|#endif /*0*/
|
|#include <linux/module.h>    /* for MOD_INC_USE_COUNT, automatic */
|                             /* module or kernel compilation */
|#if 0
|#  include <linux/types.h>
|#  include <linux/fs.h>
|#  include <linux/string.h>
|#  include <linux/ptrace.h>
|#  include <linux/mm.h>     /* for verify_area */
|#  include <linux/malloc.h>
|#  include <linux/errno.h>  /* for -EBUSY */
|#  include <linux/ioport.h> /* for check_region, request_region */
|#  include <linux/delay.h>  /* for loops_per_sec */
|#  include <asm/segment.h>  /* for put_user_byte */
|#  include <asm/io.h>       /* for inb_p, outb_p, inb, outb, etc. */
|#endif /*0*/
|
|#include <asm/uaccess.h>    /* for get_user, copy_from_user, etc. */
|
|#if 0
|#  include <linux/wait.h>       /* for wait_queue */
|#  include <linux/poll.h>       /* for POLLING, etc. */
|#  include <linux/miscdevice.h> /* for miscdevice */
|#endif /*0*/
|
|#include <linux/proc_fs.h>           /* for procfs functions */
|#include <linux/devfs_fs_kernel.h> /* for devfs functions */
|#include <linux/pci.h>             /* for new pci functions */
|
|#if 0
|#  include <linux/time.h>
|#  include <linux/timer.h>
|#  include <linux/delay.h>
|#endif /*0*/
|
|#if (LINUX_VERSION_CODE >= 131343)
|#  include <linux/init.h> /* for __init, module_{init,exit}; */
|                          /* automatic freeing of kernel code after */
|                          /* booting/loading */
|#else
|#  define __init
|#  define __initdata
|#endif

I won't tell you about the difference, but you can surely do that for
me. :->

*** Well that is the C++ I'm used to seeing too :-).

Vinzent.



-- 
"To err is human.  To really screw up, you need C++!"

St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11  8:12                                         ` Preben Randhol
@ 2003-11-11 19:43                                           ` Russ
  2003-11-12 12:35                                             ` Preben Randhol
  0 siblings, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-11 19:43 UTC (permalink / raw)


Preben Randhol <randhol+valid_for_reply_from_news@pvv.org> wrote in message news:<slrnbr16ek.1qo.randhol+valid_for_reply_from_news@kiuk0156.chembio.ntnu.no>...
> On 2003-11-11, Russ <18k11tm001@sneakemail.com> wrote:
> > If the choice of programming languages in the real world were based
> > strictly on objective, rational considerations by language experts,
> > than what you say might be wise. Unfortunately, that just isn't how
> > the real world works, and I think your advice is extremely unwise.
> 
> So what you are saying is: "C is a very popular language, therefore, we
> must make Ada like C. C is not safe, so Ada shouldn't be either."

If you can derive that from what I wrote above (or from anything I've
ever written on this forum) then it is clear to me that you are
obsessed with jealosy over the popularity of C. I did not even mention
C or language safety. You simply pulled that stuff out of your rear
end.

If you are going to obsess over something, why not make is something
"normal" like sex? Obsessing over the popularity of C is just strange.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 10:10                                             ` Marin David Condic
  2003-11-11 10:49                                               ` Stephane Richard
  2003-11-11 14:17                                               ` Vinzent 'Gadget' Hoefler
@ 2003-11-11 19:49                                               ` Russ
  2 siblings, 0 replies; 223+ messages in thread
From: Russ @ 2003-11-11 19:49 UTC (permalink / raw)


Marin David Condic <nobody@noplace.com> wrote in message news:<3FB0B57D.6070906@noplace.com>...
> There isn't anything wrong with "marketing" per se. It serves a useful 
> purpose. But it isn't done by some manager getting into his head that 
> "XYZ is what the public will love, so let's make our product have XYZ in 
> it..." Marketing is done with research and statistics, among other 
> tools. You don't *assume* that your potential customers want XYZ - you 
> go find out for sure what they want by asking them.
> 
> A fair approach would be to have a survey of some sample set of 
> C/C++/Java users who had some familiarity with Ada and ask them if they 
> would consider doing their next project in Ada if....... (fill in the 
> blank with a number of possible changes) I'd imagine that doing so would 
> likely reveal that either they'd not be willing to consider it at all, 
> or they'd only consider it if there were such radical surgery on it that 
> it basically stopped being Ada.
> 
> Guesswork is interesting in a newsgroup, but deadly when trying to make 
> major decisions about a product in a business environment. You don't 
> guess at what is going to make your existing customers happy. You 
> respond to their requests for changes based on the priorities they set. 
> You also don't guess about what would attract new business from 
> potential customers. You ask them what they'd want in your product and 
> try to address the highest priorities they set. To do otherwise will 
> have you bankrupt very quickly.

OK, let me see if got this right. We have limited resources, so rather
than just removing the clutter from the front yard before we sell the
house, we should perform a marketing study to see if it will be a wise
investment. I give up.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 15:04                                             ` Preben Randhol
@ 2003-11-11 20:01                                               ` Russ
  2003-11-12 12:41                                                 ` Preben Randhol
  0 siblings, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-11 20:01 UTC (permalink / raw)


Preben Randhol <randhol+valid_for_reply_from_news@pvv.org> wrote in message news:<slrnbr1ujb.74s.randhol+valid_for_reply_from_news@kiuk0156.chembio.ntnu.no>...
> On 2003-11-11, Hyman Rosen <hyrosen@mail.com> wrote:
> > Preben Randhol wrote:
> >> But what is the point? What do you save by doing this? Absolutely
> >> nothing. It took me 2 min to make two macros in vim which either add a
> >> use unit or removes it.
> >
> > That's *not* the point. As is so often said around here,
> > Ada doesn't care about the convenience of the writer of
> > the code. Perhaps if you had written macros to tell the
> > reader of the code which withed packages were also used,
> > you would have demonstrated something useful.
> 
> You misunderstood.
> 
> In my code I write:
> 
> with Ada.Text_IO; \au
> 
> The \au which is my shortcut (it could have been Ctrl-J or F4 etc...
> depending on preference) will then make this line look like:
> 
> with Ada.Text_IO; use Ada.Text_IO;
> 
> and I can continue typing. 
> 
> It will work with any withed package as it simply copies what comes
> after with until the ;. A shortcut \aU removes the use Package; from a
> line.
> 
> There is no preprosessors involded. As I have said: the convenience of
> the writer is the responsibility of the text editor (in my case vim) not
> Ada.
> 
> As to telling the reader which packages are used, the source code will
> say so and you cannot manage to make it much clearer IMHO.

And you *still* miss the point, even after Mr. Rosen spoonfeeds it to
you. The point is *not* that redundant "with" and "use" clauses
require extra typing. The point is that the poor *reader* of your code
still has to *read* your cluttered code. In your reply you did not
even consider the *reader*. The *reader* doesn't give a hoot how many
keystrokes you used to generate the code. All I can say is that I'm
darn glad I'll never have to read your code.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11  8:57                                           ` Vinzent 'Gadget' Hoefler
  2003-11-11 10:10                                             ` Marin David Condic
@ 2003-11-11 20:35                                             ` Russ
  2003-11-11 22:06                                               ` Mark Lorenzen
  2003-11-11 22:08                                               ` Vinzent 'Gadget' Hoefler
  1 sibling, 2 replies; 223+ messages in thread
From: Russ @ 2003-11-11 20:35 UTC (permalink / raw)


Vinzent 'Gadget' Hoefler <ada.rocks@jlfencey.com> wrote in message news:<boq8bm$1g79l6$1@ID-175126.news.uni-berlin.de>...
> Preben Randhol wrote:
> 
> >If you are interested in fixing leaks in the roof (to use your analogy),
> >I suggest that is what you should worry about too. Not run around in
> >the shed reorganising the tools.
> 
> I guess, that's what Russ tried to point out. A typical manager would
> reorganize the complete toolchain first. BTST.

This is amazing. My analogy was between redundant "with/use" clauses
and clutter in the front yard of a house for sale. What in the
frickin' world does that have to do with reorganizing a tool shed?

Look, you are free to create your own analogies, but please don't
twist mine beyond recognition and then imagine that they are still my
analogies. It's unethical. Got that, little boy?

> So it seems that a whole bunch of Ada users have a hard time dealing
> with manager's thinking and talking marketing speech. Oh, not that I
> would actually miss that. :-P

I really feel sorry for all you poor guys with the clueless PHBs. My
managers are fairly reasonable for the most part.

My job is as about as far from marketing and management as you can
get, but I am mature enough to understand that managers have an
important job to do. For starters, without them, I would get no
funding for my work. And they are wise enough to give me lots of
discretion on how I do my work.

You seem to have nothing but disdain for your managers. Well, maybe
they earned it, but judging by your attitude, I'll bet that you are
simply too immature to appreciate their responsibilities. If they're
pinheads, then I'd say they deserve you and you deserve them. You
deserve each other. Maybe someday you'll grow up, little boy.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 20:35                                             ` Russ
@ 2003-11-11 22:06                                               ` Mark Lorenzen
  2003-11-11 22:08                                               ` Vinzent 'Gadget' Hoefler
  1 sibling, 0 replies; 223+ messages in thread
From: Mark Lorenzen @ 2003-11-11 22:06 UTC (permalink / raw)


18k11tm001@sneakemail.com (Russ) writes:

> Vinzent 'Gadget' Hoefler <ada.rocks@jlfencey.com> wrote in message news:<boq8bm$1g79l6$1@ID-175126.news.uni-berlin.de>...
>> Preben Randhol wrote:
>> 
>> >If you are interested in fixing leaks in the roof (to use your analogy),
>> >I suggest that is what you should worry about too. Not run around in
>> >the shed reorganising the tools.
>> 
>> I guess, that's what Russ tried to point out. A typical manager would
>> reorganize the complete toolchain first. BTST.
>
> This is amazing. My analogy was between redundant "with/use" clauses
> and clutter in the front yard of a house for sale. What in the
> frickin' world does that have to do with reorganizing a tool shed?
>
> Look, you are free to create your own analogies, but please don't
> twist mine beyond recognition and then imagine that they are still my
> analogies. It's unethical. Got that, little boy?
>
>> So it seems that a whole bunch of Ada users have a hard time dealing
>> with manager's thinking and talking marketing speech. Oh, not that I
>> would actually miss that. :-P
>
> I really feel sorry for all you poor guys with the clueless PHBs. My
> managers are fairly reasonable for the most part.
>
> My job is as about as far from marketing and management as you can
> get, but I am mature enough to understand that managers have an
> important job to do. For starters, without them, I would get no

Russ, this is the first time you have made me laugh. At least until I
realized that you actually mean, what you wrote in the paragraph
above. I'm sorry to burst your bubble, but the pointy haired boss from
Dilbert is not a fictional figure. *A lot* of S/W engineering people
are working for such a boss.

> funding for my work. And they are wise enough to give me lots of
> discretion on how I do my work.
>
> You seem to have nothing but disdain for your managers. Well, maybe
> they earned it, but judging by your attitude, I'll bet that you are
> simply too immature to appreciate their responsibilities. If they're
> pinheads, then I'd say they deserve you and you deserve them. You
> deserve each other. Maybe someday you'll grow up, little boy.

They have no responsibilities. Only idiotic excuses and insane
ideas. Every time a project fails miserably, who do you see stand in
line in front of a sink, washing their hands? That's right -
managers. Try to read a book like "Software failure: Management
failure" and feel the pain of those working for idiotic managers. I
clearly remember a paragraph from the post-morten report made after
the complete failure of the London Ambulance Service project:
"Management initially tried to deflect blame onto staff".

- Mark Lorenzen



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 20:35                                             ` Russ
  2003-11-11 22:06                                               ` Mark Lorenzen
@ 2003-11-11 22:08                                               ` Vinzent 'Gadget' Hoefler
  2003-11-11 22:20                                                 ` Gautier Write-only
  2003-11-11 22:30                                                 ` Stephane Richard
  1 sibling, 2 replies; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-11 22:08 UTC (permalink / raw)


Russ wrote:

>Vinzent 'Gadget' Hoefler <ada.rocks@jlfencey.com> wrote in message news:<boq8bm$1g79l6$1@ID-175126.news.uni-berlin.de>...
>
>This is amazing. My analogy was between redundant "with/use" clauses
>and clutter in the front yard of a house for sale.

For *sale*. Exactly. BTW, I still don't understand what is redundant
on with and use. I don't use "use" (well, at least not globally).

>Look, you are free to create your own analogies, but please don't
>twist mine beyond recognition and then imagine that they are still my
>analogies. It's unethical. Got that, little boy?

So WTF have you tried to point out, old man? We have to clear the
with's and uses to make Ada more business-compatible or what? Don't
you understand your own analogies?

>I really feel sorry for all you poor guys with the clueless PHBs. My
>managers are fairly reasonable for the most part.

Feel lucky, baby.

>My job is as about as far from marketing and management as you can
>get, but I am mature enough to understand that managers have an
>important job to do.

Well, of course they have. For instance, the job of telling the big
boss that everything already works whilst the engineers are still
struggling getting a beta system to run?

I understand that marketing is very often based on lies, they call
this advertisement, I think. But some things get far above that.

>For starters, without them, I would get no
>funding for my work. And they are wise enough to give me lots of
>discretion on how I do my work.

Great. Mine do that too. You know why? Because they don't understand
what I am doing.

Well, they do that as long as I deliver what they want in time, of
course. Wanna hear a funny real life story? Here it is:

Last Wednesday I was told by one of these "pinheads" that we need a
specific feature - we dropped the idea months before because it would
be much too hard to implement. The system shipped on Friday. - All in
all, I got one and a half day to implement it? Sorry, such things I
can't get out of my head just in a weekend. I'm not drinking *that*
much.

Well, I have to admit that not all of these people are that way.
Sometimes they even drop by and ask me before they sell.

Now guess, who the asshole will be when the customer complains?

>You seem to have nothing but disdain for your managers.

Call it experience. :)

>Well, maybe
>they earned it, but judging by your attitude,

You call it attitude if I want them to deliver *working* systems?

Well, call me arrogant, cynic, sarcastic, ironic, ... whatever. But I
know what I am doing. And still I can laugh. That helps.

>I'll bet that you are
>simply too immature to appreciate their responsibilities.

Oh, I was standing nearby when this particular manager talked to
potential customers. What a luck that I had the decency to keep quiet.
:) At least he kept the lies to a minimum.

>If they're
>pinheads, then I'd say they deserve you and you deserve them. You
>deserve each other.

More than that: We love each other. :) They give me hell a lot of
interesting work to do. I always loved to push systems to their
limits.

>Maybe someday you'll grow up, little boy.

Maybe, but I doubt it. I love the child in me and the day it dies will
be the same day I die.
But please, don't underestimate me. When it comes to software I am a
fucking serious person. I want reliably working systems. The "five
nines" are not just some figures.


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 22:08                                               ` Vinzent 'Gadget' Hoefler
@ 2003-11-11 22:20                                                 ` Gautier Write-only
  2003-11-11 22:38                                                   ` Vinzent 'Gadget' Hoefler
  2003-11-11 22:30                                                 ` Stephane Richard
  1 sibling, 1 reply; 223+ messages in thread
From: Gautier Write-only @ 2003-11-11 22:20 UTC (permalink / raw)


> >This is amazing. My analogy was between redundant "with/use" clauses
> >and clutter in the front yard of a house for sale.

Vinzent 'Gadget' Hoefler:

> For *sale*. Exactly. BTW, I still don't understand what is redundant
> on with and use. I don't use "use" (well, at least not globally).

In this case, effectively, you are not likely to see a redundance.
In your place I wouldn't worry at all about this proposal.
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-08 11:35                                 ` Preben Randhol
@ 2003-11-11 22:28                                   ` Gautier Write-only
  2003-11-12 12:42                                     ` Preben Randhol
  0 siblings, 1 reply; 223+ messages in thread
From: Gautier Write-only @ 2003-11-11 22:28 UTC (permalink / raw)


Preben Randhol:

[...]
> No, I wouldn't actually for these reasons:
> 
>    1. It doesn't become more readable.
>    2. It doesn't make it easier to change a with-ed package to a
>       with and use (or only use) package.
>    3. It isn't a feature which will imporve the language IMHO.
>    4. I find the way I wrote the wit and use more readable and easier to
>       modify (cut'n'paste, for example)
>    5. It would totally break with Ada 95 (if use implicitly with a unit)

If you mean that an Ada 95 couldn't compile an Ada 0Y-with-"[with and ]use"
source, you are right. It is in the nature of improvements...
There are still good Ada 83 compilers around that are unable to compile
the least Ada 95 code with "Ada.Text_IO" etc., and we can live with it.

>    6. Reason as stated in my signature.
> 
> Now I'll continue my ada-suit for vim so I can share it to other vim
> users as soon as possible.
> 
> I'll make the with use macro now ;-)

The writeability problem is small (since you can make a macro) compared
to the readability and maintanability issue of the current syntax.
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 22:08                                               ` Vinzent 'Gadget' Hoefler
  2003-11-11 22:20                                                 ` Gautier Write-only
@ 2003-11-11 22:30                                                 ` Stephane Richard
  2003-11-11 22:54                                                   ` Vinzent 'Gadget' Hoefler
  1 sibling, 1 reply; 223+ messages in thread
From: Stephane Richard @ 2003-11-11 22:30 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3736 bytes --]

You like the sweet side of frosted shredded wheats right?

Me too ;-).

"To err is human.  To really screw up, you need C++!"

St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com


"Vinzent 'Gadget' Hoefler" <ada.rocks@jlfencey.com> wrote in message
news:bormns$1i4d87$1@ID-175126.news.uni-berlin.de...
Russ wrote:

>Vinzent 'Gadget' Hoefler <ada.rocks@jlfencey.com> wrote in message
news:<boq8bm$1g79l6$1@ID-175126.news.uni-berlin.de>...
>
>This is amazing. My analogy was between redundant "with/use" clauses
>and clutter in the front yard of a house for sale.

For *sale*. Exactly. BTW, I still don't understand what is redundant
on with and use. I don't use "use" (well, at least not globally).

>Look, you are free to create your own analogies, but please don't
>twist mine beyond recognition and then imagine that they are still my
>analogies. It's unethical. Got that, little boy?

So WTF have you tried to point out, old man? We have to clear the
with's and uses to make Ada more business-compatible or what? Don't
you understand your own analogies?

>I really feel sorry for all you poor guys with the clueless PHBs. My
>managers are fairly reasonable for the most part.

Feel lucky, baby.

>My job is as about as far from marketing and management as you can
>get, but I am mature enough to understand that managers have an
>important job to do.

Well, of course they have. For instance, the job of telling the big
boss that everything already works whilst the engineers are still
struggling getting a beta system to run?

I understand that marketing is very often based on lies, they call
this advertisement, I think. But some things get far above that.

>For starters, without them, I would get no
>funding for my work. And they are wise enough to give me lots of
>discretion on how I do my work.

Great. Mine do that too. You know why? Because they don't understand
what I am doing.

Well, they do that as long as I deliver what they want in time, of
course. Wanna hear a funny real life story? Here it is:

Last Wednesday I was told by one of these "pinheads" that we need a
specific feature - we dropped the idea months before because it would
be much too hard to implement. The system shipped on Friday. - All in
all, I got one and a half day to implement it? Sorry, such things I
can't get out of my head just in a weekend. I'm not drinking *that*
much.

Well, I have to admit that not all of these people are that way.
Sometimes they even drop by and ask me before they sell.

Now guess, who the asshole will be when the customer complains?

>You seem to have nothing but disdain for your managers.

Call it experience. :)

>Well, maybe
>they earned it, but judging by your attitude,

You call it attitude if I want them to deliver *working* systems?

Well, call me arrogant, cynic, sarcastic, ironic, ... whatever. But I
know what I am doing. And still I can laugh. That helps.

>I'll bet that you are
>simply too immature to appreciate their responsibilities.

Oh, I was standing nearby when this particular manager talked to
potential customers. What a luck that I had the decency to keep quiet.
:) At least he kept the lies to a minimum.

>If they're
>pinheads, then I'd say they deserve you and you deserve them. You
>deserve each other.

More than that: We love each other. :) They give me hell a lot of
interesting work to do. I always loved to push systems to their
limits.

>Maybe someday you'll grow up, little boy.

Maybe, but I doubt it. I love the child in me and the day it dies will
be the same day I die.
But please, don't underestimate me. When it comes to software I am a
fucking serious person. I want reliably working systems. The "five
nines" are not just some figures.


Vinzent.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 22:20                                                 ` Gautier Write-only
@ 2003-11-11 22:38                                                   ` Vinzent 'Gadget' Hoefler
  2003-11-12 12:46                                                     ` Preben Randhol
  2003-11-13  7:26                                                     ` Russ
  0 siblings, 2 replies; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-11 22:38 UTC (permalink / raw)


Gautier Write-only wrote:

>Vinzent 'Gadget' Hoefler:
>
>> For *sale*. Exactly. BTW, I still don't understand what is redundant
>> on with and use. I don't use "use" (well, at least not globally).
>
>In this case, effectively, you are not likely to see a redundance.

Hmm. True. Good point. :-)

>In your place I wouldn't worry at all about this proposal.

Hey, it's still *my* language! Or so. ;)

Ok, seriously, being able to use "use" without its corresponding with
in one case and differently in another looks inconsistent for me.

To bring it to the point and the way I see it: "with" is for
thecompiler/linker to state dependencies, use is for the programmer.
For me that's two different things and I wouldn't like them to get
mixed up.

For me it's pretty much the same for record types and their
corresponding aspect clauses, they can get quite lengthy some time
(even for a small 8 bit register).
But there one part is for the programmer, the other part for the
compiler. Hopefully nobody would seriously suggest that we could mix
that up, too.

Small (maybe I now stretch it a little bit far) example:

|   type Count is (Binary, BCD);
|
|   for  Count use (Binary => 0, BCD => 1);
|
|   for  Count'Size use 1;

could then look something like this:

|type Count is (Binary => 0, BCD => 1) for Size use 1;

Still looks quite pretty at the first glance. But it mixes things up
that shouldn't be mixed up, IMO.


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 22:30                                                 ` Stephane Richard
@ 2003-11-11 22:54                                                   ` Vinzent 'Gadget' Hoefler
  0 siblings, 0 replies; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-11 22:54 UTC (permalink / raw)


Stephane Richard wrote:

>You like the sweet side of frosted shredded wheats right?

Hmm. I never thought about that. But now when you ask, yes. They're
*not* "both good". ;)

>Me too ;-).

Hmm. Does that mean anything?


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 14:17                                               ` Vinzent 'Gadget' Hoefler
  2003-11-11 15:36                                                 ` Wes Groleau
@ 2003-11-12 11:55                                                 ` Marin David Condic
  2003-11-12 13:10                                                   ` Vinzent 'Gadget' Hoefler
  1 sibling, 1 reply; 223+ messages in thread
From: Marin David Condic @ 2003-11-12 11:55 UTC (permalink / raw)


It seems you have confused my point about marketing with some point 
about language selection. I was trying to observe that the keepers of 
Ada (or any other language) are managing a *product* they expect to 
persuade people to use. Anyone selling a *product* to a *customer* has 
to be terribly concerned with giving the customer what they want as best 
they can. Its the job of marketing to figure that out.

You seem to be focusing in on a manager *selecting* some programming 
language - possibly for all sorts of reasons that are highly 
unscientific. This is the bozo that the marketing guys have to try to 
understand and try to tailor the product to his needs. Sometimes, what 
persuades the manager-bozo is some sort of technical superiority. 
Sometimes it has to do with costs, project demands, etc. Sometimes its 
the "Everybody else is using it" syndrome - which, BTW, is a *really* 
legitimate argument for a large variety of reasons. But that manager has 
needs and the guy who comes to market with him in mind and finds out how 
to address his needs is going to succeed.

On the "Everyone else is doing it" syndrome (which I think can be a good 
reason, but we can debate that) - don't worry if that is good or bad. 
Accept it as *reality* and figure out how to use it. If you had 
"Everybody else is using Ada for XYZ type of things" working in your 
favor, that gives you a sales pitch to the manager concerned with XYZ, 
doesn't it? Get "everybody else" using Ada and some of those big 
commercial and government ventures will start coming back to Ada.

MDC


Vinzent 'Gadget' Hoefler wrote:
> Marin David Condic wrote:
> 
> 
>>There isn't anything wrong with "marketing" per se. It serves a useful 
>>purpose. But it isn't done by some manager getting into his head that 
>>"XYZ is what the public will love, so let's make our product have XYZ in 
>>it..."
> 
> 
> Well, actually that is the impression I get when it boils down to what
> tools (programming languages) someone should use. "The others use
> Java? So let's use it, too. It must be good."
> 
> Well, the H&R-people are similar, instead of asking you "Are you able
> to build and maintain a large software-system" they ask you "Do you
> know $LANGUAGE"? This is as much idiotic as asking someone "Do you
> have at least five years experience with the medium-size-hammer from
> $BRANDNAME?" instead of asking "Are able to simply put a nail into the
> wall?"
> 
> Answer_1: "Oh yes, I have been trying to put a nail into the wall with
> that hammer for seven years. Now still every seconds nail gets bended,
> but that doesn't matter, I have enough nails."
> 
> Answer_2: "Well, not with that particular thing, but I did that with
> the small-sized one, it better fits the job to be done. But now I know
> how to handle that I think I can quickly learn how to handle the one
> you want me to use."
> 
> Guess, who gets hired.
> 
> 
>>Marketing is done with research and statistics, among other 
>>tools. You don't *assume* that your potential customers want XYZ - you 
>>go find out for sure what they want by asking them.
> 
> 
> Quite true. If you were talking about the ideal approach, I even would
> agree with you. But even then: the decision to use a programming
> language has seldom to do with *any* of that.
> 
> 
>>A fair approach would be to have a survey of some sample set of 
>>C/C++/Java users who had some familiarity with Ada
> 
> 
> It might be hard to find enough people so one could claim statistical
> significance. Literally spoken, almost every idiot out there on the
> street claims to have knowledge of C/C++/Java but if you ask them
> about Ada the best response I'd ever get was something like "oh that's
> the language from the eighties?" ... The same guy told me that Jython
> is something similar and I would like it, because it would fit my
> needs for a programming language like Ada. Huh? WTF is he talking
> about?
> 
> 
>>Guesswork is interesting in a newsgroup, but deadly when trying to make 
>>major decisions about a product in a business environment.
> 
> 
> Yes. But reality says, hell a *lot* of (especially software) projects
> just went dead, so there might be a lot of guesswork involved (either
> in the requirements, the schedule, ...).
> 
> 
>>You don't 
>>guess at what is going to make your existing customers happy.
> 
> 
> Well, the customer usually wants a product and doesn't care about the
> tool you used to develop the product with. But the customer will
> probably care about the final price, so you should be able to make a
> good decision to keep this price low. And usually you shouldn't care
> about some initial costs, you should look further and see what's
> better in the long run. Well, statistically I still have some years of
> my life left to actually find a manager who really thinks this way, so
> I just keep my hope. :->
> 
> These days I still wonder why all my deadlines are already scheduled
> for yesterday. Even those for the projects which didn't even start
> yet. ;-)
> 
> 
>>You also don't guess about what would attract new business from 
>>potential customers. You ask them what they'd want in your product and 
>>try to address the highest priorities they set.
> 
> 
> Yes. But I'd assume that the decision which tools you use to be able
> to actually deliver the product to the customer has at least
> *something* to do with management, hasn't it? Well, I think it should.
> Unfortunately, a bunch of managers ouside there seem to have no clue
> of *what* they are managing.
> 
> 
>>To do otherwise will have you bankrupt very quickly.
> 
> 
> Indeed. :->
> 
> 
> Vinzent.


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 16:24                                                   ` Vinzent 'Gadget' Hoefler
@ 2003-11-12 12:01                                                     ` Marin David Condic
  2003-11-12 13:07                                                       ` Vinzent 'Gadget' Hoefler
  0 siblings, 1 reply; 223+ messages in thread
From: Marin David Condic @ 2003-11-12 12:01 UTC (permalink / raw)


Don't get marketing confused with advertising or sales. Marketing is 
supposed to find out what the customer wants and try to design products 
that will fit that need. Advertising and sales can be part of that 
effort, but is an after-the-fact add-on. People often confuse "Sales" 
with "Marketing" and the two are not the same.

Yes, people will *lie* in sales and advertising - or at least attempt to 
mislead. That doesn't make it right, but lets at least give some credit 
to the people who do it well. Marketing, sales, advertising, etc., are 
all essential parts of running an effective business. It takes people 
with special skills and special training to do it - just like software 
designers, they are professionals too. If Ada had a better team and 
bigger budget to do this, it could be a dominant force in the language wars.

MDC

Vinzent 'Gadget' Hoefler wrote:
> 
> And now someone will tell me how proper and real-world marketing
> differs from that. ;)
> 
> 
> Vinzent.


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 19:43                                           ` Russ
@ 2003-11-12 12:35                                             ` Preben Randhol
  0 siblings, 0 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-12 12:35 UTC (permalink / raw)


On 2003-11-11, Russ <18k11tm001@sneakemail.com> wrote:
>
> If you can derive that from what I wrote above (or from anything I've
> ever written on this forum) then it is clear to me that you are
> obsessed with jealosy over the popularity of C. I did not even mention
> C or language safety. You simply pulled that stuff out of your rear
> end.

No, I'm not jealous. I'm scared for the future when more tasks and
informations are online and we are more or less 100% dependent on
computers.

> If you are going to obsess over something, why not make is something
> "normal" like sex? Obsessing over the popularity of C is just strange.

? It is you that are obsessing about all the features from C we should
add to Ada, not me.

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 20:01                                               ` Russ
@ 2003-11-12 12:41                                                 ` Preben Randhol
  2003-11-13  6:27                                                   ` Chad R. Meiners
  0 siblings, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-12 12:41 UTC (permalink / raw)


On 2003-11-11, Russ <18k11tm001@sneakemail.com> wrote:
> And you *still* miss the point, even after Mr. Rosen spoonfeeds it to
> you. The point is *not* that redundant "with" and "use" clauses
> require extra typing. The point is that the poor *reader* of your code
> still has to *read* your cluttered code. 

And this is cluttered how?

> In your reply you did not even consider the *reader*. The *reader*
> doesn't give a hoot how many keystrokes you used to generate the code.
> All I can say is that I'm darn glad I'll never have to read your
> code.

WHAT!? 

Please explain to me how I don't care about the reader? What I was
saying is that you do not need to tell the reader in any additional way
which package that are used and which are not as the source code is
plain and clear. And please explain how you would write.

with Ada.Text_IO; use Ada.Text_IO;

in another way in Ada95.

How do you care about the reader when you are writing code that isn't
Ada95 and has to be run through a preprosessor to become Ada95 code?

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 22:28                                   ` Gautier Write-only
@ 2003-11-12 12:42                                     ` Preben Randhol
  0 siblings, 0 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-12 12:42 UTC (permalink / raw)


On 2003-11-11, Gautier Write-only <gautier@fakeaddress.nil> wrote:
> The writeability problem is small (since you can make a macro) compared
> to the readability and maintanability issue of the current syntax.

How is it a maintainability problem?


-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 22:38                                                   ` Vinzent 'Gadget' Hoefler
@ 2003-11-12 12:46                                                     ` Preben Randhol
  2003-11-13  7:26                                                     ` Russ
  1 sibling, 0 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-12 12:46 UTC (permalink / raw)


On 2003-11-11, Vinzent 'Gadget' Hoefler <ada.rocks@jlfencey.com> wrote:
> Gautier Write-only wrote:
> Small (maybe I now stretch it a little bit far) example:
>
>|   type Count is (Binary, BCD);
>|
>|   for  Count use (Binary => 0, BCD => 1);
>|
>|   for  Count'Size use 1;
>
> could then look something like this:
>
>|type Count is (Binary => 0, BCD => 1) for Size use 1;
>
> Still looks quite pretty at the first glance. But it mixes things up
> that shouldn't be mixed up, IMO.

I must say I agree with you here.

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-12 12:01                                                     ` Marin David Condic
@ 2003-11-12 13:07                                                       ` Vinzent 'Gadget' Hoefler
  2003-11-13 12:12                                                         ` Marin David Condic
  0 siblings, 1 reply; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-12 13:07 UTC (permalink / raw)


Marin David Condic wrote:

>Don't get marketing confused with advertising or sales.

It's not me. ;)

>all essential parts of running an effective business. It takes people 
>with special skills and special training to do it - just like software 
>designers, they are professionals too. If Ada had a better team and 
>bigger budget to do this, it could be a dominant force in the language wars.

Yes. I agree with you here. But that is what scares me a little bit.
Why do you need a bigger budget if you already have the better
product?


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-12 11:55                                                 ` Marin David Condic
@ 2003-11-12 13:10                                                   ` Vinzent 'Gadget' Hoefler
  0 siblings, 0 replies; 223+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2003-11-12 13:10 UTC (permalink / raw)


Marin David Condic wrote:

>It seems you have confused my point about marketing with some point 
>about language selection.

Well, yes. Not really confused, I just got a little way off track.

>On the "Everyone else is doing it" syndrome (which I think can be a good 
>reason, but we can debate that) - don't worry if that is good or bad.

I'm not in the position to change that anyway.
 
>Accept it as *reality* and figure out how to use it. If you had 
>"Everybody else is using Ada for XYZ type of things" working in your 
>favor, that gives you a sales pitch to the manager concerned with XYZ, 
>doesn't it?

Could happen. Let's see. Fortunately I am currently doing some
embedded stuff in Ada. My new boss doesn't like C either and Java
isn't just the right choice for this task. So what's left? :)


Vinzent.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-12 12:41                                                 ` Preben Randhol
@ 2003-11-13  6:27                                                   ` Chad R. Meiners
  2003-11-13  7:32                                                     ` Anders Wirzenius
  0 siblings, 1 reply; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-13  6:27 UTC (permalink / raw)



"Preben Randhol" <randhol+valid_for_reply_from_news@pvv.org> wrote in
message
news:slrnbr4aj9.6f3.randhol+valid_for_reply_from_news@kiuk0156.chembio.ntnu.no...
>> Please explain to me how I don't care about the reader? What I was
> saying is that you do not need to tell the reader in any additional way
> which package that are used and which are not as the source code is
> plain and clear. And please explain how you would write.
>
> with Ada.Text_IO; use Ada.Text_IO;

First note that I am not saying that your way is cluttered, but I prefer

with Ada.Text_IO;
with Ada.Integer_Text_IO;

use  Ada.Text_IO;
use  Ada.Integer_Text_IO;

because I like keeping the two in separate regions of my code and the lines
shorter.  Anyway I prefer that the context clause sticks because it helps
the readers familiarize themselves with the code base.  There is nothing
more annoying than jumping into a project's code and not being able to
figure out the main dependencies.  So in response to Russ's claim that
context clause are ugly lawn junk, I suggest he play around with visual
basic a little bit.  VB modules do not list their dependencies in the source
code so working on other people's code is a major pain.  Java is almost as
bad since import clauses are optional.  C headers are annoying to read due
to all the preprocessor crud embedded in them.  Give me context clauses and
package specifications any day.   They are more like having a well designed
landscape for a yard.

-CRM





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 15:36                                         ` Robert I. Eachus
@ 2003-11-13  6:37                                           ` Chad R. Meiners
  2003-11-13 19:11                                             ` tmoran
  0 siblings, 1 reply; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-13  6:37 UTC (permalink / raw)



"Robert I. Eachus" <rieachus@comcast.net> wrote in message
news:7KWdnct0w8mEnyyiRVn-hA@comcast.com...
> If you want a single number to measure the "goodness" of the design, I
> have been comfortable with (2S + B)/(N * ln(N)) where N is the total
> number of compilation units and subunits, S is the number of with
> clauses on package specs (including generic package specs) and B is the
> number of with clauses on other units.  Some people may disagree with
> including separate subunits in N, but I seldom find designs abusing
> that.  There is a problem though is some compilation units are too
> small, so I get concerned when the average size of compilation units is
> outside the 100 to 1000 NCSLOC (non-comment source lines of code) range.

So if you write one package that pramga imports all of your required
functions and write your entire project in a single procedure that with's
only that package, you get a goodness of 1/2?  ;-) ;-)





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-11 22:38                                                   ` Vinzent 'Gadget' Hoefler
  2003-11-12 12:46                                                     ` Preben Randhol
@ 2003-11-13  7:26                                                     ` Russ
  2003-11-13 19:59                                                       ` Chad R. Meiners
  1 sibling, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-13  7:26 UTC (permalink / raw)


Vinzent 'Gadget' Hoefler <ada.rocks@jlfencey.com> wrote in message news:<borog2$1fpdhl$1@ID-175126.news.uni-berlin.de>...
> Gautier Write-only wrote:
> 
> >Vinzent 'Gadget' Hoefler:
> >
> >> For *sale*. Exactly. BTW, I still don't understand what is redundant
> >> on with and use. I don't use "use" (well, at least not globally).

> >In this case, effectively, you are not likely to see a redundance.
> 
> Hmm. True. Good point. :-)

I say it's redundant because it doesn't make sense to have "use"
without a corresponding "with". Let's say "with" is level 1, and "use"
is level 2. If you're at level 2, that implies you're already past
level 1, so specifying both level 1 and level 2 is redundant. It's
like saying that the Florida Marlins won the World Series, then also
saying that they won the NL Championship. The former implies the
latter and is therefore redundant. It belongs in the Department of
Redundancy Department.

I appreciate your discipline in shunning "use," but I assume the
language provides it for a good reason. For basic I/O and math, for
example, I think "use" is perfectly appropriate. I'm sorry, but "sin"
and "cos" will always be just "sin" and "cos" to me, and I prefer to
see them that way. (I gave an example on this forum a few months ago
of great-circle equations involving no less than 10 math function
calls in a single expression.)

> >In your place I wouldn't worry at all about this proposal.
> 
> Hey, it's still *my* language! Or so. ;)
> 
> Ok, seriously, being able to use "use" without its corresponding with
> in one case and differently in another looks inconsistent for me.

I think the cleanest approach is to let "use" imply "with". What does
that mean? If the compiler sees "use x", but x is not yet "in scope",
let the compiler simply pretend that the line "use x" had been
preceded by "with x".

Now, admittedly, that involves some semantic subtleties because the
"withed" package spec need be identical to the "used" spec (due to the
conventions for child packages). I suspect that any potential
ambiguity is easily resolvable with simple conventions, but I could be
wrong. OK, suppose I am wrong. Then the fallback position is to allow
"with and use x" or "with/use x", as previously suggested. That
removes all semantic ambiguity, and is logically equivalent to
separate "with" and "use" clauses, but without the repetitious
clutter.

> To bring it to the point and the way I see it: "with" is for
> thecompiler/linker to state dependencies, use is for the programmer.
> For me that's two different things and I wouldn't like them to get
> mixed up.

Well yes, but ... "with" tells the compiler which packages will be
used (ironically), and "use" tells the compiler how the elements of a
package will be referred to, so it's for the compiler too.

For those who insist that this whole issue is "minor" or even
"trivial", here's what I have to say to you. You're all idiots and
dumbsh*ts. Relax, I'm just kidding. You are completely right. It *is*
trivial. But as I said before, it's like the clutter in the front yard
of a house for sale: it can do harm to the market value of Ada, and
it's trivial to clean up too. For crying out loud, just do it and be
done with it.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13  6:27                                                   ` Chad R. Meiners
@ 2003-11-13  7:32                                                     ` Anders Wirzenius
  2003-11-13 12:29                                                       ` Marin David Condic
                                                                         ` (2 more replies)
  0 siblings, 3 replies; 223+ messages in thread
From: Anders Wirzenius @ 2003-11-13  7:32 UTC (permalink / raw)



"Chad R. Meiners" <crmeiners@hotmail.com> wrote in message
news:bov88d$217c$1@msunews.cl.msu.edu...
> First note that I am not saying that your way is cluttered, but I
prefer
>
> with Ada.Text_IO;
> with Ada.Integer_Text_IO;
>
> use  Ada.Text_IO;
> use  Ada.Integer_Text_IO;
>
> because I like keeping the two in separate regions of my code and
the lines

What had the "Ada community" (present and potential) lost if the
use_clause had not been allowed in the context_clause (ARM 10.1.2)?
What if the use_clause had to be put in a declarative part?
I often see code which have the "with aaa; use aaa;" in the beginning
of the code and the only place where the aaa is needed is way down in
the code. Shouldn�t a proper place for the use_close be (like Chad
writes), in the (separate) region where it is needed? The with_clause
stays at the beginning of the code to declare the context.

Anders




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-12 13:07                                                       ` Vinzent 'Gadget' Hoefler
@ 2003-11-13 12:12                                                         ` Marin David Condic
  2003-11-13 22:04                                                           ` Wes Groleau
  0 siblings, 1 reply; 223+ messages in thread
From: Marin David Condic @ 2003-11-13 12:12 UTC (permalink / raw)


Ever heard of hiding a lamp under a bushel basket? You can have the 
greatest technology in the world, but if you can't effectively 
*communicate* that to a wide number of people how are they going to know 
about it or be inspired to try it out? Ada has been one public-relations 
disaster after another from its inception. People felt it was being 
rammed down their throats. They had the perception it was slow, buggy 
and way too expensive. They didn't think it addressed their problems and 
that it would not work. We can stand here all day and say "That's not 
true!!!" but effectively, that message did not get sent to the wide 
range of potential users. Marketing, advertising and sales might have 
helped that a lot.

Even more recently, we had a major language revision come out in 1995 - 
pretty close to the time that Sun was starting to hawk Java. Java had 
merits. Sun wanted to make sure the world knew about those merits. 
(Please don't deny that Java had some merits - it *was* an improvement 
over other things and provided capabilities not found with other 
languages - like portable executables across the net and a large 
library.) Sun made sure that there were ads in magazines, radio spots, 
interviews and "Puff Pieces" on various radio shows (I recall hearing 
one on NPR & I think there were probably others). Ada95 had merits - 
like high integrity, portability and object oriented programming. What 
did you hear about it anywhere except within the confines of places 
frequented by the already-converted? Was there any publicity? Any hype? 
Any stories about how wonderful it was getting planted in the press?

So we've got another language revision coming out. The problem is it is 
more of an "incremental" revision - relatively minor enhancements to the 
language rather than anything new and big with respect to capabilities. 
If Ada had some revolutionary new thing to offer, it might have 
something to hype within the media. (Like if it had a library that went 
beyond what people traditionally expect?) If it had something *new* to 
hype that might interest the general media, and it had someone running 
an advertizing campaign, chances are, it could get some interest and 
stories done about it. If it had some vision for the future - rather 
than essentially some "Me Too!!!" kinds of capabilities - it might get 
some good press. If it had a large institutional backer, it might have 
some money to place some ads in journals and get the word out that Ada 
is cool.

People don't conduct scientific studies to find out what is the best 
technology to apply when it comes to tools. They buy the tools based on 
what they have heard about and what seems to address their problems the 
best. That's just human nature. Who goes to the hardware store to buy a 
set of socket wrenches and  conducts a study on the strengths and 
weaknesses of every different brand available at every store? Nobody. 
You find a brand that has a good reputation, is available at a 
reasonable cost and looks like it meets your needs. People buy 
"Craftsman" or "Snap-On" because they are good quality, meet the needs 
and are generally available at a reasonable price. Maybe there's "Fred's 
Hand Tools" out there with *superior* products - but who ever heard of 
them to even know about investigating them?

That's why all that marketing, sales and advertising is really important 
for Ada. Perhaps instead of trying to come up with an all-volunteer, 
freebie library, we should have an all-volunteer, freebie advertising 
blitz? :-)

MDC


Vinzent 'Gadget' Hoefler wrote:
> 
> Yes. I agree with you here. But that is what scares me a little bit.
> Why do you need a bigger budget if you already have the better
> product?
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13  7:32                                                     ` Anders Wirzenius
@ 2003-11-13 12:29                                                       ` Marin David Condic
  2003-11-13 17:51                                                       ` Warren W. Gay VE3WWG
  2003-11-14 12:37                                                       ` Georg Bauhaus
  2 siblings, 0 replies; 223+ messages in thread
From: Marin David Condic @ 2003-11-13 12:29 UTC (permalink / raw)


Assuming for a minute that it was a mistake, there is no way to change 
that now. There is way too much code out there that would be brokent by 
doing that.

I agree that it is good style (in general) to scope the use clause to 
just where it si needed. However, there are occasions when I might want 
something to simply appear as if it were a part of the language and then 
the more global use clause might be acceptable. Its a judgement call and 
we've had that whole debate numerous times. Given that the issue *is* 
debatable, its best to leave the capability there.

MDC

Anders Wirzenius wrote:
> 
> What had the "Ada community" (present and potential) lost if the
> use_clause had not been allowed in the context_clause (ARM 10.1.2)?
> What if the use_clause had to be put in a declarative part?
> I often see code which have the "with aaa; use aaa;" in the beginning
> of the code and the only place where the aaa is needed is way down in
> the code. Shouldn�t a proper place for the use_close be (like Chad
> writes), in the (separate) region where it is needed? The with_clause
> stays at the beginning of the code to declare the context.
> 
> Anders
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13  7:32                                                     ` Anders Wirzenius
  2003-11-13 12:29                                                       ` Marin David Condic
@ 2003-11-13 17:51                                                       ` Warren W. Gay VE3WWG
  2003-11-14  8:32                                                         ` Dmitry A. Kazakov
  2003-11-14  9:05                                                         ` Anders Wirzenius
  2003-11-14 12:37                                                       ` Georg Bauhaus
  2 siblings, 2 replies; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-11-13 17:51 UTC (permalink / raw)


Anders Wirzenius wrote:

> "Chad R. Meiners" <crmeiners@hotmail.com> wrote in message
> news:bov88d$217c$1@msunews.cl.msu.edu...
> 
>>First note that I am not saying that your way is cluttered, but I
> 
> prefer
> 
>>with Ada.Text_IO;
>>with Ada.Integer_Text_IO;
>>
>>use  Ada.Text_IO;
>>use  Ada.Integer_Text_IO;
>>
>>because I like keeping the two in separate regions of my code and
> 
> the lines
> 
> What had the "Ada community" (present and potential) lost if the
> use_clause had not been allowed in the context_clause (ARM 10.1.2)?
> What if the use_clause had to be put in a declarative part?
> I often see code which have the "with aaa; use aaa;" in the beginning
> of the code and the only place where the aaa is needed is way down in
> the code. Shouldn�t a proper place for the use_close be (like Chad
> writes), in the (separate) region where it is needed? The with_clause
> stays at the beginning of the code to declare the context.
> 
> Anders

I agree with this whole-heartedly for anything more than
a simple "hello world" program. This keeps the name
clashes to a minimum, and it prevents unintended
references to functions/procedures in the wrong package.
There may be some exceptions to this, but these should be
kept to a bare minimum, IMHO.
-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13  6:37                                           ` Chad R. Meiners
@ 2003-11-13 19:11                                             ` tmoran
  2003-11-14  4:57                                               ` Robert I. Eachus
  0 siblings, 1 reply; 223+ messages in thread
From: tmoran @ 2003-11-13 19:11 UTC (permalink / raw)


>> have been comfortable with (2S + B)/(N * ln(N)) where N is the total
  Given an N package system, with "goodness" G, and the opportunity to
split one package, A, into two, A1 and A2:  Everyplace that 'with'ed A
now needs to 'with' either A1 or A2 or both.  If the number of bodies that
will need both (ie, experience a net increase in 'with's), plus twice the
number of specs that will need both, is less than G*ln(N), you should do
the split.
  So in a 150 package system with goodness 5, if a package can be split
with no more than 8 specs that will need to 'with' *both* A1 and A2, and
no more than 9 such bodies, doing the split will make the system "better".
  Does a similar metric - limiting the context necessary for some
piece of code - apply to the size of a procedure or its number of
variables, or the number of first-level components of a record, etc?



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13  7:26                                                     ` Russ
@ 2003-11-13 19:59                                                       ` Chad R. Meiners
  2003-11-14  5:09                                                         ` Robert I. Eachus
  2003-11-14  5:45                                                         ` Russ
  0 siblings, 2 replies; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-13 19:59 UTC (permalink / raw)


----- Original Message ----- 
From: "Russ" <18k11tm001@sneakemail.com>
Newsgroups: comp.lang.ada
Sent: Thursday, November 13, 2003 2:26 AM
Subject: Re: Clause "with and use"

> I say it's redundant because it doesn't make sense to have "use"
> without a corresponding "with". Let's say "with" is level 1, and "use"
> is level 2. If you're at level 2, that implies you're already past
> level 1, so specifying both level 1 and level 2 is redundant. It's
> like saying that the Florida Marlins won the World Series, then also
> saying that they won the NL Championship. The former implies the
> latter and is therefore redundant. It belongs in the Department of
> Redundancy Department.

Your analogy is bad.

with Ada.Text_IO;
-- I want to be able to reference Ada.Text_IO in this unit.

use  Ada.Text_IO;
-- I want Ada.Text_IO's components to be placed into the current scoping
block.
(does it make sense to use a withed procedure?)

> I appreciate your discipline in shunning "use," but I assume the
> language provides it for a good reason. For basic I/O and math, for
> example, I think "use" is perfectly appropriate. I'm sorry, but "sin"
> and "cos" will always be just "sin" and "cos" to me, and I prefer to
> see them that way. (I gave an example on this forum a few months ago
> of great-circle equations involving no less than 10 math function
> calls in a single expression.)

Well you can always place the use clauses in the great-circle function then.

>
> I think the cleanest approach is to let "use" imply "with". What does
> that mean? If the compiler sees "use x", but x is not yet "in scope",
> let the compiler simply pretend that the line "use x" had been
> preceded by "with x".

So you would you want a use clause that is nested within a function to imply
a withed package?  In my opinion that is practically as bad as Java allowing
you to reference any class from any point in your class.  Both cases make it
very difficult to find all the referenced packages.

> Now, admittedly, that involves some semantic subtleties because the
> "withed" package spec need be identical to the "used" spec (due to the
> conventions for child packages). I suspect that any potential
> ambiguity is easily resolvable with simple conventions, but I could be
> wrong. OK, suppose I am wrong. Then the fallback position is to allow
> "with and use x" or "with/use x", as previously suggested. That
> removes all semantic ambiguity, and is logically equivalent to
> separate "with" and "use" clauses, but without the repetitious
> clutter.

with's and use's for the most part belong in different regions of the code.
Providing syntax to couple then together would be a determent to anyone
learning the language.

> For those who insist that this whole issue is "minor" or even
> "trivial", here's what I have to say to you. You're all idiots and
> dumbsh*ts. Relax, I'm just kidding.

I wonder how often you call the people you work with idiots and dumbsh*ts to
their face and then say, "Relax, I'm just kidding".  As you might realize,
they won't believe the second part; why should we believe you here.  You
have already shown that the only opinion and information that you value are
those that support your ideas.  Statements like the above just reinforce
everyone's opinion that this is true.

> You are completely right. It *is*
> trivial. But as I said before, it's like the clutter in the front yard
> of a house for sale: it can do harm to the market value of Ada, and
> it's trivial to clean up too. For crying out loud, just do it and be
> done with it.

But it isn't clutter; with and use serve two different purposes so they
shouldn't be combined.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13 12:12                                                         ` Marin David Condic
@ 2003-11-13 22:04                                                           ` Wes Groleau
  2003-11-14  4:16                                                             ` Marin David Condic
  0 siblings, 1 reply; 223+ messages in thread
From: Wes Groleau @ 2003-11-13 22:04 UTC (permalink / raw)


Marin David Condic wrote:
> pretty close to the time that Sun was starting to hawk Java. Java had 
> merits. Sun wanted to make sure the world knew about those merits. 
> (Please don't deny that Java had some merits - it *was* an improvement 
> over other things and provided capabilities not found with other 
> languages - like portable executables across the net and a large 
> library.) Sun made sure that there were ads in magazines, radio spots, 
> interviews and "Puff Pieces" on various radio shows (I recall hearing 
> one on NPR & I think there were probably others). Ada95 had merits - 

Indeed they did.  I couldn't help but notice Sun's
feature checklists comparing Java to several other
languages.  They never mentioned Ada--and I don't
believe it was out of ignorance.  I think they
made a conscious decision to NOT show anyone how
Java compared with Ada.  :-)

-- 
Wes Groleau
   "Grant me the serenity to accept those I cannot change;
    the courage to change the one I can;
    and the wisdom to know it's me."
                                -- unknown




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13 22:04                                                           ` Wes Groleau
@ 2003-11-14  4:16                                                             ` Marin David Condic
  0 siblings, 0 replies; 223+ messages in thread
From: Marin David Condic @ 2003-11-14  4:16 UTC (permalink / raw)


Maybe so. Just notice that a) Java had something new (sort of) to offer 
and b) Sun did a superb job of getting that message out. The lesson to 
learn is that if Ada wanted to try to gain some market dominance that it 
a) needs to have something *new* to offer and b) needs to do a superb 
job of getting that message out. You can't simply rely on it being a 
"superior technology". Build a better mousetrap and you *still* need to 
tell people about it or they'll never beat a path to your door.

MDC

Wes Groleau wrote:
> 
> Indeed they did.  I couldn't help but notice Sun's
> feature checklists comparing Java to several other
> languages.  They never mentioned Ada--and I don't
> believe it was out of ignorance.  I think they
> made a conscious decision to NOT show anyone how
> Java compared with Ada.  :-)
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13 19:11                                             ` tmoran
@ 2003-11-14  4:57                                               ` Robert I. Eachus
  2003-11-14  7:05                                                 ` tmoran
  0 siblings, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-14  4:57 UTC (permalink / raw)


tmoran@acm.org wrote:

> So in a 150 package system with goodness 5, if a package can be split
> with no more than 8 specs that will need to 'with' *both* A1 and A2, and
> no more than 9 such bodies, doing the split will make the system "better".

You forgot the with clauses on package A.  Of course, you could get 
tricky and create a child package for A.  But then again, if there is a 
part of A where spliting part of A into child package increases 
cohesion, why shouldn't the measure recognize that?  In fact if you do a 
good job of restructuring an application using child packages you may be 
able to reduce the goodness measure substantially.  Is that wrong? 
Probably not.  But like all software engineering statistics you can 
probably abuse this one.

 > Does a similar metric - limiting the context necessary for some
 > piece of code - apply to the size of a procedure or its number of
 > variables, or the number of first-level components of a record, etc?

You will have to look at some of the MITRE papers to see measures like 
that.  I did some work on it. Chris Byrnes implemented DIANA Query 
Language (DQL) that allowed some measurements to be done on actual Ada 
code.  This may be a paper on some additional MITRE work on coherence 
and coupling: Dharma, H. 1995, Quantitative Models of Cohesion and 
Coupling in Software, J. Systems Software, Vol. 29, Elsevier Science 
Inc., NY, NY, 65-74.  (The name, time and title look right, but I don't 
have a copy and can't find one on-line.)

The real conclusion I took away from all that was that measuring 
coupling and cohesion at the subprogram level in Ada is wrong.  Or 
rather you might want to measure coupling from subprograms, but the 
target should always be packages.  In other words, a procedure in Ada 
that only references one external package has good cohesion, a procedure 
that references ten packages has poor cohesion.

If type declarations and operations on those types are well organized in 
Ada, this is the level of cohesion and coupling you see.  It seems silly 
to count calls to "*" and "+" in a package separately, and similarly any 
method that favors making a variable visible instead of Get and Set 
operations should be looked on suspiciously...

The measure I wrote about earlier is a "poor man's" way of getting this 
information.  Since you only have to look at the with clauses, it is 
easy to write a program that gives you the "raw" data as well as compute 
a statistic for any library.  Hmmm.  I'd better get back to work...

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13 19:59                                                       ` Chad R. Meiners
@ 2003-11-14  5:09                                                         ` Robert I. Eachus
  2003-11-14  6:47                                                           ` Chad R. Meiners
  2003-11-14  5:45                                                         ` Russ
  1 sibling, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-14  5:09 UTC (permalink / raw)


Chad R. Meiners wrote:

> But it isn't clutter; with and use serve two different purposes so they
> shouldn't be combined.

As I have said before, what has come out of this discussion that is very 
worthwhile is the idea of adding, "use all {package name}" to the 
language.  There are places where having a single use clause instead of 
a series of them would be a big improvement.

It would be nice to allow 'use all' to apply to generic instances.  But 
I think that in practice, a 'use all' that was the equivalent of a use 
clause for all child packages of a package would encourage people to 
make generic instantiations child units where appropriate.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13 19:59                                                       ` Chad R. Meiners
  2003-11-14  5:09                                                         ` Robert I. Eachus
@ 2003-11-14  5:45                                                         ` Russ
  2003-11-14  7:51                                                           ` Chad R. Meiners
                                                                             ` (2 more replies)
  1 sibling, 3 replies; 223+ messages in thread
From: Russ @ 2003-11-14  5:45 UTC (permalink / raw)


"Chad R. Meiners" <crmeiners@hotmail.com> wrote in message news:<bp0nqn$afi$1@msunews.cl.msu.edu>...
> ----- Original Message ----- 
> From: "Russ" <18k11tm001@sneakemail.com>
> Newsgroups: comp.lang.ada
> Sent: Thursday, November 13, 2003 2:26 AM
> Subject: Re: Clause "with and use"

> > I appreciate your discipline in shunning "use," but I assume the
> > language provides it for a good reason. For basic I/O and math, for
> > example, I think "use" is perfectly appropriate. I'm sorry, but "sin"
> > and "cos" will always be just "sin" and "cos" to me, and I prefer to
> > see them that way. (I gave an example on this forum a few months ago
> > of great-circle equations involving no less than 10 math function
> > calls in a single expression.)
> 
> Well you can always place the use clauses in the great-circle function then.

Yes, but I don't want to repeat it in every function or procedure that
needs it. And there is no good reason to limit Ada.Text_IO to
individual functions and procedures. As far as I'm concerned, that's
obsessive/compulsive.

> > I think the cleanest approach is to let "use" imply "with". What does
> > that mean? If the compiler sees "use x", but x is not yet "in scope",
> > let the compiler simply pretend that the line "use x" had been
> > preceded by "with x".
> 
> So you would you want a use clause that is nested within a function to imply
> a withed package?

No, absolutely not. The implied "with" would apply only to "use"
clauses in the context section at the top of the file. You need
something at the top of the file to let the reader (and the compiler)
know what external packages will be used.

> In my opinion that is practically as bad as Java allowing
> you to reference any class from any point in your class.  Both cases make it
> very difficult to find all the referenced packages.

I agree.

> > Now, admittedly, that involves some semantic subtleties because the
> > "withed" package spec need be identical to the "used" spec (due to the
> > conventions for child packages). I suspect that any potential
> > ambiguity is easily resolvable with simple conventions, but I could be
> > wrong. OK, suppose I am wrong. Then the fallback position is to allow
> > "with and use x" or "with/use x", as previously suggested. That
> > removes all semantic ambiguity, and is logically equivalent to
> > separate "with" and "use" clauses, but without the repetitious
> > clutter.

> > For those who insist that this whole issue is "minor" or even
> > "trivial", here's what I have to say to you. You're all idiots and
> > dumbsh*ts. Relax, I'm just kidding.
> 
> I wonder how often you call the people you work with idiots and dumbsh*ts to
> their face and then say, "Relax, I'm just kidding".  As you might realize,

No, I don't. But then again, I didn't say *anything* to anyone's
"face" here, did I. Not to mention the fact that nobody here has the
power to terminate my employment. By the way, have you been keeping
track of what *I* have been called here? I get a lot more respect at
work than I get here.

> they won't believe the second part; why should we believe you here.  You
> have already shown that the only opinion and information that you value are
> those that support your ideas.  Statements like the above just reinforce
> everyone's opinion that this is true.

Lighten up, dude. It was a little joke based on some recent posts on
this thread and others.

> > You are completely right. It *is*
> > trivial. But as I said before, it's like the clutter in the front yard
> > of a house for sale: it can do harm to the market value of Ada, and
> > it's trivial to clean up too. For crying out loud, just do it and be
> > done with it.
> 
> But it isn't clutter; with and use serve two different purposes so they
> shouldn't be combined.

So what that they serve two different purposes? Ever heard of "killing
two birds with one stone"?

Repeating the same package name twice at the top of a file is clutter.
Even if the proposal is adopted, you would still be fully able to use
"use" in the way you consider appropriate and/or correct. Nobody is
trying to take anything away from anyone here.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  5:09                                                         ` Robert I. Eachus
@ 2003-11-14  6:47                                                           ` Chad R. Meiners
  0 siblings, 0 replies; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-14  6:47 UTC (permalink / raw)



"Robert I. Eachus" <rieachus@comcast.net> wrote in message
news:75qdnZeRyrHs_imiRVn-sQ@comcast.com...
> Chad R. Meiners wrote:
>
> > But it isn't clutter; with and use serve two different purposes so they
> > shouldn't be combined.
>
> As I have said before, what has come out of this discussion that is very
> worthwhile is the idea of adding, "use all {package name}" to the
> language.  There are places where having a single use clause instead of
> a series of them would be a big improvement.

I agree. I just don't want to see use's implying with's





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  4:57                                               ` Robert I. Eachus
@ 2003-11-14  7:05                                                 ` tmoran
  2003-11-14 15:06                                                   ` Robert I. Eachus
  0 siblings, 1 reply; 223+ messages in thread
From: tmoran @ 2003-11-14  7:05 UTC (permalink / raw)


>> So in a 150 package system with goodness 5, if a package can be split
>> with no more than 8 specs that will need to 'with' *both* A1 and A2, and
>> no more than 9 such bodies, doing the split will make the system "better".
>
>You forgot the with clauses on package A.
  Huh?  The old system had a package A, but package A has been eliminated
from the new system.  Instead there are two new packages A1 and A2.  Some
places that used to say "with A;" now say "with A1;" or "with A2;", so
their total number of "with"s is unchanged.  But some that used to say
"with A;" now have to have "with A1, A2;" so the number of "with"s (the
numerator) has increased.  OTOH, the number of packages (the denominator)
has increased also.  In the 150 package example, N*ln(N) was 751.65,
Goodness was 5, so 2*S+B = 3758.  After splitting A, we have 2*S+B =
3758+2*8+9= 3783 and 151*ln(151)= 757.57 so the new Goodness is 4.994, an
improvement.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  5:45                                                         ` Russ
@ 2003-11-14  7:51                                                           ` Chad R. Meiners
  2003-11-14  7:51                                                           ` Chad R. Meiners
  2003-11-14  7:51                                                           ` Chad R. Meiners
  2 siblings, 0 replies; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-14  7:51 UTC (permalink / raw)


"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311132145.58a4541e@posting.google.com...
> Yes, but I don't want to repeat it in every function or procedure that
> needs it. And there is no good reason to limit Ada.Text_IO to
> individual functions and procedures.

Sure there is.  In most cases it improves code readability by reminding the
reader about which packages are being used.

> As far as I'm concerned, that's obsessive/compulsive.

It is not obsessive/compulsive; it is putting the information where it
should be as opposed to doing what is convenient.  I have always found
comments about obsessive/compulsiveness interesting as that are almost
always use as an insult towards people that display an usual amount of
discipline in an activity.  My "favorite situation" is when people make
obsessive/compulsive comments about safety procedures (He/she is
obsessive/compulsive about wearing safety goggles when working with that
wood lathe).  Strangle enough, your comment sort of falls into that
category.  Code readability is a safety issue.

> > > I think the cleanest approach is to let "use" imply "with". What does
> > > that mean? If the compiler sees "use x", but x is not yet "in scope",
> > > let the compiler simply pretend that the line "use x" had been
> > > preceded by "with x".
> >
> > So you would you want a use clause that is nested within a function to
imply
> > a withed package?
>
> No, absolutely not. The implied "with" would apply only to "use"
> clauses in the context section at the top of the file. You need
> something at the top of the file to let the reader (and the compiler)
> know what external packages will be used.

Which would imply that use clauses would have very different semantics based
upon the scope in which they are placed.  That would really help people
misunderstand the language's semantics.

> > I wonder how often you call the people you work with idiots and
dumbsh*ts to
> > their face and then say, "Relax, I'm just kidding".  As you might
realize,
>
> No, I don't. But then again, I didn't say *anything* to anyone's
> "face" here, did I. Not to mention the fact that nobody here has the
> power to terminate my employment. By the way, have you been keeping
> track of what *I* have been called here? I get a lot more respect at
> work than I get here.

I see.  Perhaps you get a lot more respect because you are being civil.

> > they won't believe the second part; why should we believe you here.  You
> > have already shown that the only opinion and information that you value
are
> > those that support your ideas.  Statements like the above just reinforce
> > everyone's opinion that this is true.
>
> Lighten up, dude. It was a little joke based on some recent posts on
> this thread and others.

When you speak in public, you are expected to remain civil.   To do
otherwise is simply a negative statement about your character, but I will
let you worry about your public image.

> > But it isn't clutter; with and use serve two different purposes so they
> > shouldn't be combined.
>
> So what that they serve two different purposes? Ever heard of "killing
> two birds with one stone"?

Yes, I have.  I also know that this statement applies to exceptional cases.
You are misusing the phrase as a virtue.

> Repeating the same package name twice at the top of a file is clutter.

This rule is nonsense.  I have seen plenty of exceptions to this rule. Do
you have enough experience with Ada code to be able to support your rule?

> Even if the proposal is adopted, you would still be fully able to use
> "use" in the way you consider appropriate and/or correct. Nobody is
> trying to take anything away from anyone here.

They would be taking away the orthogonality of the two statements.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  5:45                                                         ` Russ
  2003-11-14  7:51                                                           ` Chad R. Meiners
@ 2003-11-14  7:51                                                           ` Chad R. Meiners
  2003-11-14  7:51                                                           ` Chad R. Meiners
  2 siblings, 0 replies; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-14  7:51 UTC (permalink / raw)


"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311132145.58a4541e@posting.google.com...
> Yes, but I don't want to repeat it in every function or procedure that
> needs it. And there is no good reason to limit Ada.Text_IO to
> individual functions and procedures.

Sure there is.  In most cases it improves code readability by reminding the
reader about which packages are being used.

> As far as I'm concerned, that's obsessive/compulsive.

It is not obsessive/compulsive; it is putting the information where it
should be as opposed to doing what is convenient.  I have always found
comments about obsessive/compulsiveness interesting as that are almost
always use as an insult towards people that display an usual amount of
discipline in an activity.  My "favorite situation" is when people make
obsessive/compulsive comments about safety procedures (He/she is
obsessive/compulsive about wearing safety goggles when working with that
wood lathe).  Strangle enough, your comment sort of falls into that
category.  Code readability is a safety issue.

> > > I think the cleanest approach is to let "use" imply "with". What does
> > > that mean? If the compiler sees "use x", but x is not yet "in scope",
> > > let the compiler simply pretend that the line "use x" had been
> > > preceded by "with x".
> >
> > So you would you want a use clause that is nested within a function to
imply
> > a withed package?
>
> No, absolutely not. The implied "with" would apply only to "use"
> clauses in the context section at the top of the file. You need
> something at the top of the file to let the reader (and the compiler)
> know what external packages will be used.

Which would imply that use clauses would have very different semantics based
upon the scope in which they are placed.  That would really help people
misunderstand the language's semantics.

> > I wonder how often you call the people you work with idiots and
dumbsh*ts to
> > their face and then say, "Relax, I'm just kidding".  As you might
realize,
>
> No, I don't. But then again, I didn't say *anything* to anyone's
> "face" here, did I. Not to mention the fact that nobody here has the
> power to terminate my employment. By the way, have you been keeping
> track of what *I* have been called here? I get a lot more respect at
> work than I get here.

I see.  Perhaps you get a lot more respect because you are being civil.

> > they won't believe the second part; why should we believe you here.  You
> > have already shown that the only opinion and information that you value
are
> > those that support your ideas.  Statements like the above just reinforce
> > everyone's opinion that this is true.
>
> Lighten up, dude. It was a little joke based on some recent posts on
> this thread and others.

When you speak in public, you are expected to remain civil.   To do
otherwise is simply a negative statement about your character, but I will
let you worry about your public image.

> > But it isn't clutter; with and use serve two different purposes so they
> > shouldn't be combined.
>
> So what that they serve two different purposes? Ever heard of "killing
> two birds with one stone"?

Yes, I have.  I also know that this statement applies to exceptional cases.
You are misusing the phrase as a virtue.

> Repeating the same package name twice at the top of a file is clutter.

This rule is nonsense.  I have seen plenty of exceptions to this rule. Do
you have enough experience with Ada code to be able to support your rule?

> Even if the proposal is adopted, you would still be fully able to use
> "use" in the way you consider appropriate and/or correct. Nobody is
> trying to take anything away from anyone here.

They would be taking away the orthogonality of the two statements.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  5:45                                                         ` Russ
  2003-11-14  7:51                                                           ` Chad R. Meiners
  2003-11-14  7:51                                                           ` Chad R. Meiners
@ 2003-11-14  7:51                                                           ` Chad R. Meiners
  2003-11-14 23:23                                                             ` Russ
  2003-11-15 16:40                                                             ` Gautier Write-only
  2 siblings, 2 replies; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-14  7:51 UTC (permalink / raw)


"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311132145.58a4541e@posting.google.com...
> Yes, but I don't want to repeat it in every function or procedure that
> needs it. And there is no good reason to limit Ada.Text_IO to
> individual functions and procedures.

Sure there is.  In most cases it improves code readability by reminding the
reader about which packages are being used.

> As far as I'm concerned, that's obsessive/compulsive.

It is not obsessive/compulsive; it is putting the information where it
should be as opposed to doing what is convenient.  I have always found
comments about obsessive/compulsiveness interesting as that are almost
always use as an insult towards people that display an usual amount of
discipline in an activity.  My "favorite situation" is when people make
obsessive/compulsive comments about safety procedures (He/she is
obsessive/compulsive about wearing safety goggles when working with that
wood lathe).  Strangle enough, your comment sort of falls into that
category.  Code readability is a safety issue.

> > > I think the cleanest approach is to let "use" imply "with". What does
> > > that mean? If the compiler sees "use x", but x is not yet "in scope",
> > > let the compiler simply pretend that the line "use x" had been
> > > preceded by "with x".
> >
> > So you would you want a use clause that is nested within a function to
imply
> > a withed package?
>
> No, absolutely not. The implied "with" would apply only to "use"
> clauses in the context section at the top of the file. You need
> something at the top of the file to let the reader (and the compiler)
> know what external packages will be used.

Which would imply that use clauses would have very different semantics based
upon the scope in which they are placed.  That would really help people
misunderstand the language's semantics.

> > I wonder how often you call the people you work with idiots and
dumbsh*ts to
> > their face and then say, "Relax, I'm just kidding".  As you might
realize,
>
> No, I don't. But then again, I didn't say *anything* to anyone's
> "face" here, did I. Not to mention the fact that nobody here has the
> power to terminate my employment. By the way, have you been keeping
> track of what *I* have been called here? I get a lot more respect at
> work than I get here.

I see.  Perhaps you get a lot more respect because you are being civil.

> > they won't believe the second part; why should we believe you here.  You
> > have already shown that the only opinion and information that you value
are
> > those that support your ideas.  Statements like the above just reinforce
> > everyone's opinion that this is true.
>
> Lighten up, dude. It was a little joke based on some recent posts on
> this thread and others.

When you speak in public, you are expected to remain civil.   To do
otherwise is simply a negative statement about your character, but I will
let you worry about your public image.

> > But it isn't clutter; with and use serve two different purposes so they
> > shouldn't be combined.
>
> So what that they serve two different purposes? Ever heard of "killing
> two birds with one stone"?

Yes, I have.  I also know that this statement applies to exceptional cases.
You are misusing the phrase as a virtue.

> Repeating the same package name twice at the top of a file is clutter.

This rule is nonsense.  I have seen plenty of exceptions to this rule. Do
you have enough experience with Ada code to be able to support your rule?

> Even if the proposal is adopted, you would still be fully able to use
> "use" in the way you consider appropriate and/or correct. Nobody is
> trying to take anything away from anyone here.

They would be taking away the orthogonality of the two statements.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13 17:51                                                       ` Warren W. Gay VE3WWG
@ 2003-11-14  8:32                                                         ` Dmitry A. Kazakov
  2003-11-14 14:51                                                           ` Warren W. Gay VE3WWG
  2003-11-14 20:44                                                           ` Robert I. Eachus
  2003-11-14  9:05                                                         ` Anders Wirzenius
  1 sibling, 2 replies; 223+ messages in thread
From: Dmitry A. Kazakov @ 2003-11-14  8:32 UTC (permalink / raw)


On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG"
<ve3wwg@cogeco.ca> wrote:

>I agree with this whole-heartedly for anything more than
>a simple "hello world" program. This keeps the name
>clashes to a minimum, and it prevents unintended
>references to functions/procedures in the wrong package.
>There may be some exceptions to this, but these should be
>kept to a bare minimum, IMHO.

Does anybody a statistics of name clashes in Ada?

What percent is caused by the language design problems:

A. "renames" actually does not rename, but creates a new, possibly
conflicting view. A naive user would expect no conflict there.

B. "subtype" used as a substitute for non-existing type renaming
causes conflicts when "use"-d.

I have a feeling that hatred towards "use" is largely caused by
outside reasons like A. and B.

--
Regards,
Dmitry Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13 17:51                                                       ` Warren W. Gay VE3WWG
  2003-11-14  8:32                                                         ` Dmitry A. Kazakov
@ 2003-11-14  9:05                                                         ` Anders Wirzenius
  1 sibling, 0 replies; 223+ messages in thread
From: Anders Wirzenius @ 2003-11-14  9:05 UTC (permalink / raw)



"Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> wrote in message
news:mwPsb.8015$fB3.463973@news20.bellglobal.com...
> Anders Wirzenius wrote:
>
> > What had the "Ada community" (present and potential) lost if the
> > use_clause had not been allowed in the context_clause (ARM
10.1.2)?
> > What if the use_clause had to be put in a declarative part?
> > I often see code which have the "with aaa; use aaa;" in the
beginning
> > of the code and the only place where the aaa is needed is way down
in
> > the code. Shouldn�t a proper place for the use_close be (like Chad
> > writes), in the (separate) region where it is needed? The
with_clause
> > stays at the beginning of the code to declare the context.
> >
> > Anders
>
> I agree with this whole-heartedly for anything more than
> a simple "hello world" program. This keeps the name

Examples in text books are most often short programs like "hello
world". The majority of those seems to have a "with aaa; use aaa;" at
the beginning. The examples in text books have a heavy influence on
the readers coding habits. I would prefer the examples to have the use
clause down in the code, even if it looks like crossing the river to
get some water.

Anders




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-13  7:32                                                     ` Anders Wirzenius
  2003-11-13 12:29                                                       ` Marin David Condic
  2003-11-13 17:51                                                       ` Warren W. Gay VE3WWG
@ 2003-11-14 12:37                                                       ` Georg Bauhaus
  2003-11-14 15:18                                                         ` Robert I. Eachus
  2 siblings, 1 reply; 223+ messages in thread
From: Georg Bauhaus @ 2003-11-14 12:37 UTC (permalink / raw)


Anders Wirzenius <anders.wirzenius@pp.qnet.fi> wrote:
: I often see code which have the "with aaa; use aaa;" in the beginning
: of the code and the only place where the aaa is needed is way down in
: the code. Shouldn?t a proper place for the use_close be (like Chad
: writes), in the (separate) region where it is needed? The with_clause
: stays at the beginning of the code to declare the context.

I'm wondering whether a "use" deep down might indicate that this
piece of code doesn't really belong in this unit?
(I like this feature, but do I like something here that I shouldn't?)


-- Georg



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  8:32                                                         ` Dmitry A. Kazakov
@ 2003-11-14 14:51                                                           ` Warren W. Gay VE3WWG
  2003-11-17  9:22                                                             ` Dmitry A. Kazakov
  2003-11-14 20:44                                                           ` Robert I. Eachus
  1 sibling, 1 reply; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-11-14 14:51 UTC (permalink / raw)


Dmitry A. Kazakov wrote:
> On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG"
> <ve3wwg@cogeco.ca> wrote:
> 
>>I agree with this whole-heartedly for anything more than
>>a simple "hello world" program. This keeps the name
>>clashes to a minimum, and it prevents unintended
>>references to functions/procedures in the wrong package.
>>There may be some exceptions to this, but these should be
>>kept to a bare minimum, IMHO.
> 
> Does anybody a statistics of name clashes in Ada?

I don't have statistics to offer, but here is one that
I regularly run into (and there are others like this
one):

USE ADA.STRINGS;

If this is done in the wrong place (like at the top), then
then the names Left and Right come into conflict (ie.
Ada.Strings.Left). Left and Right are perfectly acceptable
names to use in programming.

 >What percent is caused by the language design problems:
...
 >I have a feeling that hatred towards "use" is largely caused by
 >outside reasons like A. and B.

I think we have to remember that USE is primarily a language
construct for convenience. It is strictly unnecessary for
writing a program successfully. It only saves the program
writer (and reader) from having to specify (or read) the entire
hierarchical name.

Misuse that convenience, and you'll experience problems.
Conclusion: there is nothing wrong with the language
feature, but only the application thereof. ;-)

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  7:05                                                 ` tmoran
@ 2003-11-14 15:06                                                   ` Robert I. Eachus
  2003-11-14 15:15                                                     ` Robert Spooner
  0 siblings, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-14 15:06 UTC (permalink / raw)




tmoran@acm.org wrote:

>>You forgot the with clauses on package A.
> 
>   Huh?  The old system had a package A, but package A has been eliminated
> from the new system.  Instead there are two new packages A1 and A2.  Some
> places that used to say "with A;" now say "with A1;" or "with A2;", so
> their total number of "with"s is unchanged.  But some that used to say
> "with A;" now have to have "with A1, A2;" so the number of "with"s (the
> numerator) has increased.  OTOH, the number of packages (the denominator)
> has increased also.  In the 150 package example, N*ln(N) was 751.65,
> Goodness was 5, so 2*S+B = 3758.  After splitting A, we have 2*S+B =
> 3758+2*8+9= 3783 and 151*ln(151)= 757.57 so the new Goodness is 4.994, an
> improvement.

If there were NO with clauses on A, you would be right.  But say the 
spec of A withs B, C, D, and E, and the body has withs for F, G, H, and 
I.  If A1 and A2, need the same withs, you add four more with clauses on 
specs, four more on bodies and the goodness number increases (actual 
goodness decreases).  If A1 spec needs only with B and C, A1 body needs 
F and G and A2 spec needs only with D and E while A2 body needs withs 
for H and I, then your goodness has improved, and it should.  A1 and A2 
should have been separate packages in the first place.

In reality, there are very few cases that are that clear.  Incidently a 
tool that finds withs on the spec that could be moved to the body, or 
withs that are not needed at all is very useful.  But in practice on 
good code, you end up moving only a few withs, and eliminating maybe one.
-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14 15:06                                                   ` Robert I. Eachus
@ 2003-11-14 15:15                                                     ` Robert Spooner
  2003-11-14 15:54                                                       ` Robert I. Eachus
  0 siblings, 1 reply; 223+ messages in thread
From: Robert Spooner @ 2003-11-14 15:15 UTC (permalink / raw)


Robert,

Perhaps you should call it an entropy number rather than a goodness 
number. :)

Robert I. Eachus wrote:
> 
> 
> ...  If A1 and A2, need the same withs, you add four more with clauses on 
> specs, four more on bodies and the goodness number increases (actual 
> goodness decreases).
-- 
                             Robert L. Spooner
                      Registered Professional Engineer
                        Associate Research Engineer
                   Intelligent Control Systems Department

          Applied Research Laboratory        Phone: (814) 863-4120
          The Pennsylvania State University  FAX:   (814) 863-7841
          P. O. Box 30
          State College, PA 16804-0030       rls19@psu.edu




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14 12:37                                                       ` Georg Bauhaus
@ 2003-11-14 15:18                                                         ` Robert I. Eachus
  2003-11-15 13:04                                                           ` Marin David Condic
  0 siblings, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-14 15:18 UTC (permalink / raw)


Georg Bauhaus wrote:

> I'm wondering whether a "use" deep down might indicate that this
> piece of code doesn't really belong in this unit?
> (I like this feature, but do I like something here that I shouldn't?)

It can, but it doesn't always.  A good example is a group of ADTs that 
have display operations.   The display operations belong in the package 
with the other operations on the same type, but they may be the only 
operation that needs to use Text_IO or some graphics packages.

You can organize things using child packages to segregate the I/O 
operations, but you end up with the display operation being the only one 
to use the child package.

Instead I usually end up with a generic package that handles the display 
operations in a data independent manner, and the individual display 
operations instantiate that package.  Now the use clause is for a local 
generic instance, but it is still there.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14 15:15                                                     ` Robert Spooner
@ 2003-11-14 15:54                                                       ` Robert I. Eachus
  0 siblings, 0 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-14 15:54 UTC (permalink / raw)


Robert Spooner wrote:

> Perhaps you should call it an entropy number rather than a goodness 
> number. :)

Actually my name for it is a coupling measure.  The higher the number, 
the more tightly coupled a system is.  In Ada high coupling for systems 
is bad, but high coupling within a subsystem can be good if it results 
in low coupling elsewhere.

Also that is why I refer to it as a measure of design quality rather 
than code quality.  It is possible to do a bad job of implementing a 
design, and it is also possible in Ada for code to have lots of 
unnecessary with clauses.  But the reality does seem to be that for 
decent code the coupling measure is determined by the design, not how 
well or poorly the code itself is written.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  8:32                                                         ` Dmitry A. Kazakov
  2003-11-14 14:51                                                           ` Warren W. Gay VE3WWG
@ 2003-11-14 20:44                                                           ` Robert I. Eachus
  1 sibling, 0 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-14 20:44 UTC (permalink / raw)


Dmitry A. Kazakov wrote:

> Does anybody a statistics of name clashes in Ada?

Let me tell you a funny story about that.  Right after Ada became an 
ANSI standard in 1983, I was talking to Dan Eilers and Jean Ichbiah in 
the Irvine Compiler suite at a SIGAda meeting in San Diego.  Jean had 
asked what I thought of the new standard--I had a copy with me, and this 
was fairly early days, February 1983.

I said that there was one change from the Printer's Proof edition that 
troubled me.  Name and System_Name in System had been reversed, making 
Name the type and System_Name a constant.  I said I had considered a 
recommendation that Name become a function instead of a constant, so it 
could be overloaded, but that this was much worse.

"Why?" Ichbiah asked.

"Well, Name is going to occur often as a function name, in fact there is 
a function Name in Text_IO.  This creates a surprising "Gotcha!" that 
there was no real need for."

"Never happen in a million years," Ichbiah replied.  "That would require 
a program to have use clauses for both Text_IO and System, and then try 
to get the name of a file."

A few minutes later Robert Dewar came over and interrupted.  "Dan, I 
think I found a bug in your compiler.  I wrote a little test program, 
and it won't let me call Name in Text_IO.  Says it isn't visible."

"Do you have a use clause for Text_IO?" I asked.

"Of course," said Robert Dewar looking puzzled.

"And a use clause for System?"

"As a matter of fact, yes," Robert said, and then looked on in 
astonishment and Dan and I burst out laughing.

I had to explain that the joke wasn't on him, but on Jean Ichbiah, and 
that little glitch was in the language for good.  (In case you are 
wondering, it is still in the language twenty years later.)  Has it 
bitten anyone else in the twenty years since?  Probably.  This is just 
one reason why the ARG is careful to fully examine ALL the consequences 
of a langauge change.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  7:51                                                           ` Chad R. Meiners
@ 2003-11-14 23:23                                                             ` Russ
  2003-11-15  4:39                                                               ` Chad R. Meiners
  2003-11-15 15:19                                                               ` Robert I. Eachus
  2003-11-15 16:40                                                             ` Gautier Write-only
  1 sibling, 2 replies; 223+ messages in thread
From: Russ @ 2003-11-14 23:23 UTC (permalink / raw)


"Chad R. Meiners" <crmeiners@hotmail.com> wrote in message news:<bp22op$1ltd$1@msunews.cl.msu.edu>...
> "Russ" <18k11tm001@sneakemail.com> wrote in message
> news:bebbba07.0311132145.58a4541e@posting.google.com...
> > Yes, but I don't want to repeat it in every function or procedure that
> > needs it. And there is no good reason to limit Ada.Text_IO to
> > individual functions and procedures.
> 
> Sure there is.  In most cases it improves code readability by reminding the
> reader about which packages are being used.
> 
> > As far as I'm concerned, that's obsessive/compulsive.
> 
> It is not obsessive/compulsive; it is putting the information where it
> should be as opposed to doing what is convenient.  I have always found
> comments about obsessive/compulsiveness interesting as that are almost
> always use as an insult towards people that display an usual amount of
> discipline in an activity.  My "favorite situation" is when people make
> obsessive/compulsive comments about safety procedures (He/she is
> obsessive/compulsive about wearing safety goggles when working with that
> wood lathe).  Strangle enough, your comment sort of falls into that
> category.  Code readability is a safety issue.

Yes, but if you wear safety goggles when you watch TV (because you
never know when your TV tube might explode), that is
obsessive/compulsive. I can make up irrelevant examples as well as you
can. By the way, mild obsessive/compulsive disorder is very common and
is not necessarily a major character flaw. I suffer from a bit of it
myself.

> > > > I think the cleanest approach is to let "use" imply "with". What does
> > > > that mean? If the compiler sees "use x", but x is not yet "in scope",
> > > > let the compiler simply pretend that the line "use x" had been
> > > > preceded by "with x".
> > >
> > > So you would you want a use clause that is nested within a function to
>  imply
> > > a withed package?
> >
> > No, absolutely not. The implied "with" would apply only to "use"
> > clauses in the context section at the top of the file. You need
> > something at the top of the file to let the reader (and the compiler)
> > know what external packages will be used.
> 
> Which would imply that use clauses would have very different semantics based
> upon the scope in which they are placed.  That would really help people
> misunderstand the language's semantics.

Nonsense. In Python, I can write "import math", which is equivalent to
Ada's "with", or I can write "from math import *", which is equivalent
to "use". And if I use the latter, I don't need to precede it by the
former. Yet nobody misunderstands anything.

This whole line about "with" and "use" having different meanings is
completely irrelevant. I don't care if "with" sends a mouse to the
moon and "use" massages my feet. The simple fact is that "use" implies
"with," whether you like it or not. Just try to use "use" without
"with", and the compiler will tell you so. If I say, "use a hammer,"
do I need to precede it with, "obtain a hammer"? Of course not. You
cannot possibly "use" a hammer if one is not available.

You are confusing two different issues here. One issue is what *you*
consider good programming practice, and the other issue is what the
language allows or should allow. *You* don't think that "use" should
ever be used in the context section at the top of a file. Sorry, Ada
allows it, and many excellent programmers consider it perfectly
acceptable in many cases.

But since you don't like that particular feature, you want to keep it
as inconvenient as possible to use. Well, isn't that just a bit
self-centered? I and others would like to be able to use this
officially blessed language feature, but we don't want to have to jump
through unnecessary hoops to use it.

Neglecting to floss your teeth is bad practice. Maybe hotels should
not let you check in unless you show them that you are carrying dental
floss. What harm could it do? I'll tell you what harm it could do. It
could drive away clients, even ones who carry dental floss, because
people don't like to be micro-managed.

<cut>

> When you speak in public, you are expected to remain civil.   To do
> otherwise is simply a negative statement about your character, but I will
> let you worry about your public image.

Where were you when I was called an "idiot" and a "dumbass" without
provocation, right here on this forum? I could have used your wisdom
then.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14 23:23                                                             ` Russ
@ 2003-11-15  4:39                                                               ` Chad R. Meiners
  2003-11-15 11:35                                                                 ` Stephane Richard
  2003-11-15 22:12                                                                 ` Russ
  2003-11-15 15:19                                                               ` Robert I. Eachus
  1 sibling, 2 replies; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-15  4:39 UTC (permalink / raw)


"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311141523.3c523f8c@posting.google.com...
> Yes, but if you wear safety goggles when you watch TV (because you
> never know when your TV tube might explode), that is
> obsessive/compulsive. I can make up irrelevant examples as well as you
> can.

It wasn't an irrelevant example.  I was demonstrating the type of practice
that these people considered obsessive/compulsive.

> > Which would imply that use clauses would have very different semantics
based
> > upon the scope in which they are placed.  That would really help people
> > misunderstand the language's semantics.
>
> Nonsense. In Python, I can write "import math", which is equivalent to
> Ada's "with", or I can write "from math import *", which is equivalent
> to "use". And if I use the latter, I don't need to precede it by the
> former. Yet nobody misunderstands anything.

But use clauses can appear in declaration sections too.  That is the
inconsistency.

> This whole line about "with" and "use" having different meanings is
> completely irrelevant. I don't care if "with" sends a mouse to the
> moon and "use" massages my feet. The simple fact is that "use" implies
> "with," whether you like it or not. Just try to use " without
> "with", and the compiler will tell you so. If I say, "use a hammer,"
> do I need to precede it with, "obtain a hammer"? Of course not. You
> cannot possibly "use" a hammer if one is not available.

If the use clauses couldn't be used in declaration section, I wouldn't
object to having use clauses imply with clauses.
As is, doing so will add an inconsistency to the language.

> You are confusing two different issues here. One issue is what *you*
> consider good programming practice, and the other issue is what the
> language allows or should allow. *You* don't think that "use" should
> ever be used in the context section at the top of a file. Sorry, Ada
> allows it, and many excellent programmers consider it perfectly
> acceptable in many cases.

Ha! You don't know my opinion on use clauses in context sections.  I never
said that people should not put them in the context section of a unit.   I
said that if people use them in their appropriate(using rational judgment)
place (which can be at the top of the file).

Nice use of begging the question!

> But since you don't like that particular feature, you want to keep it
> as inconvenient as possible to use. Well, isn't that just a bit
> self-centered? I and others would like to be able to use this
> officially blessed language feature, but we don't want to have to jump
> through unnecessary hoops to use it.

Ah, here comes the unwarranted character assassination that follows the
begging of the question ;)

> Neglecting to floss your teeth is bad practice. Maybe hotels should
> not let you check in unless you show them that you are carrying dental
> floss. What harm could it do? I'll tell you what harm it could do. It
> could drive away clients, even ones who carry dental floss, because
> people don't like to be micro-managed.
>

Come on.  I was trying to have a rational argument with you; however, I see
that this is unlikely.

All I am saying is that allowing use clauses in context clause to imply with
clauses creates an inconsistency in the language.   The designers of Ada did
a very good job of keeping inconsistencies out of the language, which I one
of the characteristics I enjoy about Ada.  In my opinion reducing of a
potential clutter idea(of which I am still not convinced is a clutter
issue), is not worth introducing an inconsistency to the language.

>
> > When you speak in public, you are expected to remain civil.   To do
> > otherwise is simply a negative statement about your character, but I
will
> > let you worry about your public image.
>
> Where were you when I was called an "idiot" and a "dumbass" without
> provocation, right here on this forum? I could have used your wisdom
> then.

I was elsewhere.  Of course my statement applies to those who might have
been uncivil to you.  However, I would note that when I browse through this
newsgroup , your lack of civility sticks out like a sore thumb.

Let's look at the facts (as written in the newsgroups):

You proclaimed that you do not program as a profession.
You proclaimed that you have not written a serious project in Ada.

Yet you proclaim that you know best for a language in which you have not
spent a serious effort to understand and appreciate.  I asked you how you
were qualified to determine when use clause are clutter. and  you failed to
answer that important question.  Since few of your argument are supportable,
I ask you again.  What are your qualification to comment on clutter in Ada?





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15  4:39                                                               ` Chad R. Meiners
@ 2003-11-15 11:35                                                                 ` Stephane Richard
  2003-11-15 12:53                                                                   ` Marin David Condic
  2003-11-16  0:19                                                                   ` Russ
  2003-11-15 22:12                                                                 ` Russ
  1 sibling, 2 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-15 11:35 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2659 bytes --]


>
> Let's look at the facts (as written in the newsgroups):
>
> You proclaimed that you do not program as a profession.
> You proclaimed that you have not written a serious project in Ada.
>
> Yet you proclaim that you know best for a language in which you have not
> spent a serious effort to understand and appreciate.  I asked you how you
> were qualified to determine when use clause are clutter. and  you failed
to
> answer that important question.  Since few of your argument are
supportable,
> I ask you again.  What are your qualification to comment on clutter in
Ada?
>
>
*** Ada is not like C++.  And he seems to be convinced that C++'s semantics
and syntax is what made it popular.  The first thing that made C/C++ ever
worth looking at is that it was free with UNIX (Sure Unix wasn't free, but
C++ was included, just as Basic was included with DOS). So All Unix, Mimix,
and the rest of the gang users woudl go the C way, and DOS users went the
BASIC way because it was included with the OS.


*** When I first learned C/C++ back in school.  We were a class of 35
students.  Out of those 35 students (ranging from different programming
backgrounds and some introduced to programming with C and C++)., 28 of them
wonder what the hell the { and } were doing there, thinking they were typoes
or something.  When they were explained that it was C's start and end of a
contruct, and they did understand what that meant, they said "how lazy can
you get?"  they weren't overwhelmed by the genius who decided to put those
symbols to start and end a construct or multiple lined If statement or
switch case.  But it was freely available so most of them dealt with the {
and }. The other 7 people dealt with it cause it was a low level language
and they liked that feature, not the syntax, the capacity to access low
level system calls.  There was 2 other classes that just like mine started
in C/C++ and with a couple student difference, it was pretty much the same
numbers, the majority weren't pleased with the syntax, but it was free so
they dealt with it, basically.  and back then, languages cost a pretty penny
to buy at the stores.

*** My take on this is that if Ada would have been bundled with Unix instead
of C, well C wouldn't be what it is today.  First people used C because it
was freely available, the other people used C because it was being used by
others, that's how I explain my "monkey see monkey do" theory.  Last time I
didn't mention C being freely available to start the big wheel turning,
Marin put me back on track with this ;-), it was the first reason.

-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 11:35                                                                 ` Stephane Richard
@ 2003-11-15 12:53                                                                   ` Marin David Condic
  2003-11-16  0:36                                                                     ` Russ
  2003-11-16  0:19                                                                   ` Russ
  1 sibling, 1 reply; 223+ messages in thread
From: Marin David Condic @ 2003-11-15 12:53 UTC (permalink / raw)


"Free" was a really important characteristic in a time when someone 
charging $10,000 and up for a compiler would not have been laughed at. 
Even compilers for the PC were outrageously expensive. When you had 
Borland Pascal hit the stands at around a $30 price tag (IIRC, its 
initial price was around there) that really made it a popular choice. Of 
course, it was hard for Borland Pascal to compete with "Free" Basic, but 
it did very well and made that company a major success.

And in the computer business, Success breeds Success. Once you had all 
those free C compilers out there and a really inexpensive OS 
(Universities were paying something like $200 for a source code license 
for Unix at the time, I believe.) it made a breeding ground for more C 
code. C++ was just riding on the success of C - upward compatibility, 
large installed base of code, knowledge base, etc. From there, languages 
like Java and Python had to go about looking something like C/C++ in 
order to capitalize on familiarity.

I see no evidence that anyone made a language popular because of its 
syntax. If Unix had been written in Ada and the same circumstances 
applied, you'd probably see everyone speaking Ada now and some C 
newsgroup would be having a debate about "Why doesn't C change its 
assignment statement to ":=" so it can be more popular?!?!?!". The 
motivating factors here are largely economic.

MDC


Stephane Richard wrote:
> 
> *** My take on this is that if Ada would have been bundled with Unix instead
> of C, well C wouldn't be what it is today.  First people used C because it
> was freely available, the other people used C because it was being used by
> others, that's how I explain my "monkey see monkey do" theory.  Last time I
> didn't mention C being freely available to start the big wheel turning,
> Marin put me back on track with this ;-), it was the first reason.
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14 15:18                                                         ` Robert I. Eachus
@ 2003-11-15 13:04                                                           ` Marin David Condic
  2003-11-18 22:45                                                             ` Georg Bauhaus
  0 siblings, 1 reply; 223+ messages in thread
From: Marin David Condic @ 2003-11-15 13:04 UTC (permalink / raw)


I tend to like a use clause for things similar to dispatching on a 
tagged record. Dispatching would be a joke if you *always* had to 
specify which package you wanted to reference, right? So there must be 
something "good" about the "use" clause.

If I had some sort of "display (float)" and a "display (integer)" I'd 
like to just say "Display (Object)" and the compiler sorts it out. The 
"use" clause seems to be useful where you want something to appear as a 
primitive/intrinsic operation of some kind. At other times, I want to 
make it clear that I am referencing something external to the local 
context - lack of "use" makes that clear. I don't know that I could 
formulate a hard-and-fast rule as to when it is good and when it is bad, 
but I think the language designers had something similar to this in mind 
when creating it: "Sometimes you want it to look 'intrinsic' and other 
times you want it explicit that something is external. Hence we added 
the 'use' when the 'with' alone is really all that is needed."

MDC


Robert I. Eachus wrote:
> 
> It can, but it doesn't always.  A good example is a group of ADTs that 
> have display operations.   The display operations belong in the package 
> with the other operations on the same type, but they may be the only 
> operation that needs to use Text_IO or some graphics packages.
> 
> You can organize things using child packages to segregate the I/O 
> operations, but you end up with the display operation being the only one 
> to use the child package.
> 
> Instead I usually end up with a generic package that handles the display 
> operations in a data independent manner, and the individual display 
> operations instantiate that package.  Now the use clause is for a local 
> generic instance, but it is still there.
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Trying is the first step towards failure."
         --  Homer Simpson

======================================================================




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14 23:23                                                             ` Russ
  2003-11-15  4:39                                                               ` Chad R. Meiners
@ 2003-11-15 15:19                                                               ` Robert I. Eachus
  2003-11-15 16:15                                                                 ` Gautier Write-only
  2003-11-16  5:55                                                                 ` Russ
  1 sibling, 2 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-15 15:19 UTC (permalink / raw)


Russ wrote:

> This whole line about "with" and "use" having different meanings is
> completely irrelevant. I don't care if "with" sends a mouse to the
> moon and "use" massages my feet. The simple fact is that "use" implies
> "with," whether you like it or not. Just try to use "use" without
> "with", and the compiler will tell you so. If I say, "use a hammer,"
> do I need to precede it with, "obtain a hammer"? Of course not. You
> cannot possibly "use" a hammer if one is not available.

Bzzzt! Wrong Answer, try again.  A use clasue in Ada does NOT imply that 
there is a with around somewhere.  Try compiling:

procedure Junk is
   use Ascii;
begin null; end Junk;

If you have any doubts about that.

Ascii is somewhat special, but fairly common is:

package Outer is...
    package Inner is...

end Outer;

package body Outer is
   use Inner;
   ...
end Outer;

Again a use clause without a with clause in sight.  Another common case 
is a generic package instance.  The use clause refers to the local 
instance rather than to any external unit.

You really do need to study the language and start using (ouch!) it 
correctly before you make ex cathedra statements like that.

> You are confusing two different issues here. One issue is what *you*
> consider good programming practice, and the other issue is what the
> language allows or should allow. *You* don't think that "use" should
> ever be used in the context section at the top of a file. Sorry, Ada
> allows it, and many excellent programmers consider it perfectly
> acceptable in many cases.

Fine, it is perfectly acceptable in many cases, but it still says two 
separate and separable things.  If you want to argue for a language 
change to add "with and use" as a context clause feel free.  I tend to 
think of that as a text editor issue, but different opinions are possible.

However drop the shrill tone when people are patiently trying to explain 
something to you.  With and use currently have two very different 
meanings in Ada.  Confusing the meaning of use by having it sometimes 
mean with and use would be a possible language change.  Such a change is 
highly unlikely since it violates the "-ilities" that Ada is designed to 
promote.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 15:19                                                               ` Robert I. Eachus
@ 2003-11-15 16:15                                                                 ` Gautier Write-only
  2003-11-15 19:44                                                                   ` Frank J. Lhota
  2003-11-16  0:02                                                                   ` Robert I. Eachus
  2003-11-16  5:55                                                                 ` Russ
  1 sibling, 2 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-11-15 16:15 UTC (permalink / raw)


Robert I. Eachus:

> Bzzzt! Wrong Answer, try again.  A use clasue in Ada does NOT imply that
> there is a with around somewhere.  Try compiling:
> 
> procedure Junk is
>    use Ascii;
> begin null; end Junk;
> 
> If you have any doubts about that.
> 
> Ascii is somewhat special, but fairly common is:
> 
> package Outer is...
>     package Inner is...
> 
> end Outer;
> 
> package body Outer is
>    use Inner;
>    ...
> end Outer;
> 
> Again a use clause without a with clause in sight.

Both "use" you cite are not context clauses -> OT, sorry !

BTW, your mention of ASCII is interesting.
* Ada 83 (and later) implies a non-written "with Standard; use Standard;"
  - ASCII is subpackage of Standard.
* Ada 95 (and later) implies a non-written "with Ada, Ada.Strings;" when you
  just write "with Ada.Strings.Maps;". Same for all children 

-> things are not at all 100% explicit in the present standard.

* The "[with and ]use" proposal offers the possibility of writing once
  the name of a package instead of twice when you use "use" in a context clause.

-> this feature doesn't reduce from 1 to 0 the appearance of a package name
   like both mentioned above, but from 2 to 1. When the feature is used, the
   names remain explicit, but without redundance.

Clearly the contestation about this proposal is just because this is an evolution.
Existing elements are by default sacred, improvements are by default suscpicious...
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14  7:51                                                           ` Chad R. Meiners
  2003-11-14 23:23                                                             ` Russ
@ 2003-11-15 16:40                                                             ` Gautier Write-only
  2003-11-16  0:25                                                               ` Robert I. Eachus
  1 sibling, 1 reply; 223+ messages in thread
From: Gautier Write-only @ 2003-11-15 16:40 UTC (permalink / raw)


Russ:

> > No, absolutely not. The implied "with" would apply only to "use"
> > clauses in the context section at the top of the file. You need
> > something at the top of the file to let the reader (and the compiler)
> > know what external packages will be used.

Chad R. Meiners:

> Which would imply that use clauses would have very different semantics based
> upon the scope in which they are placed.

This is not a problem, because they are *already* very different.

To take Robert examples,

  use ASCII;
  procedure Junk is
  begin null; end Junk;

(won't compile) is not at all the same as

  procedure Junk is
    use ASCII;
  begin null; end Junk;

(meaningful). 

The example Outer / Inner is interesting.

  package Outer is
    package Inner is end;
    procedure Dummy;  
  end Outer;

  use Outer.Inner;
  package body Outer is
    procedure Dummy is
    begin
      null;
    end Dummy;
  end Outer;

is accepted by GNAT 3.15p but rejected by ObjectAda 7.2.2 !
At least it could speak for the "with and use" syntax of the
proposal.

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 16:15                                                                 ` Gautier Write-only
@ 2003-11-15 19:44                                                                   ` Frank J. Lhota
  2003-11-16  0:02                                                                   ` Robert I. Eachus
  1 sibling, 0 replies; 223+ messages in thread
From: Frank J. Lhota @ 2003-11-15 19:44 UTC (permalink / raw)


One quick correction:

> * Ada 83 (and later) implies a non-written "with Standard; use Standard;"
>   - ASCII is subpackage of Standard.

Actually, all library level units are treated as part of the Standard
package. As a result, every Ada identifier can be written in a fully
qualified form starting with "Standard".

Other than the naming convention, however, the presence of a unit in the
Standard package is mostly equivalent to having "With Standard; use
Standard;" in front of the library unit.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15  4:39                                                               ` Chad R. Meiners
  2003-11-15 11:35                                                                 ` Stephane Richard
@ 2003-11-15 22:12                                                                 ` Russ
  2003-11-16  2:29                                                                   ` Chad R. Meiners
  1 sibling, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-15 22:12 UTC (permalink / raw)


"Chad R. Meiners" <crmeiners@hotmail.com> wrote in message news:<bp4dnh$r7q$1@msunews.cl.msu.edu>...
> "Russ" <18k11tm001@sneakemail.com> wrote in message
> news:bebbba07.0311141523.3c523f8c@posting.google.com...

> If the use clauses couldn't be used in declaration section, I wouldn't
> object to having use clauses imply with clauses.
> As is, doing so will add an inconsistency to the language.

I don't see any inconsistency. The rule would be simple: "use" implies
"with" if it is in the context section, otherwise it doesn't. Or, to
put it another way, "use" implies "with", but any externally
referenced package must appear in the context section in either a
"use" or a "with" statement. Where is the inconsistency?

If I wanted to be unreasonable, I could claim that the current Ada
rules are inconsistent because both "with" and "use" are allowed in
the context section, but only "use" is allowed after the context
section. That's superficially inconsistent, but it's not significantly
inconsistent because, as you said yourself, "with" and "use" have
different purposes.

> > You are confusing two different issues here. One issue is what *you*
> > consider good programming practice, and the other issue is what the
> > language allows or should allow. *You* don't think that "use" should
> > ever be used in the context section at the top of a file. Sorry, Ada
> > allows it, and many excellent programmers consider it perfectly
> > acceptable in many cases.
> 
> Ha! You don't know my opinion on use clauses in context sections.  I never
> said that people should not put them in the context section of a unit.   I
> said that if people use them in their appropriate(using rational judgment)
> place (which can be at the top of the file).

So I misunderstood your position or mistook it for that of someone
else. It was an honest mistake.

> Nice use of begging the question!
> 
> > But since you don't like that particular feature, you want to keep it
> > as inconvenient as possible to use. Well, isn't that just a bit
> > self-centered? I and others would like to be able to use this
> > officially blessed language feature, but we don't want to have to jump
> > through unnecessary hoops to use it.
> 
> Ah, here comes the unwarranted character assassination that follows the
> begging of the question ;)

Character assassination? The simple fact is that my proposal would not
force you to do anything you don't want to do. Neither you nor anyone
else would need to change a single character in any of Ada source
file. But your insistence of the status quo would prevent me and
others from writing less-cluttered code.

> > Neglecting to floss your teeth is bad practice. Maybe hotels should
> > not let you check in unless you show them that you are carrying dental
> > floss. What harm could it do? I'll tell you what harm it could do. It
> > could drive away clients, even ones who carry dental floss, because
> > people don't like to be micro-managed.
> >
> 
> Come on.  I was trying to have a rational argument with you; however, I see
> that this is unlikely.

Oh, I see. What was that about "character assassination" again?

> All I am saying is that allowing use clauses in context clause to imply with
> clauses creates an inconsistency in the language.   The designers of Ada did
> a very good job of keeping inconsistencies out of the language, which I one
> of the characteristics I enjoy about Ada.  In my opinion reducing of a
> potential clutter idea(of which I am still not convinced is a clutter
> issue), is not worth introducing an inconsistency to the language.
> 
> >
> > > When you speak in public, you are expected to remain civil.   To do
> > > otherwise is simply a negative statement about your character, but I
>  will
> > > let you worry about your public image.
> >
> > Where were you when I was called an "idiot" and a "dumbass" without
> > provocation, right here on this forum? I could have used your wisdom
> > then.
> 
> I was elsewhere.  Of course my statement applies to those who might have
> been uncivil to you.  However, I would note that when I browse through this
> newsgroup , your lack of civility sticks out like a sore thumb.

Thank you for the lecture in civility, Saint Chad. I'm happy to know
that you will be there to chastise the next person who insults me.
Just for the record, I have apologized for my admittedly rude remarks
in the past, but nobody has apologized to me for equally offensive
remarks.

> Let's look at the facts (as written in the newsgroups):
> 
> You proclaimed that you do not program as a profession.
> You proclaimed that you have not written a serious project in Ada.

Oh, I see. Only professional Ada programmers are competent to comment
on Ada, eh? No, I am not a programmer or software engineer by
training, but you better believe that I have done significant
programming and been paid for it. I am one of those rare non-Ada
programmers who recognizes the value of Ada, and look at how much
respect I get from you and others, Saint Chad.

> Yet you proclaim that you know best for a language in which you have not
> spent a serious effort to understand and appreciate.  I asked you how you
> were qualified to determine when use clause are clutter. and  you failed to
> answer that important question.  Since few of your argument are supportable,
> I ask you again.  What are your qualification to comment on clutter in Ada?

I have read much (most?) of Cohen's encyclopedic book on Ada (in my
spare time), and I have written some small but non-trivial Ada
programs just to familiarize myself with the language. Also, about ten
years ago, I led the development of an experimental real-time DGPS/INS
precision landing guidance system in C++. As far as I am concerned,
that way overqualifies me to comment on "with" and "use".

Tell me, Saint Chad, what qualifications you think I need to make such
comments? And next time I post, I'll be sure to check with you.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 16:15                                                                 ` Gautier Write-only
  2003-11-15 19:44                                                                   ` Frank J. Lhota
@ 2003-11-16  0:02                                                                   ` Robert I. Eachus
  2003-11-16 10:41                                                                     ` Gautier Write-only
  2003-11-17  9:04                                                                     ` Dmitry A. Kazakov
  1 sibling, 2 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-16  0:02 UTC (permalink / raw)


Gautier Write-only wrote:

> Both "use" you cite are not context clauses -> OT, sorry !

Not off topic.  You can have a use Ascii in a context clause without a 
with for Ascii, in fact you CAN'T have a with clause for Ascii.  (Back 
in 1983 a lot of compilers got tripped up on that special case, but 
those bugs are long gone.)  In Ada 83 a context clause had to contain a 
with clause. But in Ada 95 the syntax has changed, so you should be able 
to compile:

use Ascii;
package Foo is
   Bar: Character := Percent;
end Foo;

If not, complain to your compiler vendor.  (Although I think putting the 
use clause inside Foo looks better.)

> BTW, your mention of ASCII is interesting.
> * Ada 83 (and later) implies a non-written "with Standard; use Standard;"
>   - ASCII is subpackage of Standard.

NO! This is almost as bad as what Russ was saying.  There is no implicit 
with clause for Standard.  Try to create a library unit named Integer. 
You can't.   This is because all library units are explicitly nested 
directly within Standard.  This gives names in Standard a preferential 
visibility.  They can't be hidden by a library unit.  And also there is 
no USE visibility for names in Standard, the visibility is direct.  If 
you have a use clause for a package containing a type named Integer, it 
will not become USE visible due to the direct visibility of the Integer 
in Standard.

> * Ada 95 (and later) implies a non-written "with Ada, Ada.Strings;" when you
>   just write "with Ada.Strings.Maps;". Same for all children 
> -> things are not at all 100% explicit in the present standard.

Ask why, or look at the ARG and Ada 9X DR discussions, etc., and you 
will understand why it was done this way.  First there should be no 
confusion about whether there is a with clause for Ada.Strings. You are 
looking at it.  But consider another case:

package Ada.Strings.Maps is... -- A.4.2(3)

In this case, there is an implicit with of Ada.Strings, and with good 
reason.  To make the language easy to use, we need direct visibility of 
names in Ada.Strings within Ada.Strings.Maps.  That is pretty hard for 
the compiler to do correctly without having Ada.Strings as part of the 
context.  But it is not part of the context clause, because of the 
direct visibility issue, just like Standard.  Ada.Strings.Maps is 
conceptually declared within Ada.Strings, which is within Ada, which is 
within Standard.  Direct visibility all the way, and nary a hint of a 
with or use clause.
> 
> * The "[with and ]use" proposal offers the possibility of writing once
>   the name of a package instead of twice when you use "use" in a context clause.

As I said, not a problem, go ahead and push for "with and use" if you 
like it.  But having a use imply a with breaks things.  That model could 
be fixed, but why even try.  If you currently have a text editor macro 
that maps #wau Foo into "with Foo; use Foo;" you can change it to 
generate "with and use Foo;" if the change is approved.  I don't see it 
as a big deal, but different opinions are allowed and expected.

> -> this feature doesn't reduce from 1 to 0 the appearance of a package name
>    like both mentioned above, but from 2 to 1. When the feature is used, the
>    names remain explicit, but without redundance.
> 
> Clearly the contestation about this proposal is just because this is an evolution.
> Existing elements are by default sacred, improvements are by default suscpicious...

No I look at the "with implies use" proposal and get a splitting 
headache when thinking about how it could be worded.  Answer me just one 
little problem, and I might think about it:

use Foo; use Bar;
package...

Now if there is a package Foo and it contains a package Bar, and there 
is a package Bar in the compilation environment, which one do you get if 
any, and why?  If you don't understand the issue, create the specified 
packages and try it with your current Ada compiler.  Then read RM 8.4(6) 
to see why it works the way it does now, and try to rewrite 8.4(6) to 
match the use implies with proposal.  Now do you see why I have a headache?

This is the reason I often seem to say "Yeah, that's nice, why don't you 
propose it," about some proposals and "Forget it, it won't fly," about 
others.  I can be wrong, if someone finds a way to express things.  Some 
ARG members, especially Tucker, are trying to fit earliest deadline 
first scheduling within a priority based model without 
incompatibilities.  It looks like they are pulling it off.  This is very 
nice because, if it works it will allow some tasks (and priority levels) 
to be used for EDF scheduling and other priority levels for ordinary 
priority based scheduing.  But it is a lot of work that may never be 
visible to most Ada users.  The theory will be there, the few 
implementors who need to will understand it, and enough ARG members will 
understand the model to fix it if it breaks.  For something like that, 
it is worth the pain.  To shorten "with and use" to "use"?  No way!

But in this case, "with and use" is simple and seems to address the 
problem without monkeying with the scope of use clauses.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 11:35                                                                 ` Stephane Richard
  2003-11-15 12:53                                                                   ` Marin David Condic
@ 2003-11-16  0:19                                                                   ` Russ
  2003-11-16  1:41                                                                     ` Stephane Richard
  2003-11-16 13:56                                                                     ` Hyman Rosen
  1 sibling, 2 replies; 223+ messages in thread
From: Russ @ 2003-11-16  0:19 UTC (permalink / raw)


"Stephane Richard" <stephane.richard@verizon.net> wrote in message news:<hcotb.24224$hB5.13577@nwrdny02.gnilink.net>...

> *** Ada is not like C++.  And he seems to be convinced that C++'s semantics
> and syntax is what made it popular.  The first thing that made C/C++ ever
> worth looking at is that it was free with UNIX (Sure Unix wasn't free, but
> C++ was included, just as Basic was included with DOS). So All Unix, Mimix,
> and the rest of the gang users woudl go the C way, and DOS users went the
> BASIC way because it was included with the OS.

No, I am not "convinced that C++'s semantics and syntax is what made
it popular." I've made this abundantly clear in the past, but let me
clarify it again. What I *am* convinced of is that C++'s syntax did
not stand in its way of gaining popularity. Like the vast majority of
the other popular languages around today, C++ has a "standard"
assignment operator, for example. And like C, Java, Perl, and Python,
it has augmented assignment operators.

As fundamentally sound as Ada is, it is cursed with a non-standard
assignment operator, a lack of augmented assignment operators, and
unnecessary clutter at the beginning of many files. It's like a good
woman who is cursed with warts on her face. Just think of me as a
caring friend who is suggesting that the warts be removed as much as
possible. Don't take it as an insult. And please, don't tell me that I
think some other woman is popular *only* because she doesn't have
warts on her face.

> *** My take on this is that if Ada would have been bundled with Unix instead
> of C, well C wouldn't be what it is today.  First people used C because it
> was freely available, the other people used C because it was being used by
> others, that's how I explain my "monkey see monkey do" theory.  Last time I
> didn't mention C being freely available to start the big wheel turning,
> Marin put me back on track with this ;-), it was the first reason.

The fact that Unix and its progeny were and are written in C, and C
was bundled for free, was certainly an important factor. That is
undeniable. But that doesn't explain the popularity of C for three
decades, and its continued popularity for Linux and many of its
applications. It certainly could have been supplanted somewhere along
the way if it really rubbed developers wrong. Apparently it didn't.
I'm not sure that would have been true for Ada.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 16:40                                                             ` Gautier Write-only
@ 2003-11-16  0:25                                                               ` Robert I. Eachus
  2003-11-16  1:20                                                                 ` Wes Groleau
  2003-11-16 10:19                                                                 ` Gautier Write-only
  0 siblings, 2 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-16  0:25 UTC (permalink / raw)


Gautier wrote:

> This is not a problem, because they are *already* very different.
> 
> To take Robert examples,
> 
>   use ASCII;
>   procedure Junk is
>   begin null; end Junk;
> 
> (won't compile) is not at all the same as
> 
>   procedure Junk is
>     use ASCII;
>   begin null; end Junk;
> 
> (meaningful). 
> 
> The example Outer / Inner is interesting.
> 
>   package Outer is
>     package Inner is end;
>     procedure Dummy;  
>   end Outer;
> 
>   use Outer.Inner;
>   package body Outer is
>     procedure Dummy is
>     begin
>       null;
>     end Dummy;
>   end Outer;
> 
> is accepted by GNAT 3.15p but rejected by ObjectAda 7.2.2 !
> At least it could speak for the "with and use" syntax of the
> proposal.

Wow! That was fast, my code sample was only up for a short time and at 
least two bug reports resulted.  I used to say that I had two modes of 
writing Ada, in one I expected to write tens of thousands of lines 
between compiler bug reports.  In the language lawyer mode, if I didn't 
generate one bug report per every twenty lines or so, I was slacking.

Saying use Ascii; in a context clause is almost cheating in the second 
mode.  It is such a special case, probably never occurs in "real" code, 
and takes a lot of work by compiler developers to get right. (If you do 
send in a bug report, please! don't mention my name.  As far as I am 
concerned this is a pathological case.)

The "use Outer.Inner" case is a bit more troubling.  If the compiler 
also breaks on "with Outer; use Outer.Inner; package Foo is..." then I 
think it is worth a bug report.
-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 12:53                                                                   ` Marin David Condic
@ 2003-11-16  0:36                                                                     ` Russ
  2003-11-16  2:38                                                                       ` Chad R. Meiners
  0 siblings, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-16  0:36 UTC (permalink / raw)


Marin David Condic <nobody@noplace.com> wrote in message news:<3FB621AE.8040902@noplace.com>...

> And in the computer business, Success breeds Success. Once you had all 
> those free C compilers out there and a really inexpensive OS 
> (Universities were paying something like $200 for a source code license 
> for Unix at the time, I believe.) it made a breeding ground for more C 
> code. C++ was just riding on the success of C - upward compatibility, 
> large installed base of code, knowledge base, etc. From there, languages 
> like Java and Python had to go about looking something like C/C++ in 
> order to capitalize on familiarity.

No quarrel here.

> I see no evidence that anyone made a language popular because of its 
> syntax. If Unix had been written in Ada and the same circumstances 
> applied, you'd probably see everyone speaking Ada now and some C 
> newsgroup would be having a debate about "Why doesn't C change its 
> assignment statement to ":=" so it can be more popular?!?!?!". The 
> motivating factors here are largely economic.

Did I get something mixed up, or did the same person really write both
of the paragraphs above? In the first paragraph, you wrote, "From
there, languages like Java and Python had to go about looking
something like C/C++ in  order to capitalize on familiarity." Then in
the second paragraph, you wrote,"I see no evidence that anyone made a
language popular because of its syntax."

Well, which is it? Did C++ benefit from the syntactic similarity to C,
or didn't it? Did Java benefit from the syntactic similarity to Java,
or didn't it? If they did, doesn't that mean that syntax does indeed
have an effect on the popularity of a language?

I am going to restate something I have said before regarding the
negative effect bad syntax can have on the popularity of a language.
Just because programmers are not explicitly complaining about the
syntax, that does *not* mean it has no effect on their language
preferences. The effect may be subconscious, or it may be conscious
but deliberately concealed for fear of appearing "shallow." Similarly,
women are much more likely to reject a short man in favor of a tall
man, even if the tall man is a jerk and the short man is the nicest
guy around. I could give many other examples, of course.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  0:25                                                               ` Robert I. Eachus
@ 2003-11-16  1:20                                                                 ` Wes Groleau
  2003-11-16 14:59                                                                   ` Gautier Write-only
  2003-11-16 10:19                                                                 ` Gautier Write-only
  1 sibling, 1 reply; 223+ messages in thread
From: Wes Groleau @ 2003-11-16  1:20 UTC (permalink / raw)


Robert I. Eachus wrote:
> Wow! That was fast, my code sample was only up for a short time and at 
> least two bug reports resulted.  I used to say that I had two modes of 
> writing Ada, in one I expected to write tens of thousands of lines 
> between compiler bug reports.  In the language lawyer mode, if I didn't 
> generate one bug report per every twenty lines or so, I was slacking.

However, it wasn't your sample that found the bug.

You posted

   package body Outer is
     use Inner;

He changed it to

   use Outer.Inner;
   package body Outer is

-- 
Wes Groleau
-----------
Curmudgeon's Complaints on Courtesy:
http://www.onlinenetiquette.com/courtesy1.html
(Not necessarily my opinion, but worth reading)




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  0:19                                                                   ` Russ
@ 2003-11-16  1:41                                                                     ` Stephane Richard
  2003-11-16  2:11                                                                       ` Frank J. Lhota
                                                                                         ` (2 more replies)
  2003-11-16 13:56                                                                     ` Hyman Rosen
  1 sibling, 3 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-16  1:41 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5550 bytes --]


"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311151619.400e3b6f@posting.google.com...
> "Stephane Richard" <stephane.richard@verizon.net> wrote in message
news:<hcotb.24224$hB5.13577@nwrdny02.gnilink.net>...
>
> No, I am not "convinced that C++'s semantics and syntax is what made
> it popular." I've made this abundantly clear in the past, but let me
> clarify it again. What I *am* convinced of is that C++'s syntax did
> not stand in its way of gaining popularity. Like the vast majority of
> the other popular languages around today, C++ has a "standard"
> assignment operator, for example. And like C, Java, Perl, and Python,
> it has augmented assignment operators.
>
*** You're right, the syntax didn't stand in the way of it's popularity,
What I'm saying is if Ada, was used instead of C/C++ to develop and bundled
free with it, Things would have been different.  and Ada's syntax would not
have stood in the way of it's popularity either.  In the DOS world, C wasn't
as popular back then because a BASIC was the language supplied free.  and
people didn't complain about the syntax of BASIC either.

> As fundamentally sound as Ada is, it is cursed with a non-standard
> assignment operator, a lack of augmented assignment operators, and
> unnecessary clutter at the beginning of many files. It's like a good
> woman who is cursed with warts on her face. Just think of me as a
> caring friend who is suggesting that the warts be removed as much as
> possible. Don't take it as an insult. And please, don't tell me that I
> think some other woman is popular *only* because she doesn't have
> warts on her face.

*** Well, selling houses didn't work, now we're choosing brides ?  :-)  (no
pun intended).  I see your analogy Russ.  Let's talk about that clutter at
the beginning of the file.  As you know Ada, much like Pascal dialects, do
not require a namespace, names being isolated by package names (of course
providing there's no conflict in package names but if there is, Ada will
report it). In C++ today it's not enough to compare With and Use with C++'s
#include statement.

With Ada.Text_IO; USE Ada.Text_IO;

Isn't like saying
#include <libraryname.h>

It's more like saying

#include <LibraryName>
using namespace <NameSpace>;

If you have a namespace defined for a given library, and you don't include
the "using namespace <>" clause the only way to access that function will
be: "NameSpace.FunctionName()", if you are using the "using namespace <>"
clause then you can just call FunctionName() because the NameSpace is
resolved by the statement.

In C++ even for standard cout and cin functions you need to use the std name
space or you'll have to write std::cout everytime you need to output
something to the standard output.

I think you can view With and Use pretty much like the #include and using
namespace statements in C++.

> The fact that Unix and its progeny were and are written in C, and C
> was bundled for free, was certainly an important factor. That is
> undeniable. But that doesn't explain the popularity of C for three
> decades, and its continued popularity for Linux and many of its
> applications. It certainly could have been supplanted somewhere along
> the way if it really rubbed developers wrong. Apparently it didn't.
> I'm not sure that would have been true for Ada.

It explains it's popularity for any time period before OpenSource
existed...afterwards..seems no one made a free basic, but there was a free
form of pascal compiler available and that definitally gave it a good boost.
What was the price of COBOL back in the early 80s?  Like I said, the trigger
was C bundled freely with these OS ... afterwards, it's either laziness, or
monkey see monkey do.  As in:

Note that these are situations I've lived first hand, they may not be a
majority, but I doubt it :-).  but these explanation reasons below were told
to me as is without editing :-).  and I'm sure that they weren't the only
ones to think one of these following ways.

Commercial reasons
" Well we got all these code we wrote in C or C++. Too late to change now,
it would cost us an arm and a leg"

Lazy Reason:
" Well I don't wanna redo it (and that's even if he knew it would have been
much better) back then C was not the answer to every problem, still had it's
mark to make. Today well we'd need to restart the comparisons."

Monkey See Monkey Do (usually in the case of a Team with a New project, but
I've seen code being rewritten to another language for this same reason:
" Project X does This, This other company (competitor or not) used C/C++ to
do it, maybe they know something we don't" and they wouldn't research the
issue, go get C++ and start coding.

I'm not saying no one at all did the research and didn't come up with a
reason other than the preceding three to use C++.  Far from it, but I'm
saying that all these reasons helped C/C++'s popularity not just the power
and flexibility of the language because today, with every language
attempting to acheive general purpose language status, that gap between
other language sand C's low level features is breaking.  with Ada, but with
other languages too.

And finally I can tell you that I've heard of many companies start to regret
their choice of using C/C++ both.  And starting to say "Maybe I should have
studied the issue more" not publically of course cause it would cost them
their jobs ;-).  Again I'm not saying everyone is regretting, but some
definitaly are.

-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  1:41                                                                     ` Stephane Richard
@ 2003-11-16  2:11                                                                       ` Frank J. Lhota
  2003-11-16  2:28                                                                         ` Stephane Richard
  2003-11-16 14:04                                                                         ` Hyman Rosen
  2003-11-16  6:15                                                                       ` Russ
  2003-11-16 14:00                                                                       ` Hyman Rosen
  2 siblings, 2 replies; 223+ messages in thread
From: Frank J. Lhota @ 2003-11-16  2:11 UTC (permalink / raw)


"Stephane Richard" <stephane.richard@verizon.net> wrote in message
news:tBAtb.26703$hB5.10383@nwrdny02.gnilink.net...
> In C++ even for standard cout and cin functions you need to use the std
name
> space or you'll have to write std::cout everytime you need to output
> something to the standard output.

I've done that a lot in my C++ code. In the C++ community, the "using"
declaration is even more controversial than the "use" clause is in the Ada
community. I have programmed for groups where using "using" is prohibited
unless absolutely necessary.

You can do stream program without "using", but that involves writing
std::cout, std::flush, std::endl, etc., not to mention appending std to
every identifier from the STL.

If Russ dislikes the clutter caused by matching "with" and "use" clauses in
Ada, he'd be appalled at what often goes on in the C++ community!





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  2:11                                                                       ` Frank J. Lhota
@ 2003-11-16  2:28                                                                         ` Stephane Richard
  2003-11-16 14:04                                                                         ` Hyman Rosen
  1 sibling, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-16  2:28 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]


"Frank J. Lhota" <NOSPAM.FrankLho@rcn.com> wrote in message
news:bp6mcr$2uc$1@bob.news.rcn.net...
>
> I've done that a lot in my C++ code. In the C++ community, the "using"
> declaration is even more controversial than the "use" clause is in the Ada
> community. I have programmed for groups where using "using" is prohibited
> unless absolutely necessary.
>
> You can do stream program without "using", but that involves writing
> std::cout, std::flush, std::endl, etc., not to mention appending std to
> every identifier from the STL.
>
> If Russ dislikes the clutter caused by matching "with" and "use" clauses
in
> Ada, he'd be appalled at what often goes on in the C++ community!
>
>
I hear ya :-).

-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 22:12                                                                 ` Russ
@ 2003-11-16  2:29                                                                   ` Chad R. Meiners
  2003-11-16  7:01                                                                     ` Russ
  0 siblings, 1 reply; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-16  2:29 UTC (permalink / raw)



"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311151412.6bf52757@posting.google.com...
> "Chad R. Meiners" <crmeiners@hotmail.com> wrote in message
news:<bp4dnh$r7q$1@msunews.cl.msu.edu>...
> > "Russ" <18k11tm001@sneakemail.com> wrote in message
> > news:bebbba07.0311141523.3c523f8c@posting.google.com...
>
> > If the use clauses couldn't be used in declaration section, I wouldn't
> > object to having use clauses imply with clauses.
> > As is, doing so will add an inconsistency to the language.
>
> I don't see any inconsistency. The rule would be simple: "use" implies
> "with" if it is in the context section, otherwise it doesn't. Or, to
> put it another way, "use" implies "with", but any externally
> referenced package must appear in the context section in either a
> "use" or a "with" statement. Where is the inconsistency?

The above rule, when in isolation, is not inconsistent.  When it is merge
with theobjectives(you can find some very good description of these in some
of Robert Eachus's posts) of Ada, it becomes inconsistent.

> If I wanted to be unreasonable, I could claim that the current Ada
> rules are inconsistent because both "with" and "use" are allowed in
> the context section, but only "use" is allowed after the context
> section. That's superficially inconsistent, but it's not significantly
> inconsistent because, as you said yourself, "with" and "use" have
> different purposes.

Not really, because both with and use have very specific meanings.
Secondly, with clauses do not depend upon use clauses; therefore, their
placement can be limited compared to the use clause.

> > > You are confusing two different issues here. One issue is what *you*
> > > consider good programming practice, and the other issue is what the
> > > language allows or should allow. *You* don't think that "use" should
> > > ever be used in the context section at the top of a file. Sorry, Ada
> > > allows it, and many excellent programmers consider it perfectly
> > > acceptable in many cases.
> >
> > Ha! You don't know my opinion on use clauses in context sections.  I
never
> > said that people should not put them in the context section of a unit.
I
> > said that if people use them in their appropriate(using rational
judgment)
> > place (which can be at the top of the file).
>
> So I misunderstood your position or mistook it for that of someone
> else. It was an honest mistake.

Okay that's fine.  It is a pity we don't have formal inflection symbols for
text ;)

> > Nice use of begging the question!
> >
> > > But since you don't like that particular feature, you want to keep it
> > > as inconvenient as possible to use. Well, isn't that just a bit
> > > self-centered? I and others would like to be able to use this
> > > officially blessed language feature, but we don't want to have to jump
> > > through unnecessary hoops to use it.
> >
> > Ah, here comes the unwarranted character assassination that follows the
> > begging of the question ;)
>
> Character assassination?

Okay, when someone intentionally begs a question, it is usually to perform
character assassination.  For example, the question, "Have you stopped
beating your dog?".

> The simple fact is that my proposal would not
> force you to do anything you don't want to do. Neither you nor anyone
> else would need to change a single character in any of Ada source
> file.

I understand this, but ...

> But your insistence of the status quo would prevent me and
> others from writing less-cluttered code.

my insistence for the status quo is because the design of Ada is
really--really helpful to people (especially students) when they program.
The best way to express this difference is that you (en)code in C/C++ and
you program in Ada.  The result of this difference is that Ada is ground
that is very fertile for though and abstraction.

> > > Neglecting to floss your teeth is bad practice. Maybe hotels should
> > > not let you check in unless you show them that you are carrying dental

> > > floss. What harm could it do? I'll tell you what harm it could do. It
> > > could drive away clients, even ones who carry dental floss, because
> > > people don't like to be micro-managed.
> > >
> >
> > Come on.  I was trying to have a rational argument with you; however, I
see
> > that this is unlikely.
>
> Oh, I see. What was that about "character assassination" again?

Well it seemed (in an observable way) that you were being intentionally,
'stubborn'.

> Thank you for the lecture in civility, Saint Chad. I'm happy to know
> that you will be there to chastise the next person who insults me.
> Just for the record, I have apologized for my admittedly rude remarks
> in the past, but nobody has apologized to me for equally offensive
> remarks.

I never claimed to be a saint nor do I aspire to become one.  Just for the
record you have apologized for only some of you rude remarks.  ;-)

> > Let's look at the facts (as written in the newsgroups):
> >
> > You proclaimed that you do not program as a profession.
> > You proclaimed that you have not written a serious project in Ada.
>
> Oh, I see. Only professional Ada programmers are competent to comment
> on Ada, eh? No, I am not a programmer or software engineer by
> training, but you better believe that I have done significant
> programming and been paid for it.

Deduction and reasoning is not a replacement for experience.  The believe so
is the source of hubris.  You are free to comment on Ada, but it would be
wise to listen to the counterarguments and comments of those that have
actual experience in working with Ada.  Remember scientific a hypothesis
must be supported by experienced behavior.  The same is true about all
rational discussions about languages.

> I am one of those rare non-Ada
> programmers who recognizes the value of Ada, and look at how much
> respect I get from you and others, Saint Chad.

I have treated you with basic civility and respect.

> > What are your qualification to comment on clutter in Ada?
>
> I have read much (most?) of Cohen's encyclopedic book on Ada (in my
> spare time), and I have written some small but non-trivial Ada
> programs just to familiarize myself with the language. Also, about ten
> years ago, I led the development of an experimental real-time DGPS/INS
> precision landing guidance system in C++. As far as I am concerned,
> that way overqualifies me to comment on "with" and "use".
> Tell me, Saint Chad, what qualifications you think I need to make such
> comments? And next time I post, I'll be sure to check with you.

First, your experience with prior programming languages is secondary.  It is
useful for comparing against the experience you had in Ada.  Second, you
should have experience with some large code base of Ada.  I would suggest
the source code for GNAT.  This will put you into the position of the reader
as oppose to a writer.  I have found the GNAT source very easy to dive right
into, and furthermore, I didn't find the with-use combo to be cluttering at
all.  I will give you the benifit of the doubt that your learning projects
involved something more than just transcribing programs you wrote earlier.
Furthermore, I asked you for your qualifications because you were not
properly supporting your arguments.   You were simply asserting an opinion.
Therefore, if you want your opinion to carry the weight that you feel it
ought to, you should provide some qualifications.  There is nothing wrong
with me asking for your qualifications; it is the responsible course of
action when your assertions appear contrary to observed experience.  Their
is no need to get upset over being asked.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  0:36                                                                     ` Russ
@ 2003-11-16  2:38                                                                       ` Chad R. Meiners
  0 siblings, 0 replies; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-16  2:38 UTC (permalink / raw)



"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311151636.472a9aa7@posting.google.com...
> Well, which is it? Did C++ benefit from the syntactic similarity to C,
> or didn't it? Did Java benefit from the syntactic similarity to Java,
> or didn't it? If they did, doesn't that mean that syntax does indeed
> have an effect on the popularity of a language?

Both of course.  ;)  CO did not become popular due to its syntax, but once
it had become popular people were accustomed to it which allows languages
with similar syntax to leverage upon its popularity.

> I am going to restate something I have said before regarding the
> negative effect bad syntax can have on the popularity of a language.
> Just because programmers are not explicitly complaining about the
> syntax, that does *not* mean it has no effect on their language
> preferences. The effect may be subconscious, or it may be conscious
> but deliberately concealed for fear of appearing "shallow." Similarly,
> women are much more likely to reject a short man in favor of a tall
> man, even if the tall man is a jerk and the short man is the nicest
> guy around. I could give many other examples, of course.

One should not worry about unobservable events because one cannot knowingly
affect them.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 15:19                                                               ` Robert I. Eachus
  2003-11-15 16:15                                                                 ` Gautier Write-only
@ 2003-11-16  5:55                                                                 ` Russ
  2003-11-16 19:31                                                                   ` Robert I. Eachus
  1 sibling, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-16  5:55 UTC (permalink / raw)


"Robert I. Eachus" <rieachus@comcast.net> wrote in message news:<G-udnYiJ3bOJ2SuiRVn-tg@comcast.com>...
> Russ wrote:
> 
> > This whole line about "with" and "use" having different meanings is
> > completely irrelevant. I don't care if "with" sends a mouse to the
> > moon and "use" massages my feet. The simple fact is that "use" implies
> > "with," whether you like it or not. Just try to use "use" without
> > "with", and the compiler will tell you so. If I say, "use a hammer,"
> > do I need to precede it with, "obtain a hammer"? Of course not. You
> > cannot possibly "use" a hammer if one is not available.
> 
> Bzzzt! Wrong Answer, try again.  A use clasue in Ada does NOT imply that 
> there is a with around somewhere.  Try compiling:
> 
> procedure Junk is
>    use Ascii;
> begin null; end Junk;
> 
> If you have any doubts about that.

Mr. Eachus, I'll admit that my point was very unclear, perhaps even
obtuse, but I think it should have been clear that my point was *not*
what you thought it was. If I really thought that "use" literally
implies "with", then why would I be arguing that "use" should imply
"with"?

My point was as follows. If you use "use" without preceding it with
"with" (no pun intended), the compiler will obviously squawk at you.
The compiler is telling you that you should have had a "with"
statement. In other words, the compiler is telling that "use"
*requires* "with". So in a sense, it implies it. It was a poor way to
make the point. Please forget I wrote it.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  1:41                                                                     ` Stephane Richard
  2003-11-16  2:11                                                                       ` Frank J. Lhota
@ 2003-11-16  6:15                                                                       ` Russ
  2003-11-16 14:00                                                                       ` Hyman Rosen
  2 siblings, 0 replies; 223+ messages in thread
From: Russ @ 2003-11-16  6:15 UTC (permalink / raw)


"Stephane Richard" <stephane.richard@verizon.net> wrote in message news:<tBAtb.26703$hB5.10383@nwrdny02.gnilink.net>...
> "Russ" <18k11tm001@sneakemail.com> wrote in message
> news:bebbba07.0311151619.400e3b6f@posting.google.com...
> > "Stephane Richard" <stephane.richard@verizon.net> wrote in message
>  news:<hcotb.24224$hB5.13577@nwrdny02.gnilink.net>...
> >
> > No, I am not "convinced that C++'s semantics and syntax is what made
> > it popular." I've made this abundantly clear in the past, but let me
> > clarify it again. What I *am* convinced of is that C++'s syntax did
> > not stand in its way of gaining popularity. Like the vast majority of
> > the other popular languages around today, C++ has a "standard"
> > assignment operator, for example. And like C, Java, Perl, and Python,
> > it has augmented assignment operators.
> >
> *** You're right, the syntax didn't stand in the way of it's popularity,
> What I'm saying is if Ada, was used instead of C/C++ to develop and bundled
> free with it, Things would have been different.  and Ada's syntax would not
> have stood in the way of it's popularity either.

I don't think you (or anyone) could possibly know that.

> *** Well, selling houses didn't work, now we're choosing brides ?  :-)  (no
> pun intended).  I see your analogy Russ.  Let's talk about that clutter at
> the beginning of the file.  As you know Ada, much like Pascal dialects, do
> not require a namespace, names being isolated by package names (of course
> providing there's no conflict in package names but if there is, Ada will
> report it). In C++ today it's not enough to compare With and Use with C++'s
> #include statement.
> 
> With Ada.Text_IO; USE Ada.Text_IO;
> 
> Isn't like saying
> #include <libraryname.h>
> 
> It's more like saying
> 
> #include <LibraryName>
> using namespace <NameSpace>;

Yes, I agree. However, C++ is stuck with this approach because the
<LibraryName> is not the same as the <NameSpace>. In Ada, the package
name *is* the namespace, so there is no inherent need to specify two
different entities. Here's a chance for Ada to actually be cleaner and
more convenient than C++, but it's apparently being squandered.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  2:29                                                                   ` Chad R. Meiners
@ 2003-11-16  7:01                                                                     ` Russ
  2003-11-16 20:02                                                                       ` Chad R. Meiners
  0 siblings, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-16  7:01 UTC (permalink / raw)


"Chad R. Meiners" <crmeiners@hotmail.com> wrote in message news:<bp6neb$1eo$1@msunews.cl.msu.edu>...
> "Russ" <18k11tm001@sneakemail.com> wrote in message
> news:bebbba07.0311151412.6bf52757@posting.google.com...

> > Thank you for the lecture in civility, Saint Chad. I'm happy to know
> > that you will be there to chastise the next person who insults me.
> > Just for the record, I have apologized for my admittedly rude remarks
> > in the past, but nobody has apologized to me for equally offensive
> > remarks.
> 
> I never claimed to be a saint nor do I aspire to become one.  Just for the
> record you have apologized for only some of you rude remarks.  ;-)

Which is more than can be said for anyone else on this forum, or at
least the part of it I've seen.

> Deduction and reasoning is not a replacement for experience.  The believe so
> is the source of hubris.  You are free to comment on Ada, but it would be
> wise to listen to the counterarguments and comments of those that have
> actual experience in working with Ada.  Remember scientific a hypothesis
> must be supported by experienced behavior.  The same is true about all
> rational discussions about languages.
> 
> > I am one of those rare non-Ada
> > programmers who recognizes the value of Ada, and look at how much
> > respect I get from you and others, Saint Chad.
> 
> I have treated you with basic civility and respect.

On this post I would agree that you have. However, your previous post
was more than a little patronizing. I think you will find that most
people naturally resent being patronized and lectured to. Then again,
maybe I deserved it. On the other hand, I think there's a tendency
here to mistake impassioned debate with a personal attack.

In any case, I guess we'll just have to "agree to disagree" on this
one, because I simply cannot agree with your position. As I wrote
before, Python has

   import math # equivalent to Ada "with"

and

   from math import * # equivalent to Ada "use"

and you do not need to precede the latter with the former. The latter
stands alone perfectly well. As far as I know, this has never been
called "inconsistent" or considered even a minor issue in the Python
community. It's a complete non-issue, and I'll bet that if I clained
on comp.lang.python that this is somehow inconsistent or error prone,
people there would consider me a nut case.

Yes, I realize that Ada is not Python, and Ada is intended for safety
critical code and Python is not. However, the safety of Ada does not
come from redundant "with" and "use". Purists who think otherwise
remind me of military purists. In bootcamp they force you to keep your
shoes shiny and your uniform folded perfectly. Why? Because it
establishes discipline. Do shiny shoes make you a more effective
fighter? Of course not. But try to argue that with a marine DI. It
would be very much like arguing here that redundant "with" and "use"
does not make your code "safer" or more reliable. You just cannot
penetrate a certain mindset.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  0:25                                                               ` Robert I. Eachus
  2003-11-16  1:20                                                                 ` Wes Groleau
@ 2003-11-16 10:19                                                                 ` Gautier Write-only
  1 sibling, 0 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-11-16 10:19 UTC (permalink / raw)


Robert I. Eachus:

> The "use Outer.Inner" case is a bit more troubling.  If the compiler
> also breaks on "with Outer; use Outer.Inner; package Foo is..." then I
> think it is worth a bug report.

  with Outer; use Outer.Inner;
  package Foo is
  end Foo;

Both of OA 7.2.2 and GNAT 3.15p compile it.
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  0:02                                                                   ` Robert I. Eachus
@ 2003-11-16 10:41                                                                     ` Gautier Write-only
  2003-11-17  9:04                                                                     ` Dmitry A. Kazakov
  1 sibling, 0 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-11-16 10:41 UTC (permalink / raw)


Robert I. Eachus

> As I said, not a problem, go ahead and push for "with and use" if you
> like it.  But having a use imply a with breaks things.  That model could
> be fixed, but why even try.  If you currently have a text editor macro
> that maps #wau Foo into "with Foo; use Foo;" you can change it to
> generate "with and use Foo;" if the change is approved.  I don't see it
> as a big deal, but different opinions are allowed and expected.

OK, you convinced me that the "use" implying "with", although looking nicer,
will cause a lot of problems, to begin with the non-compatibility and ambivalency.
I'll keep on pushing for "with and use".

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  0:19                                                                   ` Russ
  2003-11-16  1:41                                                                     ` Stephane Richard
@ 2003-11-16 13:56                                                                     ` Hyman Rosen
  1 sibling, 0 replies; 223+ messages in thread
From: Hyman Rosen @ 2003-11-16 13:56 UTC (permalink / raw)


Russ wrote:
>  What I *am* convinced of is that C++'s syntax did
> not stand in its way of gaining popularity.

Which, considering what C++'s syntax is like, is absolutely amazing.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  1:41                                                                     ` Stephane Richard
  2003-11-16  2:11                                                                       ` Frank J. Lhota
  2003-11-16  6:15                                                                       ` Russ
@ 2003-11-16 14:00                                                                       ` Hyman Rosen
  2 siblings, 0 replies; 223+ messages in thread
From: Hyman Rosen @ 2003-11-16 14:00 UTC (permalink / raw)


Stephane Richard wrote:
> In C++ even for standard cout and cin functions you need to use the std name
> space or you'll have to write std::cout everytime you need to output
> something to the standard output.

Yep. Oddly enough, I never find myself tempted to stick 'using namespace std;'
in my code. I actually like the way the code looks sprinkled with little 'std::'
qualifiers. It sets off the standard library stuff from the rest of the code.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  2:11                                                                       ` Frank J. Lhota
  2003-11-16  2:28                                                                         ` Stephane Richard
@ 2003-11-16 14:04                                                                         ` Hyman Rosen
  1 sibling, 0 replies; 223+ messages in thread
From: Hyman Rosen @ 2003-11-16 14:04 UTC (permalink / raw)


Frank J. Lhota wrote:
> I've done that a lot in my C++ code. In the C++ community, the "using"
> declaration is even more controversial than the "use" clause is in the Ada
> community. I have programmed for groups where using "using" is prohibited
> unless absolutely necessary.

As far as I know, the general rule of thumb is never to put a "using" declaration
in a header file, because then you are polluting the namespaces of everyone who
includes the file. But it's fine to do it in an implementation file. I don't usually
bother, though - I'm not offended by (short) qualifiers.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  1:20                                                                 ` Wes Groleau
@ 2003-11-16 14:59                                                                   ` Gautier Write-only
  2003-11-16 19:39                                                                     ` Robert I. Eachus
  2003-11-16 21:04                                                                     ` Wes Groleau
  0 siblings, 2 replies; 223+ messages in thread
From: Gautier Write-only @ 2003-11-16 14:59 UTC (permalink / raw)


> Robert I. Eachus wrote:
> > Wow! That was fast, my code sample was only up for a short time and at
> > least two bug reports resulted.  I used to say that I had two modes of
> > writing Ada, in one I expected to write tens of thousands of lines
> > between compiler bug reports.  In the language lawyer mode, if I didn't
> > generate one bug report per every twenty lines or so, I was slacking.

Wes Groleau:


> However, it wasn't your sample that found the bug.
> 
> You posted
> 
>    package body Outer is
>      use Inner;
> 
> He changed it to
> 
>    use Outer.Inner;
>    package body Outer is

Thank you for the precision.

I'm curious to know who's right on the changed example: GNAT or ObjectAda ?
GNAT compiles, OA says:

outer.adb: Error: line 1 col 6 LRM:4.1(3), Direct name, Outer, is not visible, Ignoring future references 

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  5:55                                                                 ` Russ
@ 2003-11-16 19:31                                                                   ` Robert I. Eachus
  2003-11-17  1:34                                                                     ` Robert I. Eachus
  0 siblings, 1 reply; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-16 19:31 UTC (permalink / raw)



> I said:  
>  Try compiling:
>>
>>procedure Junk is
>>   use Ascii;
>>begin null; end Junk;
>>
>>If you have any doubts about that.

Russ wrote:

> Mr. Eachus, I'll admit that my point was very unclear, perhaps even
> obtuse, but I think it should have been clear that my point was *not*
> what you thought it was. If I really thought that "use" literally
> implies "with", then why would I be arguing that "use" should imply
> "with"?

Then you didn't try compiling that litte code fragment.  The:

use Ascii;
procedure Junk is beging null; end Junk;

That Gautier wrote may cause problems for some compilers, and I wouldn't 
worry about it.  (Especially since I'm probably the guy who wrote the 
test that shot them down in Ada 83 if they did allow it.)  But the 
example as posted is legal Ada 83 and Ada 95.

> My point was as follows. If you use "use" without preceding it with
> "with" (no pun intended), the compiler will obviously squawk at you.
> The compiler is telling you that you should have had a "with"
> statement. In other words, the compiler is telling that "use"
> *requires* "with". So in a sense, it implies it. It was a poor way to
> make the point. Please forget I wrote it.

I can't forget it.  Because Ada doesn't work that way.  In Ada with and 
use have two different meanings, different scopes where they are allowed 
and in some cases different rules for name resolution.  There is a whole 
clause of the RM 10.1.6 Environment-Level Visibility Rules, that 
discusses SOME of these differences.

You probably don't need to read this section, or even think about for 
most Ada programming.  The principle of least surprise that was used in 
developing these rules make it unlikely that a programmer will ever run 
into a case where the rules don't match his or her expectations.  But 
langauge-lawyers and compiler developers need to pay close attention to 
this section and others.  I have seen several posts that confused these 
rules badly.  (In both senses of the word confused.)

Note that 10.1.6(2) gives the visibility rules within use clauses, and 
10.1.6(3) the visibility rules within pragmas and use clauses in context 
clauses.  They are different.  They have to be different.  There are 
lots of with and use clauses where a "with and use" construct could be 
made to work--and most programmers would be happy with such a construct 
having 10.1.6(2) type visibility.  But there are lots of existing 
pragmas and use clauses in existing code that depend on 10.1.6(3) type 
visibility and I see no justification for breaking all that code.

For example I have some code that says:

with Float_Complex; use type Float_Complex.Complex;

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16 14:59                                                                   ` Gautier Write-only
@ 2003-11-16 19:39                                                                     ` Robert I. Eachus
  2003-11-16 21:04                                                                     ` Wes Groleau
  1 sibling, 0 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-16 19:39 UTC (permalink / raw)


Gautier wrote:

>>However, it wasn't your sample that found the bug.
>>
>>You posted
>>
>>   package body Outer is
>>     use Inner;
>>
>>He changed it to
>>
>>   use Outer.Inner;
>>   package body Outer is
> 
> 
> Thank you for the precision.

I know, I was trying to write in the non-compiler testing mode.  Gautier 
changed it to what I originally thought, then decided this was a 
language discussion not a compiler torture test.

> I'm curious to know who's right on the changed example: GNAT or ObjectAda ?
> GNAT compiles, OA says:
> 
> outer.adb: Error: line 1 col 6 LRM:4.1(3), Direct name, Outer, is not visible, Ignoring future references 

I guess I'd have to say that the reference in OA is definitely wrong, it 
should be referencing 10.1.6(3).

But GNAT is definitely wrong.  Only the names made visible or directly 
visible by previous with clauses in the same context clause are visible 
in a use clause of the context clause.

-- 
 
Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  7:01                                                                     ` Russ
@ 2003-11-16 20:02                                                                       ` Chad R. Meiners
  0 siblings, 0 replies; 223+ messages in thread
From: Chad R. Meiners @ 2003-11-16 20:02 UTC (permalink / raw)



"Russ" <18k11tm001@sneakemail.com> wrote in message
news:bebbba07.0311152301.33340240@posting.google.com...
> "Chad R. Meiners" <crmeiners@hotmail.com> wrote in message
news:<bp6neb$1eo$1@msunews.cl.msu.edu>...
> > "Russ" <18k11tm001@sneakemail.com> wrote in message
> > news:bebbba07.0311151412.6bf52757@posting.google.com...
>
> On this post I would agree that you have. However, your previous post
> was more than a little patronizing. I think you will find that most
> people naturally resent being patronized and lectured to. Then again,
> maybe I deserved it. On the other hand, I think there's a tendency
> here to mistake impassioned debate with a personal attack.

True, it is difficult to gauge how people will read what you write.

> In any case, I guess we'll just have to "agree to disagree" on this
> one, because I simply cannot agree with your position. As I wrote
> before, Python has
>
>    import math # equivalent to Ada "with"
>
> and
>
>    from math import * # equivalent to Ada "use"
>
> and you do not need to precede the latter with the former. The latter
> stands alone perfectly well. As far as I know, this has never been
> called "inconsistent" or considered even a minor issue in the Python
> community. It's a complete non-issue, and I'll bet that if I clained
> on comp.lang.python that this is somehow inconsistent or error prone,
> people there would consider me a nut case.

Yes, this is a case were we need to step back from the argument and let a
little time pass so that we can gather more experience.

> Yes, I realize that Ada is not Python, and Ada is intended for safety
> critical code and Python is not. However, the safety of Ada does not
> come from redundant "with" and "use". Purists who think otherwise
> remind me of military purists.

And here is the irony.  I am not a language purist. ;-)  I usually try to
seek optimal configurations (I think you see yourself in this way, too;
hence, the irony).  This is why I like Ada; it feels very close to an
optimal language.  I think you will agree that when you are doing further
optimizations that you have to be really careful not to take steps
backwards.  Anyway, most of the program I write are not really safety
dependent.  Well I like to feel safe from my tools crashing unexpectedly in
front of important people. ;-)

> In bootcamp they force you to keep your
> shoes shiny and your uniform folded perfectly. Why? Because it
> establishes discipline. Do shiny shoes make you a more effective
> fighter? Of course not.

Well ....  I have noticed that people that have shiny shoes and perfectly
folded uniforms can take pride in this.  This pride helps self-esteem, which
improves the troops moral.  Troops with high moral are way more effective
than troops with low moral.

Note that my argument is rather holistic in that considers the effect in
whole environment.  Naturally, it does not always apply, and this is where
purists shall get unreasonable.

> But try to argue that with a marine DI. It
> would be very much like arguing here that redundant "with" and "use"
> does not make your code "safer" or more reliable. You just cannot
> penetrate a certain mindset.

Well grant you that it depends on the DI.  I would think that a good DI
would recognized when the shining of shoes won't help to make a better
soldier.  However, that would probably exclude good DIs from being purists,
but I can definitely see the an average DI could very well be a purist.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16 14:59                                                                   ` Gautier Write-only
  2003-11-16 19:39                                                                     ` Robert I. Eachus
@ 2003-11-16 21:04                                                                     ` Wes Groleau
  1 sibling, 0 replies; 223+ messages in thread
From: Wes Groleau @ 2003-11-16 21:04 UTC (permalink / raw)


Gautier Write-only wrote:
> I'm curious to know who's right on the changed example: GNAT or ObjectAda ?
> GNAT compiles, OA says:
> 
> outer.adb: Error: line 1 col 6 LRM:4.1(3), Direct name, Outer, is not visible, Ignoring future references 

I'm curious too.  I'm tempted to say OA is wrong.
I remember once having Verdix refuse to allow referencing

    Proc.Vrbl

within the body of Proc.Func

and that was ruled a bug.

-- 
Wes Groleau
    "Would the prodigal have gone home if
     the elder brother was running the farm?"
                       -- James Jordan




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16 19:31                                                                   ` Robert I. Eachus
@ 2003-11-17  1:34                                                                     ` Robert I. Eachus
  0 siblings, 0 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-17  1:34 UTC (permalink / raw)


Oops!

Robert I. Eachus wrote:

> Note that 10.1.6(2) gives the visibility rules within use clauses, and 
...within WITH clauses,...

> 10.1.6(3) the visibility rules within pragmas and use clauses in context 
> clauses.  They are different.  They have to be different.  There are 
> lots of with and use clauses where a "with and use" construct could be 
> made to work--and most programmers would be happy with such a construct 
> having 10.1.6(2) type visibility.  But there are lots of existing 
> pragmas and use clauses in existing code that depend on 10.1.6(3) type 
> visibility and I see no justification for breaking all that code.

Well at least I didn't try to say, "...used within with clauses..." 
even if I got that right, who would understand it?

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-16  0:02                                                                   ` Robert I. Eachus
  2003-11-16 10:41                                                                     ` Gautier Write-only
@ 2003-11-17  9:04                                                                     ` Dmitry A. Kazakov
  2003-11-17 14:38                                                                       ` Robert I. Eachus
  1 sibling, 1 reply; 223+ messages in thread
From: Dmitry A. Kazakov @ 2003-11-17  9:04 UTC (permalink / raw)


On Sat, 15 Nov 2003 19:02:34 -0500, "Robert I. Eachus"
<rieachus@comcast.net> wrote:

>No I look at the "with implies use" proposal and get a splitting 
>headache when thinking about how it could be worded.  Answer me just one 
>little problem, and I might think about it:
>
>use Foo; use Bar;
>package...
>
>Now if there is a package Foo and it contains a package Bar, and there 
>is a package Bar in the compilation environment, which one do you get if 
>any, and why?

Exactly the same Ada would do. The effect should be defined to be
literally same as for:

with Foo; use Foo; with Bar; use Bar;

So Foo.Bar cannot play any role here. Note that the proposal says
*implies* "with Bar;". After all Foo.Bar cannot be "with"-ed and thus
cannot be implied.

So far I see no problems with this proposal.

--
Regards,
Dmitry Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-14 14:51                                                           ` Warren W. Gay VE3WWG
@ 2003-11-17  9:22                                                             ` Dmitry A. Kazakov
  2003-11-17 16:42                                                               ` Warren W. Gay VE3WWG
  0 siblings, 1 reply; 223+ messages in thread
From: Dmitry A. Kazakov @ 2003-11-17  9:22 UTC (permalink / raw)


On Fri, 14 Nov 2003 09:51:33 -0500, "Warren W. Gay VE3WWG"
<ve3wwg@cogeco.ca> wrote:

>Dmitry A. Kazakov wrote:
>> On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG"
>> <ve3wwg@cogeco.ca> wrote:
>> 
>>>I agree with this whole-heartedly for anything more than
>>>a simple "hello world" program. This keeps the name
>>>clashes to a minimum, and it prevents unintended
>>>references to functions/procedures in the wrong package.
>>>There may be some exceptions to this, but these should be
>>>kept to a bare minimum, IMHO.
>> 
>> Does anybody a statistics of name clashes in Ada?
>
>I don't have statistics to offer, but here is one that
>I regularly run into (and there are others like this
>one):
>
>USE ADA.STRINGS;
>
>If this is done in the wrong place (like at the top), then
>then the names Left and Right come into conflict (ie.
>Ada.Strings.Left). Left and Right are perfectly acceptable
>names to use in programming.
>
> >What percent is caused by the language design problems:
>...
> >I have a feeling that hatred towards "use" is largely caused by
> >outside reasons like A. and B.
>
>I think we have to remember that USE is primarily a language
>construct for convenience. It is strictly unnecessary for
>writing a program successfully. It only saves the program
>writer (and reader) from having to specify (or read) the entire
>hierarchical name.

After all Ada itself is just for convenience. We can still use
hexadecimal machine codes! (:-))

Let me propose a design principle for all standard and semi-standard
Ada libraries:

"Any program should remain compilable if all of them are "use"-d."
 
Scared? (:-))

>Misuse that convenience, and you'll experience problems.
>Conclusion: there is nothing wrong with the language
>feature, but only the application thereof. ;-)

There should be something wrong with the language, if the following is
illegal:

with Ada.Io_Exceptions;
package A is
   End_Error : exception renames Ada.Io_Exceptions.End_Error;
end A;

with Ada.Io_Exceptions;
package B is
   End_Error : exception renames Ada.Io_Exceptions.End_Error;
end B;

with A; use A;
with B; use B;
procedure Test1 is
begin
   null;
exception
   when End_Error =>
      -- Compile error! A.End_Error clashes with B.End_Error
      null;
end Test1;

--
Regards,
Dmitry Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-17  9:04                                                                     ` Dmitry A. Kazakov
@ 2003-11-17 14:38                                                                       ` Robert I. Eachus
  2003-11-17 19:40                                                                         ` Russ
  2003-11-18  8:35                                                                         ` Dmitry A. Kazakov
  0 siblings, 2 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-17 14:38 UTC (permalink / raw)


Dmitry A. Kazakov wrote:

> Exactly the same Ada would do. The effect should be defined to be
> literally same as for:
> 
> with Foo; use Foo; with Bar; use Bar;
> 
> So Foo.Bar cannot play any role here. Note that the proposal says
> *implies* "with Bar;". After all Foo.Bar cannot be "with"-ed and thus
> cannot be implied.

And that is exactly the problem.  I am sorry you don't see it.  The with 
clause has an effect on visibility that includes the use clause. 
Current use clauses have a different scope.  So if I see:

with Foo; use Foo.Bar;

which is currently legal and meaningful, what does your proposal do?

The only choices I see are:

1) The new rule you are proposing makes lots of existing legal Ada 
programs illegal.

2) That use clauses in context clauses are interpreted specially.  First 
applying one set of visibility and name resolution rules, then if that 
fails silently applying another.

3) Retain the current meaning of a use clause in a context clause, and 
add a new context clause choice (I have been using "with and use") that 
has the new meaning.

To me option 1) is something that simply won't happen without a clear 
and convincing need, and case 2) is worse.  Do you have an option 4) 
that I am unaware of?  If not maybe you can now see why I think the 
choice is between some veriation of 3) and no change.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-17  9:22                                                             ` Dmitry A. Kazakov
@ 2003-11-17 16:42                                                               ` Warren W. Gay VE3WWG
  2003-11-18  8:49                                                                 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-11-17 16:42 UTC (permalink / raw)


Dmitry A. Kazakov wrote:
> On Fri, 14 Nov 2003 09:51:33 -0500, "Warren W. Gay VE3WWG"
> <ve3wwg@cogeco.ca> wrote:
>>Dmitry A. Kazakov wrote:
>>>On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG"
>>><ve3wwg@cogeco.ca> wrote:
...
>>I think we have to remember that USE is primarily a language
>>construct for convenience. It is strictly unnecessary for
>>writing a program successfully. It only saves the program
>>writer (and reader) from having to specify (or read) the entire
>>hierarchical name.
> 
> After all Ada itself is just for convenience. We can still use
> hexadecimal machine codes! (:-))

That's silly, but I see the smiley.

> Let me propose a design principle for all standard and semi-standard
> Ada libraries:
> 
> "Any program should remain compilable if all of them are "use"-d."
>  
> Scared? (:-))
> 
>>Misuse that convenience, and you'll experience problems.
>>Conclusion: there is nothing wrong with the language
>>feature, but only the application thereof. ;-)
> 
> There should be something wrong with the language, if the following is
> illegal:
> 
> with Ada.Io_Exceptions;
> package A is
>    End_Error : exception renames Ada.Io_Exceptions.End_Error;
> end A;
> 
> with Ada.Io_Exceptions;
> package B is
>    End_Error : exception renames Ada.Io_Exceptions.End_Error;
> end B;

This is more sillyness. When you USE both packages, you take
a hierarchical name space and flatten it. So what else would
you expect if there were clashes?

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-17 14:38                                                                       ` Robert I. Eachus
@ 2003-11-17 19:40                                                                         ` Russ
  2003-11-18 17:01                                                                           ` Robert I. Eachus
  2003-11-18  8:35                                                                         ` Dmitry A. Kazakov
  1 sibling, 1 reply; 223+ messages in thread
From: Russ @ 2003-11-17 19:40 UTC (permalink / raw)


"Robert I. Eachus" <rieachus@comcast.net> wrote in message news:<UJ6dnbqzUrXhQCWiRVn-gQ@comcast.com>...
> Dmitry A. Kazakov wrote:
> 
> > Exactly the same Ada would do. The effect should be defined to be
> > literally same as for:
> > 
> > with Foo; use Foo; with Bar; use Bar;
> > 
> > So Foo.Bar cannot play any role here. Note that the proposal says
> > *implies* "with Bar;". After all Foo.Bar cannot be "with"-ed and thus
> > cannot be implied.
> 
> And that is exactly the problem.  I am sorry you don't see it.  The with 
> clause has an effect on visibility that includes the use clause. 
> Current use clauses have a different scope.  So if I see:
> 
> with Foo; use Foo.Bar;
> 
> which is currently legal and meaningful, what does your proposal do?

Not being an Ada programmer, I did not even know off the top of my
head that "with Foo.Bar" is illegal. I'm at work, and my Ada books are
at home, so let me ask a "newbie" question. Am I correct in assuming
that "use Foo.Bar" *must* be preceded by "with Foo"? More
specifically, am I correct in assuming that "use Foo.<anything>"
*must* be preceded by "with Foo"?

If so, then the solution seems trivial to me. Let any occurence of
"use Foo.<anything>" in the context section imply "with Foo". That is,
for any "use" in the context section, simply take its argument and
strip off the first "." and anything that follows it, then use that as
the argument to the implied "with".

If not, I guess I just made a fool of myself. Oh well.



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-04 16:08                         ` Marius Amado Alves
  2003-11-06 10:10                           ` Preben Randhol
@ 2003-11-18  0:07                           ` Brian Gaffney
  2003-11-18  1:25                             ` Stephane Richard
  2003-11-18  8:50                             ` Marius Amado Alves
  1 sibling, 2 replies; 223+ messages in thread
From: Brian Gaffney @ 2003-11-18  0:07 UTC (permalink / raw)


"Marius Amado Alves" <amado.alves@netcabo.pt> wrote in message
news:mailman.274.1067962159.25614.comp.lang.ada@ada-france.org...
> How about
>
>   with ...; use idem;
>
Now where is that darned Idem.ads?





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18  0:07                           ` Brian Gaffney
@ 2003-11-18  1:25                             ` Stephane Richard
  2003-11-18  8:50                             ` Marius Amado Alves
  1 sibling, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-18  1:25 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 514 bytes --]


"Brian Gaffney" <brian.gaffney@myrealbox.com> wrote in message
news:bpbnq4$ccl$1@news.wplus.net...
> "Marius Amado Alves" <amado.alves@netcabo.pt> wrote in message
> news:mailman.274.1067962159.25614.comp.lang.ada@ada-france.org...
> > How about
> >
> >   with ...; use idem;
> >
> Now where is that darned Idem.ads?
>
>

I'm not sure where it is....but when you find it, you should probably find
the DWIM (Do What I Mean) procedure ;-)


-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com






^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-17 14:38                                                                       ` Robert I. Eachus
  2003-11-17 19:40                                                                         ` Russ
@ 2003-11-18  8:35                                                                         ` Dmitry A. Kazakov
  1 sibling, 0 replies; 223+ messages in thread
From: Dmitry A. Kazakov @ 2003-11-18  8:35 UTC (permalink / raw)


On Mon, 17 Nov 2003 09:38:50 -0500, "Robert I. Eachus"
<rieachus@comcast.net> wrote:

>Dmitry A. Kazakov wrote:
>
>> Exactly the same Ada would do. The effect should be defined to be
>> literally same as for:
>> 
>> with Foo; use Foo; with Bar; use Bar;
>> 
>> So Foo.Bar cannot play any role here. Note that the proposal says
>> *implies* "with Bar;". After all Foo.Bar cannot be "with"-ed and thus
>> cannot be implied.
>
>And that is exactly the problem.  I am sorry you don't see it.  The with 
>clause has an effect on visibility that includes the use clause. 
>Current use clauses have a different scope.  So if I see:
>
>with Foo; use Foo.Bar;
>
>which is currently legal and meaningful, what does your proposal do?
>
>The only choices I see are:
>
>1) The new rule you are proposing makes lots of existing legal Ada 
>programs illegal.
>
>2) That use clauses in context clauses are interpreted specially.  First 
>applying one set of visibility and name resolution rules, then if that 
>fails silently applying another.
>
>3) Retain the current meaning of a use clause in a context clause, and 
>add a new context clause choice (I have been using "with and use") that 
>has the new meaning.
>
>To me option 1) is something that simply won't happen without a clear 
>and convincing need, and case 2) is worse.  Do you have an option 4) 
>that I am unaware of?  If not maybe you can now see why I think the 
>choice is between some veriation of 3) and no change.

2. However I would not call it another set of resolution rules. At
least it is not much different from:

with Foo.Bar;

The compiler should first "imply" with Foo; and only then figure out
what Foo.Bar might be. In the case

with Foo; use Foo.Bar;

Foo.Bar is not a library unit, so it cannot be implied. Formally we
could appropriately extend 10.1.2(6). It refers to "library_item".
Thus it cannot be applied to Foo.Bar, which is not a library item. A
bit tricky, I should admit, but well in ARM style. (:-))

-----------
Well, option 4, scratching my scalp ... we could allow all packages to
be "with"-ed:

package A is
   package B is ...
   end B;
   with B; -- This is OK and does nothing
end A;

So:

with Foo.Bar; -- This would be legal

--
Regards,
Dmitry Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-17 16:42                                                               ` Warren W. Gay VE3WWG
@ 2003-11-18  8:49                                                                 ` Dmitry A. Kazakov
  2003-11-19 17:46                                                                   ` Warren W. Gay VE3WWG
  0 siblings, 1 reply; 223+ messages in thread
From: Dmitry A. Kazakov @ 2003-11-18  8:49 UTC (permalink / raw)


On Mon, 17 Nov 2003 11:42:45 -0500, "Warren W. Gay VE3WWG"
<ve3wwg@cogeco.ca> wrote:

>Dmitry A. Kazakov wrote:
>> On Fri, 14 Nov 2003 09:51:33 -0500, "Warren W. Gay VE3WWG"
>> <ve3wwg@cogeco.ca> wrote:
>>>Dmitry A. Kazakov wrote:
>>>>On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG"
>>>><ve3wwg@cogeco.ca> wrote:
>...
>> There should be something wrong with the language, if the following is
>> illegal:
>> 
>> with Ada.Io_Exceptions;
>> package A is
>>    End_Error : exception renames Ada.Io_Exceptions.End_Error;
>> end A;
>> 
>> with Ada.Io_Exceptions;
>> package B is
>>    End_Error : exception renames Ada.Io_Exceptions.End_Error;
>> end B;
>
>This is more sillyness. When you USE both packages, you take
>a hierarchical name space and flatten it. So what else would
>you expect if there were clashes?

I expect renaming be renaming. So A.End_Error and B.End_Error should
not clash in any context. Compare it with :

package A is
   X : Integer;
end A;

with A;
package B renames A;

with A; use A;
with B; use B;
procedure Test is
begin
   X := 1; -- This is OK
end Test;

This example illustrates the fact that package renaming *is* a
renaming.

The example with End_Error shows that object renaming is something
very different.

--
Regards,
Dmitry Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18  0:07                           ` Brian Gaffney
  2003-11-18  1:25                             ` Stephane Richard
@ 2003-11-18  8:50                             ` Marius Amado Alves
  2003-11-18 10:43                               ` Preben Randhol
  1 sibling, 1 reply; 223+ messages in thread
From: Marius Amado Alves @ 2003-11-18  8:50 UTC (permalink / raw)
  To: Brian Gaffney; +Cc: comp.lang.ada

On Tue, 2003-11-18 at 00:07, Brian Gaffney wrote:
> "Marius Amado Alves" <amado.alves@netcabo.pt> wrote:
> > How about
> >
> >   with ...; use idem;
> >
> Now where is that darned Idem.ads?

I know :-)
That's why I'd prefer @.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18  8:50                             ` Marius Amado Alves
@ 2003-11-18 10:43                               ` Preben Randhol
  2003-11-18 10:58                                 ` Marius Amado Alves
  0 siblings, 1 reply; 223+ messages in thread
From: Preben Randhol @ 2003-11-18 10:43 UTC (permalink / raw)


On 2003-11-18, Marius Amado Alves <amado.alves@netcabo.pt> wrote:
> On Tue, 2003-11-18 at 00:07, Brian Gaffney wrote:
>> "Marius Amado Alves" <amado.alves@netcabo.pt> wrote:
>> > How about
>> >
>> >   with ...; use idem;
>> >
>> Now where is that darned Idem.ads?
>
> I know :-)
> That's why I'd prefer @.

with Gtk.Arguments;        use @;
with Gtk.Button;           use @;
with Gtk.Handlers;

or

with Gtk.Arguments;
with Gtk.Button;
with Gtk.Handlers;
use @;
use @;

no thanks.

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18 10:43                               ` Preben Randhol
@ 2003-11-18 10:58                                 ` Marius Amado Alves
  2003-11-18 11:33                                   ` Preben Randhol
  0 siblings, 1 reply; 223+ messages in thread
From: Marius Amado Alves @ 2003-11-18 10:58 UTC (permalink / raw)
  To: comp.lang.ada

On Tue, 2003-11-18 at 10:43, Preben Randhol wrote:
> with Gtk.Arguments;        use @;
> with Gtk.Button;           use @;
> with Gtk.Handlers;

I like it.

> with Gtk.Arguments;
> with Gtk.Button;
> with Gtk.Handlers;
> use @;
> use @;

That would be equivalent to

with Gtk.Arguments;
with Gtk.Button;
with Gtk.Handlers;
use Gtk.Handlers;
use Gtk.Handlers;

which I'm not sure would even compile.

But as I said before this is strictly 'academic'. I'm quite happy with
Ada 95 as it is now with respect to this.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18 10:58                                 ` Marius Amado Alves
@ 2003-11-18 11:33                                   ` Preben Randhol
  2003-11-18 12:11                                     ` Marius Amado Alves
  2003-11-18 12:33                                     ` Stephane Richard
  0 siblings, 2 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-18 11:33 UTC (permalink / raw)


On 2003-11-18, Marius Amado Alves <amado.alves@netcabo.pt> wrote:
> On Tue, 2003-11-18 at 10:43, Preben Randhol wrote:
>> with Gtk.Arguments;        use @;
>> with Gtk.Button;           use @;
>> with Gtk.Handlers;
>
> I like it.
>
>> with Gtk.Arguments;
>> with Gtk.Button;
>> with Gtk.Handlers;
>> use @;
>> use @;
>
> That would be equivalent to
>
> with Gtk.Arguments;
> with Gtk.Button;
> with Gtk.Handlers;
> use Gtk.Handlers;
> use Gtk.Handlers;
>
> which I'm not sure would even compile.

My point is that since:

   with Something;
   use Something;
 
are two differnet sentences and the last can appear anywhere the whole
idem or @ is just silly. Besides all it saves is keystrokes, and that is
....

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18 11:33                                   ` Preben Randhol
@ 2003-11-18 12:11                                     ` Marius Amado Alves
  2003-11-18 13:46                                       ` Preben Randhol
  2003-11-20  3:53                                       ` Brian Gaffney
  2003-11-18 12:33                                     ` Stephane Richard
  1 sibling, 2 replies; 223+ messages in thread
From: Marius Amado Alves @ 2003-11-18 12:11 UTC (permalink / raw)
  To: comp.lang.ada

On Tue, 2003-11-18 at 11:33, Preben Randhol wrote:
> My point is that since:
> 
>    with Something;
>    use Something;
>  
> are two differnet sentences and the last can appear anywhere the whole
> idem or @ is just silly. Besides all it saves is keystrokes, and that is
> ....

I don't count keystrokes. My argument is for readability. I actually
find

with Gtk.Arguments;        use @;
with Gtk.Button;           use @;
with Gtk.Handlers;

more readable than the canonical form. And more pleasing, which can also
be a quality factor. Natural language has lots of pronouns for good
reason. And hey I just found motivation for the symbol choice: @ = a =
anaphoric pronoun :-) In the canonical form you must read 2 identifiers
to verify that they are equal. The pronoun has an immediate reading.
It's more communicative, more lingual. Curiously enough when I first
suggested "use @" I was kind of kidding--it was your very example that
made me realise it is actually more readable.





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18 11:33                                   ` Preben Randhol
  2003-11-18 12:11                                     ` Marius Amado Alves
@ 2003-11-18 12:33                                     ` Stephane Richard
  1 sibling, 0 replies; 223+ messages in thread
From: Stephane Richard @ 2003-11-18 12:33 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

"Preben Randhol" <randhol+valid_for_reply_from_news@pvv.org> wrote in
message > are two
> idem or @ is just silly. Besides all it saves is keystrokes, and that is
> ....
>
> -- 

And I quote:

> "Saving keystrokes is the job of the text editor, not the programming
>  language."

:-)
-- 
St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com







^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18 12:11                                     ` Marius Amado Alves
@ 2003-11-18 13:46                                       ` Preben Randhol
  2003-11-20  3:53                                       ` Brian Gaffney
  1 sibling, 0 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-18 13:46 UTC (permalink / raw)


On 2003-11-18, Marius Amado Alves <amado.alves@netcabo.pt> wrote:
> I don't count keystrokes. My argument is for readability. I actually
> find
>
> with Gtk.Arguments;        use @;
> with Gtk.Button;           use @;
> with Gtk.Handlers;

It isn't readable or safe at all as the use statment is dependant on
being at the correct location.

> more readable than the canonical form. And more pleasing, which can also
> be a quality factor. 

I find the @ rather ugly.

> Natural language has lots of pronouns for good reason. And hey I just
> found motivation for the symbol choice: @ = a = anaphoric pronoun :-)

No the @ was used as:

   2 fish @ $1.50 = $3

(at least here in Norway in the old days)

> In the canonical form you must read 2 identifiers to verify that they
> are equal. The pronoun has an immediate reading.  It's more

use at ?

> communicative, more lingual. Curiously enough when I first suggested
> "use @" I was kind of kidding--it was your very example that made me
> realise it is actually more readable.

Well, I don't agree. And I think you would agree on not making the ARM
bigger by a construct which isn't robust at all :-)

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-17 19:40                                                                         ` Russ
@ 2003-11-18 17:01                                                                           ` Robert I. Eachus
  0 siblings, 0 replies; 223+ messages in thread
From: Robert I. Eachus @ 2003-11-18 17:01 UTC (permalink / raw)


Russ wrote:

> Not being an Ada programmer, I did not even know off the top of my
> head that "with Foo.Bar" is illegal. I'm at work, and my Ada books are
> at home, so let me ask a "newbie" question. Am I correct in assuming
> that "use Foo.Bar" *must* be preceded by "with Foo"? More
> specifically, am I correct in assuming that "use Foo.<anything>"
> *must* be preceded by "with Foo"?
> 
> If so, then the solution seems trivial to me. Let any occurence of
> "use Foo.<anything>" in the context section imply "with Foo". That is,
> for any "use" in the context section, simply take its argument and
> strip off the first "." and anything that follows it, then use that as
> the argument to the implied "with".

Unfortunately, it is not that simple.  You can with library units, and 
child packages are library units, while nested packages are not, so 
whether or not with Foo.Bar is legal in theory requires semantic 
analysis, and in practice requires searching the compilation 
environment.  So when you say "with Ada.Text_IO; use Ada.Text_IO;" yes 
there is an (implied) with of Ada, but there is also a with of 
Ada.Text_IO; then the use clause currently ONLY applies to Ada.Text_IO, 
not to Ada.  That is one of the differences I have been talking about.

> If not, I guess I just made a fool of myself. Oh well.

Just the opposite.  Now you are beginning to participate in the real 
discussion of this issue.  Personally, I don't even use a keyboard 
shortcut for the "with Ada.Text_IO; use Ada.Text_IO;" case.  I type fast 
enough, and that is one of the cases where I often do have a use clause 
in the context clause.  In fact, sometimes I get exactly that far then 
spend sometime thinking.  Do I want to create a generic template now, or 
deal with this I/O package separately?  Do I want this package to be the 
child of something, or standalone, etc.

But if there is a problem here, what we need to understand is both what 
are we trying to fix--if anything--and what are the problems that a fix 
must avoid creating.  For me, there are many packages that are 
descendents of Ada for which I almost automatically put a use clause in 
the context clause.  (There are others, such as Ada.Strings.Bounded 
where the use clause has to be for the instance I create.  Since I tend 
to instantiate them inside other library units, the use clause often 
can't go in the context clause.)  But for library units not in Ada, I 
tend to avoid use clauses in context clauses.  Add to that my typing 
speed, and as I said I don't have a problem with the current rules. 
Doesn't mean that others don't, and I certainly won't be opposed to an 
extension that has no significant drawbacks.  I might feel that there 
are other problems that are more pressing--for example the issue of 
mutually dependent abstractions--but that is an issue of prioritization.

-- 
                                           Robert I. Eachus

100% Ada, no bugs--the only way to create software.




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-15 13:04                                                           ` Marin David Condic
@ 2003-11-18 22:45                                                             ` Georg Bauhaus
  0 siblings, 0 replies; 223+ messages in thread
From: Georg Bauhaus @ 2003-11-18 22:45 UTC (permalink / raw)


Marin David Condic <nobody@noplace.com> wrote:
: I tend to like a use clause for things similar to dispatching on a 
: tagged record.

: "Sometimes you want it to look 'intrinsic' and other 
: times you want it explicit that something is external. Hence we added 
: the 'use' when the 'with' alone is really all that is needed."
: 
:> It can, but it doesn't always.  A good example is a group of ADTs that 
:> have display operations.   The display operations belong in the package 
:> with the other operations on the same type, but they may be the only 
:> operation that needs to use Text_IO or some graphics packages.
:> 
:> You can organize things using child packages to segregate the I/O 
:> operations, but you end up with the display operation being the only one 
:> to use the child package.
:> 
:> Instead I usually end up with a generic package that handles the display 
:> operations in a data independent manner, and the individual display 
:> operations instantiate that package.  Now the use clause is for a local 
:> generic instance, but it is still there.

Thanks for the ideas, I'll try them in modules that produce
two different kinds of textual representation of some data structures,
maybe by inspecting the data or maybe having the data print themselves.


Georg



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18  8:49                                                                 ` Dmitry A. Kazakov
@ 2003-11-19 17:46                                                                   ` Warren W. Gay VE3WWG
  2003-11-20  8:26                                                                     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 223+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-11-19 17:46 UTC (permalink / raw)


Dmitry A. Kazakov wrote:

> On Mon, 17 Nov 2003 11:42:45 -0500, "Warren W. Gay VE3WWG"
> <ve3wwg@cogeco.ca> wrote:
> 
>>Dmitry A. Kazakov wrote:
>>
>>>On Fri, 14 Nov 2003 09:51:33 -0500, "Warren W. Gay VE3WWG"
>>><ve3wwg@cogeco.ca> wrote:
>>>
>>>>Dmitry A. Kazakov wrote:
>>>>
>>>>>On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG"
>>>>><ve3wwg@cogeco.ca> wrote:
>>
>>...
>>
>>>There should be something wrong with the language, if the following is
>>>illegal:
>>>
>>>with Ada.Io_Exceptions;
>>>package A is
>>>   End_Error : exception renames Ada.Io_Exceptions.End_Error;
>>>end A;
>>>
>>>with Ada.Io_Exceptions;
>>>package B is
>>>   End_Error : exception renames Ada.Io_Exceptions.End_Error;
>>>end B;
>>
>>This is more sillyness. When you USE both packages, you take
>>a hierarchical name space and flatten it. So what else would
>>you expect if there were clashes?
> 
> 
> I expect renaming be renaming. So A.End_Error and B.End_Error should
> not clash in any context. Compare it with :
> 
> package A is
>    X : Integer;
> end A;
> 
> with A;
> package B renames A;
> 
> with A; use A;
> with B; use B;
> procedure Test is
> begin
>    X := 1; -- This is OK
> end Test;
> 
> This example illustrates the fact that package renaming *is* a
> renaming.
> 
> The example with End_Error shows that object renaming is something
> very different.

OK, I see where you're going with this now. I did overlook
the renames clause. I don't have an issue with this myself,
given that the "ending point" refers to the same thing.

While resolving this specific issue would help, it would not
resolve the general problem with other name clashes.

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-18 12:11                                     ` Marius Amado Alves
  2003-11-18 13:46                                       ` Preben Randhol
@ 2003-11-20  3:53                                       ` Brian Gaffney
  2003-11-20  9:20                                         ` Preben Randhol
  1 sibling, 1 reply; 223+ messages in thread
From: Brian Gaffney @ 2003-11-20  3:53 UTC (permalink / raw)


"Marius Amado Alves" <amado.alves@netcabo.pt> wrote in message
news:mailman.25.1069157542.3110.comp.lang.ada@ada-france.org...
> I don't count keystrokes. My argument is for readability. I actually
> find
>
> with Gtk.Arguments;        use @;
> with Gtk.Button;           use @;
> with Gtk.Handlers;
>
> more readable than the canonical form. And more pleasing, which can also
> be a quality factor. Natural language has lots of pronouns for good
> reason.
In that case shouldn't the above be

   with Gtk.Arguments;        use it;
   with Gtk.Button;           use it;
   with Gtk.Handlers;

(Does this imply we could have

   with Gtk.Arguments, Gtk.Button;  use them;
   with Gtk.Handlers;

:-)

Also, wouldn't

   with use Gtk.Arguments, Gtk.Button;

be cleaner (but less readable) than

   with and use Gtk.Arguments, Gtk.Button;





^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-19 17:46                                                                   ` Warren W. Gay VE3WWG
@ 2003-11-20  8:26                                                                     ` Dmitry A. Kazakov
  0 siblings, 0 replies; 223+ messages in thread
From: Dmitry A. Kazakov @ 2003-11-20  8:26 UTC (permalink / raw)


On Wed, 19 Nov 2003 12:46:23 -0500, "Warren W. Gay VE3WWG"
<ve3wwg@cogeco.ca> wrote:

>Dmitry A. Kazakov wrote:
>
>> On Mon, 17 Nov 2003 11:42:45 -0500, "Warren W. Gay VE3WWG"
>> <ve3wwg@cogeco.ca> wrote:
>> 
>>>Dmitry A. Kazakov wrote:
>>>
>>>>On Fri, 14 Nov 2003 09:51:33 -0500, "Warren W. Gay VE3WWG"
>>>><ve3wwg@cogeco.ca> wrote:
>>>>
>>>>>Dmitry A. Kazakov wrote:
>>>>>
>>>>>>On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG"
>>>>>><ve3wwg@cogeco.ca> wrote:
>>>
>>>...
>>>
>>>>There should be something wrong with the language, if the following is
>>>>illegal:
>>>>
>>>>with Ada.Io_Exceptions;
>>>>package A is
>>>>   End_Error : exception renames Ada.Io_Exceptions.End_Error;
>>>>end A;
>>>>
>>>>with Ada.Io_Exceptions;
>>>>package B is
>>>>   End_Error : exception renames Ada.Io_Exceptions.End_Error;
>>>>end B;
>>>
>>>This is more sillyness. When you USE both packages, you take
>>>a hierarchical name space and flatten it. So what else would
>>>you expect if there were clashes?
>> 
>> 
>> I expect renaming be renaming. So A.End_Error and B.End_Error should
>> not clash in any context. Compare it with :
>> 
>> package A is
>>    X : Integer;
>> end A;
>> 
>> with A;
>> package B renames A;
>> 
>> with A; use A;
>> with B; use B;
>> procedure Test is
>> begin
>>    X := 1; -- This is OK
>> end Test;
>> 
>> This example illustrates the fact that package renaming *is* a
>> renaming.
>> 
>> The example with End_Error shows that object renaming is something
>> very different.
>
>OK, I see where you're going with this now. I did overlook
>the renames clause. I don't have an issue with this myself,
>given that the "ending point" refers to the same thing.
>
>While resolving this specific issue would help, it would not
>resolve the general problem with other name clashes.

I suppose there could be much less name clashes if object renaming be
true renaming and if types could be renamed instead of dubious
"subtype X is Y;"

Further, if all types would be tagged, then almost all non-class-wide
operations would be primitive. So instead of a plethora of
overloadings we would have overridings, which do not clash.

Further, if multiple dispatch would be supported, then many cases of
class-wide subprograms would become primitive operations and again
name clashes would disappear.

--
Regards,
Dmitry Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 223+ messages in thread

* Re: Clause "with and use"
  2003-11-20  3:53                                       ` Brian Gaffney
@ 2003-11-20  9:20                                         ` Preben Randhol
  0 siblings, 0 replies; 223+ messages in thread
From: Preben Randhol @ 2003-11-20  9:20 UTC (permalink / raw)


On 2003-11-20, Brian Gaffney <brian.gaffney@myrealbox.com> wrote:
> In that case shouldn't the above be
>
>    with Gtk.Arguments;        use it;
>    with Gtk.Button;           use it;
>    with Gtk.Handlers;

no no no you would have to have something like you suggest below: with
and use.

But I still lack any explanation as to WHY we need this? I do not
understand at all why this is an imporant issue at all.

>    with and use Gtk.Arguments, Gtk.Button;


-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 223+ messages in thread

end of thread, other threads:[~2003-11-20  9:20 UTC | newest]

Thread overview: 223+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-06  8:39 Clause "with and use" christoph.grein
2003-11-07  8:07 ` Intelligence, was: " Anders Wirzenius
2003-11-07 10:54   ` Dmitry A. Kazakov
2003-11-07 11:54     ` Anders Wirzenius
2003-11-07 13:34       ` Dmitry A. Kazakov
2003-11-07 15:57   ` Frank J. Lhota
2003-11-07 16:18     ` Stephane Richard
  -- strict thread matches above, loose matches on Subject: below --
2003-11-06 11:11 amado.alves
2003-11-03 11:02 christoph.grein
2003-10-31 21:02 Gautier Write-only
2003-10-31 21:51 ` Warren W. Gay VE3WWG
2003-10-31 22:29 ` Randy Brukardt
2003-11-01 13:39   ` Gautier Write-only
2003-11-01 14:32     ` Marius Amado Alves
2003-11-01 16:23       ` Gautier Write-only
2003-11-01 19:59         ` Marius Amado Alves
2003-11-01  3:39 ` Alexandre E. Kopilovitch
2003-11-02 12:03   ` Stephane Richard
2003-11-03  2:26     ` Alexandre E. Kopilovitch
2003-11-01  4:07 ` Alexandre E. Kopilovitch
2003-11-03  8:22   ` Lutz Donnerhacke
2003-11-03 17:37     ` Alexandre E. Kopilovitch
2003-11-01  7:09 ` Russ
2003-11-01 10:29   ` Pascal Obry
2003-11-01 11:57     ` Marius Amado Alves
2003-11-01 13:24     ` Gautier Write-only
2003-11-01 22:12       ` Pascal Obry
2003-11-02 10:45         ` Stephane Richard
2003-11-02 11:34           ` Preben Randhol
2003-11-02 12:04             ` Stephane Richard
2003-11-02 13:03             ` Marin David Condic
2003-11-02 13:10               ` Stephane Richard
     [not found]               ` <pn4g71-ned.ln1@beastie.ix.netcom.com>
2003-11-02 22:25                 ` Marin David Condic
2003-11-04 17:25                   ` Warren W. Gay VE3WWG
2003-11-03 14:36               ` Preben Randhol
2003-11-04  9:57                 ` Marin David Condic
2003-11-04 11:22                   ` Preben Randhol
2003-11-04 12:45                     ` Marin David Condic
2003-11-04 15:46                       ` Wes Groleau
2003-11-04 16:08                         ` Marius Amado Alves
2003-11-06 10:10                           ` Preben Randhol
2003-11-18  0:07                           ` Brian Gaffney
2003-11-18  1:25                             ` Stephane Richard
2003-11-18  8:50                             ` Marius Amado Alves
2003-11-18 10:43                               ` Preben Randhol
2003-11-18 10:58                                 ` Marius Amado Alves
2003-11-18 11:33                                   ` Preben Randhol
2003-11-18 12:11                                     ` Marius Amado Alves
2003-11-18 13:46                                       ` Preben Randhol
2003-11-20  3:53                                       ` Brian Gaffney
2003-11-20  9:20                                         ` Preben Randhol
2003-11-18 12:33                                     ` Stephane Richard
2003-11-04 17:37                   ` Warren W. Gay VE3WWG
2003-11-05 19:08                     ` Russ
2003-11-05 21:11                       ` Mark Lorenzen
2003-11-06  3:10                         ` Russ
2003-11-06  8:26                           ` Vinzent 'Gadget' Hoefler
2003-11-06 18:52                             ` Russ
2003-11-06 20:03                               ` Martin Dowie
2003-11-07  0:22                                 ` Robert I. Eachus
2003-11-07  7:02                                   ` Martin Dowie
2003-11-07 19:04                                     ` Robert I. Eachus
2003-11-07 19:23                                       ` Martin Dowie
2003-11-07 19:38                                         ` Robert I. Eachus
2003-11-07 22:46                                           ` Martin Dowie
2003-11-09  6:49                                             ` Robert I. Eachus
2003-11-07  5:04                                 ` Russ
2003-11-07 20:31                                 ` Russ
2003-11-07 22:59                                   ` Martin Dowie
2003-11-07 23:33                                     ` Martin Dowie
2003-11-08  8:22                                     ` Russ
2003-11-08  9:04                                       ` Martin Dowie
2003-11-09  6:59                                   ` Robert I. Eachus
2003-11-09 14:27                                   ` Martin Dowie
2003-11-10  7:47                               ` Vinzent 'Gadget' Hoefler
2003-11-06 11:53                           ` Stephane Richard
2003-11-06 13:36                             ` Marin David Condic
2003-11-07  1:15                               ` Stephane Richard
2003-11-07  0:09                           ` Mark Lorenzen
2003-11-05 21:20                       ` Warren W. Gay VE3WWG
2003-11-05 21:48                       ` Alexandre E. Kopilovitch
2003-11-03  5:59           ` Russ
2003-11-03 14:32             ` Preben Randhol
2003-11-03 22:11               ` Gautier Write-only
2003-11-04 10:58                 ` Preben Randhol
2003-11-04 13:16                   ` Hyman Rosen
2003-11-04 15:09                     ` Vinzent 'Gadget' Hoefler
2003-11-04 15:49                     ` Wes Groleau
2003-11-06 10:55                     ` Preben Randhol
2003-11-06 13:03                       ` Hyman Rosen
2003-11-06 15:35                         ` Preben Randhol
2003-11-06 17:26                         ` Warren W. Gay VE3WWG
2003-11-06 20:38                           ` Gautier Write-only
2003-11-06 21:12                             ` Warren W. Gay VE3WWG
2003-11-07  7:08                             ` Russ
2003-11-07  8:48                             ` Preben Randhol
2003-11-08 10:56                               ` Gautier Write-only
2003-11-08 11:35                                 ` Preben Randhol
2003-11-11 22:28                                   ` Gautier Write-only
2003-11-12 12:42                                     ` Preben Randhol
2003-11-08 19:40                                 ` Russ
2003-11-10  7:38                                   ` Preben Randhol
2003-11-10 13:03                                     ` Marin David Condic
2003-11-10 13:19                                       ` Preben Randhol
2003-11-10 13:38                                         ` Marin David Condic
2003-11-11  7:20                                       ` Russ
2003-11-11  8:12                                         ` Preben Randhol
2003-11-11 19:43                                           ` Russ
2003-11-12 12:35                                             ` Preben Randhol
2003-11-11  8:31                                         ` Preben Randhol
2003-11-11  8:57                                           ` Vinzent 'Gadget' Hoefler
2003-11-11 10:10                                             ` Marin David Condic
2003-11-11 10:49                                               ` Stephane Richard
2003-11-11 14:17                                               ` Vinzent 'Gadget' Hoefler
2003-11-11 15:36                                                 ` Wes Groleau
2003-11-11 16:08                                                   ` Preben Randhol
2003-11-11 16:24                                                   ` Vinzent 'Gadget' Hoefler
2003-11-12 12:01                                                     ` Marin David Condic
2003-11-12 13:07                                                       ` Vinzent 'Gadget' Hoefler
2003-11-13 12:12                                                         ` Marin David Condic
2003-11-13 22:04                                                           ` Wes Groleau
2003-11-14  4:16                                                             ` Marin David Condic
2003-11-12 11:55                                                 ` Marin David Condic
2003-11-12 13:10                                                   ` Vinzent 'Gadget' Hoefler
2003-11-11 19:49                                               ` Russ
2003-11-11 20:35                                             ` Russ
2003-11-11 22:06                                               ` Mark Lorenzen
2003-11-11 22:08                                               ` Vinzent 'Gadget' Hoefler
2003-11-11 22:20                                                 ` Gautier Write-only
2003-11-11 22:38                                                   ` Vinzent 'Gadget' Hoefler
2003-11-12 12:46                                                     ` Preben Randhol
2003-11-13  7:26                                                     ` Russ
2003-11-13 19:59                                                       ` Chad R. Meiners
2003-11-14  5:09                                                         ` Robert I. Eachus
2003-11-14  6:47                                                           ` Chad R. Meiners
2003-11-14  5:45                                                         ` Russ
2003-11-14  7:51                                                           ` Chad R. Meiners
2003-11-14  7:51                                                           ` Chad R. Meiners
2003-11-14  7:51                                                           ` Chad R. Meiners
2003-11-14 23:23                                                             ` Russ
2003-11-15  4:39                                                               ` Chad R. Meiners
2003-11-15 11:35                                                                 ` Stephane Richard
2003-11-15 12:53                                                                   ` Marin David Condic
2003-11-16  0:36                                                                     ` Russ
2003-11-16  2:38                                                                       ` Chad R. Meiners
2003-11-16  0:19                                                                   ` Russ
2003-11-16  1:41                                                                     ` Stephane Richard
2003-11-16  2:11                                                                       ` Frank J. Lhota
2003-11-16  2:28                                                                         ` Stephane Richard
2003-11-16 14:04                                                                         ` Hyman Rosen
2003-11-16  6:15                                                                       ` Russ
2003-11-16 14:00                                                                       ` Hyman Rosen
2003-11-16 13:56                                                                     ` Hyman Rosen
2003-11-15 22:12                                                                 ` Russ
2003-11-16  2:29                                                                   ` Chad R. Meiners
2003-11-16  7:01                                                                     ` Russ
2003-11-16 20:02                                                                       ` Chad R. Meiners
2003-11-15 15:19                                                               ` Robert I. Eachus
2003-11-15 16:15                                                                 ` Gautier Write-only
2003-11-15 19:44                                                                   ` Frank J. Lhota
2003-11-16  0:02                                                                   ` Robert I. Eachus
2003-11-16 10:41                                                                     ` Gautier Write-only
2003-11-17  9:04                                                                     ` Dmitry A. Kazakov
2003-11-17 14:38                                                                       ` Robert I. Eachus
2003-11-17 19:40                                                                         ` Russ
2003-11-18 17:01                                                                           ` Robert I. Eachus
2003-11-18  8:35                                                                         ` Dmitry A. Kazakov
2003-11-16  5:55                                                                 ` Russ
2003-11-16 19:31                                                                   ` Robert I. Eachus
2003-11-17  1:34                                                                     ` Robert I. Eachus
2003-11-15 16:40                                                             ` Gautier Write-only
2003-11-16  0:25                                                               ` Robert I. Eachus
2003-11-16  1:20                                                                 ` Wes Groleau
2003-11-16 14:59                                                                   ` Gautier Write-only
2003-11-16 19:39                                                                     ` Robert I. Eachus
2003-11-16 21:04                                                                     ` Wes Groleau
2003-11-16 10:19                                                                 ` Gautier Write-only
2003-11-11 22:30                                                 ` Stephane Richard
2003-11-11 22:54                                                   ` Vinzent 'Gadget' Hoefler
2003-11-11 14:35                                           ` Hyman Rosen
2003-11-11 15:04                                             ` Preben Randhol
2003-11-11 20:01                                               ` Russ
2003-11-12 12:41                                                 ` Preben Randhol
2003-11-13  6:27                                                   ` Chad R. Meiners
2003-11-13  7:32                                                     ` Anders Wirzenius
2003-11-13 12:29                                                       ` Marin David Condic
2003-11-13 17:51                                                       ` Warren W. Gay VE3WWG
2003-11-14  8:32                                                         ` Dmitry A. Kazakov
2003-11-14 14:51                                                           ` Warren W. Gay VE3WWG
2003-11-17  9:22                                                             ` Dmitry A. Kazakov
2003-11-17 16:42                                                               ` Warren W. Gay VE3WWG
2003-11-18  8:49                                                                 ` Dmitry A. Kazakov
2003-11-19 17:46                                                                   ` Warren W. Gay VE3WWG
2003-11-20  8:26                                                                     ` Dmitry A. Kazakov
2003-11-14 20:44                                                           ` Robert I. Eachus
2003-11-14  9:05                                                         ` Anders Wirzenius
2003-11-14 12:37                                                       ` Georg Bauhaus
2003-11-14 15:18                                                         ` Robert I. Eachus
2003-11-15 13:04                                                           ` Marin David Condic
2003-11-18 22:45                                                             ` Georg Bauhaus
2003-11-11 15:36                                         ` Robert I. Eachus
2003-11-13  6:37                                           ` Chad R. Meiners
2003-11-13 19:11                                             ` tmoran
2003-11-14  4:57                                               ` Robert I. Eachus
2003-11-14  7:05                                                 ` tmoran
2003-11-14 15:06                                                   ` Robert I. Eachus
2003-11-14 15:15                                                     ` Robert Spooner
2003-11-14 15:54                                                       ` Robert I. Eachus
2003-11-11 16:24                                         ` Vinzent 'Gadget' Hoefler
2003-11-11 17:36                                           ` Stephane Richard
2003-11-08 20:08                               ` Russ
2003-11-09  4:23                                 ` Alexandre E. Kopilovitch
2003-11-07 15:54                             ` Frank J. Lhota
2003-11-06 22:42                         ` Dale Stanbrough
2003-11-03 15:35             ` Stephane Richard
2003-11-03 16:26             ` Robert I. Eachus
2003-11-04  7:28               ` Vinzent 'Gadget' Hoefler
2003-11-03 22:04         ` Gautier Write-only
2003-11-03 10:47 ` Dmitry A. Kazakov
2003-11-03 16:30   ` Robert I. Eachus
2003-11-03 22:07   ` Gautier Write-only
2003-11-04  7:28   ` Vinzent 'Gadget' Hoefler
2003-11-06 20:12     ` Gautier Write-only

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