comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: newbie can't get exceptions to work!
Date: Thu, 12 Apr 2001 02:38:30 GMT
Date: 2001-04-12T02:38:30+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0104111922290.5032-100000@shell5.ba.best.com> (raw)
In-Reply-To: <86puej8gbu.fsf@acm.org>

On 11 Apr 2001, Laurent Guerby wrote:
> Brian Rogoff <bpr@shell5.ba.best.com> writes:
> I see label and optional arguments being two separate issue. If you do
> only labels, it shouldn't cause any problem at all, you can even
> disallow overloading with only label changes while keeping most of the
> interesting thing about labels (call site clarity). But even keeping
> overloading should be near trivial.
> 
> Optional argument are a whole different beast, and I think much less
> useful, and I think likely to cause trouble.
> 
> Is it that the conjunction of both feature is being considered and
> hence the problems (my advice would be to just drop optional
> arguments), or am I missing something obvious?

You should know that nothing is obvious when you're discussing the OCaml
type system :-). OK, that's not fair. It is obvious when considered in the 
context of mathematically sound type systems. If you're not well versed in
the theory of such type systems, simple explanations won't be helpful. 
Check the caml-list for the mail of the past few weeks titled "The Future
of Labels" or somesuch.

> I agree with you that mandating labels is not a good idea.

The likely solution will be that if you use labels in the function
definition, you'll need them at the call site. Once again, if you're 
interested in the why's you'd be better off reading the list, or checking 
Jacques Garrigue's home page and puzzling through the papers.

> > > X : constant T := if C1  then V1 elsif C2 then V2 else V3;
> > > 
> > > This is something I think people miss in Ada, may be someone should
> > > wrote an extension proposal ;-).
> > 
> > That would work. OTOH, since Ada is statement oriented rather than
> > expression oriented, perhaps a different syntax for conditional
> > expressions is warranted?
> 
> I don't buy the statement oriented thing, you can do lots of thing
> without statements in Ada (the missing thing is this conditional
> feature ;-), and I see no need to invent new syntax here (but well
> that's a taste & color issue here ;-).

Well, compared to Scheme, or ML, or any functional language Ada is surely 
statement oriented as opposed to expression oriented.

> > Allowing declarations to float is nice. However, if, as I suggested, we
> > allow downward funargs (only downward, we don't want to require GC :) 
> > and anonymous functions, the {} has the advantage that function
> > definitions are lightweight enough to be expressed inline more easily. 
> 
> If you type arguments, that's not going to be one liners hence the { }
> won't buy you much. (I find SmallTalk syntax for blocks quite nice,
> but let's say it's really typed ;-).

One line functions are not a compelling argument for me anyways, since I 
rarely ever use one liners. Besides, OCaml has pretty damned strong static
type checking and the syntax for one liners is pretty simple (only Haskell 
is a lot terser). 

# List.map (fun n -> n * n) [1; 2; 3; 4];;
- : int list = [1; 4; 9; 16]

> > > And I of course forgot the mandatory () for function calls without 
> > > args silliness ;-).
> > 
> > A great feature. Some people hate it though. 
> 
> I don't know the history, but I'd say it's mostly because of the
> statement = expression + fonction = pointer syntax horrors of C that
> forces a hack to disambiguate, not because of methodology that argless
> func/proc calls must specify ().
> 
> Why are people liking this?
> 
> Only C/C++/Java have inherited this syntax, other languages including
> most FP do not have it and that's much better this way (am I missing
> something obvious here?).

Just a question of (bad ;) taste. Anyways, the argument is that some like
to know it is a function call. 

Incidentally, CLU and it's successor Theta have this syntax too.

> > > No, I just program in Ada at home and work ;-) ;-).
> > Lucky you! I've switched to OCaml. 
> 
> I looked at the FP situation two years ago when we switched languages
> at work (from C to Ada 95), but there was no real industrial stuff
> available (with formal support and available even for idiotic
> proprietary platforms). 

Which idiotic platforms?

> Right now, I think there's Erlang (we write numerical code and even
> the Erlang manual says it's not for us ;-) and may be OCaml if out of
> the recently announced consortium a real support company pops up.

I don't believe such a support compant will pop up. I'll probably
represent my company at the Consortium, so I'll tell you if I hear
anything. 

I believe you made the right decision. It was a brave one too, since I bet 
there was a strong push for C++. Ada would be my choice too, given what
you told me. 

I mentioned Ada to my manager, and I often mention Ada when we discuss
language design. He now believes Ada is great, and if it were a choice
between Ada and C++ I believe he'd make the right choice. But the
competition in our company is with OCaml, and I'm not so sure that for 
what we do that Ada comes out on top.
 
> As you might have guessed our support comes from ACT Europe and we're
> using GNAT.

I trust the support has been good? 

-- Brian





  parent reply	other threads:[~2001-04-12  2:38 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-05  3:19 newbie can't get exceptions to work! Jeff Shipman
2001-04-05  4:25 ` Ed Falis
2001-04-05 11:00   ` martin.m.dowie
2001-04-05 14:21     ` Ted Dennison
2001-04-05 17:50       ` Fraser Wilson
2001-04-05  4:34 ` Jeff Shipman
2001-04-05  4:59 ` Wilhelm Spickermann
2001-04-05 14:14   ` Ted Dennison
2001-04-05 16:37     ` Wilhelm Spickermann
2001-04-06 13:09     ` Marc A. Criley
2001-04-06 15:04       ` Ted Dennison
2001-04-06 16:43       ` Robert A Duff
2001-04-06 17:39         ` Ted Dennison
2001-04-06 21:50           ` Robert A Duff
2001-04-06 20:11         ` Brian Rogoff
2001-04-06 22:20           ` Robert A Duff
2001-04-06 23:04             ` Brian Rogoff
2001-04-07  5:48               ` Jeffrey Carter
2001-04-10  1:29                 ` Robert A Duff
2001-04-07 19:30               ` Robert A Duff
2001-04-07 21:17                 ` Brian Rogoff
2001-04-07 21:25                   ` Ayende Rahien
2001-04-07 22:57                     ` David Starner
2001-04-08 12:10                       ` Ayende Rahien
2001-04-08  2:12                     ` Larry Hazel
2001-04-08 12:12                       ` Ayende Rahien
2001-04-09 16:20                         ` Larry Hazel
2001-04-10  2:38                           ` Ayende Rahien
2001-04-10  3:25                             ` James Rogers
2001-04-08 22:18                       ` Brian Rogoff
2001-04-09 15:14                         ` Ted Dennison
2001-04-09 17:23                           ` Brian Rogoff
2001-04-09 18:23                             ` Laurent Guerby
2001-04-09 19:15                               ` Brian Rogoff
2001-04-10 18:21                                 ` Laurent Guerby
2001-04-10 19:44                                   ` Brian Rogoff
2001-04-11 18:03                                     ` Laurent Guerby
2001-04-11 18:33                                       ` Samuel T. Harris
2001-04-14  0:06                                         ` Robert A Duff
2001-04-12  1:42                                       ` Mike Silva
2001-04-12  2:38                                       ` Brian Rogoff [this message]
2001-04-12 23:23                                         ` Laurent Guerby
2001-04-13  2:44                                           ` Brian Rogoff
2001-04-11 13:24                                   ` Ayende Rahien
2001-04-11 13:14                                     ` Mats Karlssohn
2001-04-11 15:08                                       ` Ayende Rahien
2001-04-11 21:42                                       ` Fraser Wilson
2001-04-12 23:55                                         ` Robert A Duff
2001-04-10  2:12                               ` Robert A Duff
2001-04-10  3:47                                 ` Brian Rogoff
2001-04-10 13:40                                 ` Ada keywords (was: Re: newbie can't get exceptions to work!) Marin David Condic
2001-04-10 14:26                                   ` Jean-Pierre Rosen
2001-04-09 20:49                             ` newbie can't get exceptions to work! Ted Dennison
2001-04-09 21:44                               ` Brian Rogoff
2001-04-09 21:59                                 ` Ted Dennison
2001-04-10  2:54                                   ` Ayende Rahien
2001-04-10 14:00                                     ` Ted Dennison
2001-04-10 17:44                                     ` Fraser Wilson
2001-04-10  6:59                               ` Mats Karlssohn
2001-04-10 14:18                                 ` Ted Dennison
2001-04-10 16:27                                   ` Mark Biggar
2001-04-11 11:55                                     ` Mats Karlssohn
2001-04-11 14:34                                       ` Samuel T. Harris
2001-04-11 15:50                                         ` Pat Rogers
2001-04-12  6:27                                         ` Mats Karlssohn
2001-04-11 11:49                                   ` Mats Karlssohn
2001-04-11 15:38                                     ` Robert A Duff
2001-04-13 16:12                             ` Matthew Woodcraft
2001-04-10  1:41                   ` Robert A Duff
2001-04-10  3:03                     ` James Rogers
2001-04-10  3:58                       ` Brian Rogoff
2001-04-10 21:48                         ` Ted Dennison
2001-04-11 15:09                           ` Ayende Rahien
2001-04-11 21:57                             ` James Rogers
2001-04-11 23:13                               ` Brian Rogoff
2001-04-12  6:33                                 ` Mats Karlssohn
2001-04-12 16:38                                   ` Brian Rogoff
2001-04-17  7:04                                     ` Mats Karlssohn
2001-04-17  9:08                                       ` Jean-Pierre Rosen
2001-04-12 15:16                               ` Ted Dennison
2001-04-12 21:22                                 ` James Rogers
2001-04-10  4:26                     ` Brian Rogoff
2001-04-11 15:30                       ` Robert A Duff
2001-04-11 17:33                         ` Brian Rogoff
2001-04-10  1:26               ` Robert A Duff
2001-04-10  2:11                 ` Brian Rogoff
2001-04-14  0:00                   ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
2001-04-05  5:26 Christoph Grein
replies disabled

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