Hello Tom,

But really, \fi is something that could only be loved by a certain academic breed of hackers.

Ah ah:-) I'll take that as a compliment:-)

I'd go for \endif, probably. That still doesn't relate well with \unless, so +1 for \if, \ifnot, \else, and \endif.

Ok, that is a clear opinion.

I'm not really convinced that we need an \elseif at this point.
It could be added later if people find it compelling, but I'm
having a hard time believing that it's essential.

My experience with cpp is that #elif is quite useful in some cases, typically with alternate implementations depending on dependences, to avoid this:

 #ifdef HAVE_XXX
   ...
 #else
 #ifdef HAVE_YYY
   ...
 #else
 #ifdef HAVE ZZZ
   ...
 #else
 #error "oops!"
 #endif // HAVE_ZZZ
 #endif // HAVE_YYY
 #endif // HAVE_XXX

I think that some realistic use cases examples for psql would be great...

If the else-if is a common pattern then it should be at least in the design, even if not implemented right away. Also ISTM that having else-if is not too compatible with multiplying \if* because it leads to pretty ugly \el*if* variants which are quite hard to parse and understand, so there is an impact on the design.

--
Fabien.


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to