comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: My first compiler bug: work around or redesign?
Date: Fri, 23 Mar 2012 10:56:15 -0700
Date: 2012-03-23T10:56:15-07:00	[thread overview]
Message-ID: <jkidfv$7rv$1@adenine.netfront.net> (raw)
In-Reply-To: <slrnjmp96d.1lme.lithiumcat@sigil.instinctive.eu>

On 03/23/2012 09:29 AM, Natasha Kerensikova wrote:
>
> However, at implementation level, it turns out that they are very
> similar: only the prefix recognition change, and further processing is
> perfectly identical. So instead of cut-and-pasting code, I would write a
> generic that handles all the common aspects, using a formal function for
> the prefix part.
>
> Is there something wrong with that approach?
> Are there some caveat that I missed?
> Are there advantages in avoiding the generics in that situation, for
> example using a non-generic common function that takes an
> access-to-subprogram extra parameter?

There's nothing wrong with that approach. I've used it successfully many times.

-- 
Jeff Carter
"You couldn't catch clap in a brothel, silly English K...niggets."
Monty Python & the Holy Grail
19

--- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---



  parent reply	other threads:[~2012-03-23 17:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 16:29 My first compiler bug: work around or redesign? Natasha Kerensikova
2012-03-23 17:51 ` Ludovic Brenta
2012-03-23 21:20   ` Natasha Kerensikova
2012-03-23 17:56 ` Jeffrey Carter [this message]
2012-03-23 18:22 ` Jeffrey Carter
2012-03-23 21:23   ` Natasha Kerensikova
2012-03-23 22:54     ` Jeffrey Carter
2012-03-23 18:29 ` Simon Wright
2012-03-23 18:37 ` Dmitry A. Kazakov
2012-03-23 18:48   ` Robert A Duff
2012-03-23 21:40     ` Natasha Kerensikova
2012-03-24  0:04       ` Georg Bauhaus
2012-03-24  9:50         ` Natasha Kerensikova
2012-03-23 21:34   ` Natasha Kerensikova
2012-03-23 19:04 ` Jeffrey Carter
2012-03-26 18:15 ` Natasha Kerensikova
2012-03-26 18:43   ` Simon Wright
2012-03-26 18:55   ` Ludovic Brenta
2012-03-28 15:30     ` Natasha Kerensikova
2012-03-29  8:25       ` Ludovic Brenta
2012-03-30 23:42         ` onox
2012-04-02 20:51           ` Ludovic Brenta
2012-04-03  2:50             ` onox
2012-03-26 21:47   ` Georg Bauhaus
2012-03-27  5:34     ` Per Sandberg
2012-03-27  7:30     ` Dmitry A. Kazakov
replies disabled

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