On 10/15/10 1:43 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
I don't think a strict type checking is suitable for configuration file
- e.g., if I want to check value in cseq, don't want to get lost in type
conversions.
If there is going to be such error messages, they must be enclosed in a
config parameter.
yes, there could be a config parameter
"warn_about_implicit_type_conversions" or something like that. i would
definitely turn it on, since it would not be a big deal for me to add
(int) or (string) in front of a variable when i want type conversion to
be done in order to avoid config mistakes that get unnoticed.
At the end of the day, one can write entire routing logic directly in C
code.
Config language is complex enough, adding such things to it will make it
really unusable. Bear in mind that config is for sys admins not for
programmers. They operate the platform, then should care only of SIP
layer (which is alone difficult enough), not typed of variables and
heavy programming languages.
Btw, what mistakes really can happen? That string "0" is equal with 0?
It is this way for so many years now.
Either we focus to make the config file easier to understand and use, or
drop it and tell everything has to be written in C and the 50-100 of us,
developers, will use it.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users