Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] evar_push/pop helpers
Date: Sun, 02 Jun 2013 15:40:53
Message-Id: 201306021140.46386.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] evar_push/pop helpers by "Michał Górny"
1 On Sunday 02 June 2013 04:39:32 Michał Górny wrote:
2 > Dnia 2013-06-02, o godz. 03:29:33 Mike Frysinger napisał(a):
3 > > On Sunday 02 June 2013 03:16:53 Michał Górny wrote:
4 > > > Dnia 2013-06-02, o godz. 03:09:31 Mike Frysinger napisał(a):
5 > > > > On Sunday 02 June 2013 02:51:34 Michał Górny wrote:
6 > > > > > Dnia 2013-06-01, o godz. 23:03:20 Mike Frysinger napisał(a):
7 > > > > > > simple set of helpers to save/restore a variable in a limited
8 > > > > > > section of code
9 > > > > > >
10 > > > > > > you can see an example of it in action at the end of the file
11 > > > > > > where i need to tweak epatch (and no, doing `LC_COLLATE=C set --
12 > > > > > > ....` does not work).
13 > > > > >
14 > > > > > Why the ugly hackery instead of proper 'local' scope?
15 > > > >
16 > > > > there's no way to undo the local thus it affects the rest of the
17 > > > > func. this makes sure the change is actually localized to where it
18 > > > > is needed.
19 > > >
20 > > > By use of global variables and a bunch of additional code and evals.
21 > >
22 > > the implementation details of estack_* doesn't matter
23 >
24 > It's not beautiful language with proper local scopes, so it *does*
25 > matter.
26
27 then go ahead and propose something different. otherwise you're pointlessly
28 twisting in the wind.
29
30 > > > Also, do you really want the collation to be changed only in this one
31 > > > place? This looks weird to me.
32 > >
33 > > yes, i only want to force it here, because it's the only place where
34 > > collation matters in the func currently.
35 >
36 > So, effectively, changing it once in the beginning of the function
37 > would be simpler and wouldn't cost anything.
38
39 most likely, *today*, yes. in the future, who knows. but since this is the
40 only place in the func where we need to force a specific sorting, it makes
41 sense to localize the change to that.
42
43 i snipped the rest of your e-mail because it wasn't worth responding to
44 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] evar_push/pop helpers "Andreas K. Huettel" <dilfridge@g.o>