From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79bbf7e359159d0d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-11 11:00:19 PST Path: supernews.google.com!sn-xit-03!supernews.com!freenix!oleane.net!oleane!grolier!club-internet!not-for-mail From: Laurent Guerby Newsgroups: comp.lang.ada Subject: Re: newbie can't get exceptions to work! Date: 11 Apr 2001 20:03:01 +0200 Organization: Club-Internet (France) Message-ID: <86puej8gbu.fsf@acm.org> References: <9ao1if$cq9$1@taliesin.netcom.net.uk> <3ACFC902.115624A1@mindspring.com> <86u23yszjo.fsf@acm.org> <86wv8sfwec.fsf@acm.org> NNTP-Posting-Host: nas25-205.vlt.club-internet.fr X-Trace: front2m.grolier.fr 987011966 18636 195.36.224.205 (11 Apr 2001 17:59:26 GMT) NNTP-Posting-Date: 11 Apr 2001 17:59:26 GMT X-Newsreader: Gnus v5.7/Emacs 20.5 Xref: supernews.google.com comp.lang.ada:6778 Date: 2001-04-11T17:59:26+00:00 List-Id: Brian Rogoff writes: > Well, I'm doing what I can on the OCaml mailing list to get nice little > features of Ada adopted. In the case of labeled and optional arguments, > it's a lot tougher in OCaml than Ada, which has type inference and higher > order functions. If you look at the recent discussions on the mailing > list, Jacques Garrigue (the label inventor and main proponent) is laying > out the alternatives and it looks like the only way to get commuting > labels is to have labels be non-optional. I don't like that. 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? I agree with you that mandating labels is not a good idea. > > 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 ;-). > 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 ;-). > > 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?). > > 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). 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. As you might have guessed our support comes from ACT Europe and we're using GNAT. > Something about French designed languages, eh? :-) May be ;-). -- Laurent Guerby