Re: Coding style point: "const" in function parameter declarations
От | Greg Stark |
---|---|
Тема | Re: Coding style point: "const" in function parameter declarations |
Дата | |
Msg-id | BANLkTi=7Ekhy3o1QPMG5ue44j6TATU-ur4_wE_kdbZQc1p315Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Coding style point: "const" in function parameter declarations (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Coding style point: "const" in function parameter declarations
Re: Coding style point: "const" in function parameter declarations |
Список | pgsql-hackers |
On Wed, Jun 22, 2011 at 5:41 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > If we were thinking of moving in that direction, I would argue that > we should get rid of typedef'd pointers altogether, ie, change > "Relation" to be a typedef for the struct and write "Relation *rel" > not "Relation rel". Hm. I have to say the single most confusing thing about the Postgres source that took me a *long* time to get over was remembering that some of the typedefs were already pointers and some weren't. It seems silly now but when I was trying to understand what the intent of a function was and it wasn't obvious that some of the arguments appeared to be pass by value but were actually pass by reference it made things really surprising. -- greg
В списке pgsql-hackers по дате отправления: