Subject: |
Re: [Merge] ~epics-core/epics-base/+git/Com:iocsherr into epics-base:7.0 |
From: |
Keenan Lang via Core-talk <[email protected]> |
To: |
mdavidsaver <[email protected]> |
Date: |
Tue, 04 Jun 2019 10:31:21 -0000 |
>I'm regretting the exposure of iocshCmdDef::func and allowing outside code to directly call iocsh functions. In retrospect, we should have insisted on having a wrapper function such as is being discussed now.
It is unlikely that any wrapper decided on back then would have a return type, so there would still not be a way to expose error/exception data to outside code and a new wrapper function would likely be necessary.
>True, this is either "defensive programming", or laziness. Easier to test for NULL than decide if it is impossible.
If there is a movement to add explicit preconditions to the functions in core, I'd absolutely support and help with that. Without those, it's not really laziness, it's ensuring that the code functions as advertised.
>Maybe the question is whether you are motivated to work on this yourself?
As we talked about offline, I'll just end up removing my reliance on iocshFindCommand and you can remove that part of the API. However, I would also be absolutely willing to rewrite that part of the code as well. It is only the way it is because I was attempting to change as little as possible.
>And I suppose we are all dancing around the question of if/when to rewrite iocsh.cpp (as actual c++), or replace it with (something like) a lua interpreter shell.
As far as I have gathered, the ioc shell is supposed to match up with the vxWorks shell as reasonably as possible. This (as well as conservation of developer effort) was the reason why anything even slightly advanced like exceptions, conditionals, or arithmetic have been, so-far, excluded from iocsh. This level of very basic exception support doesn't end up reaching a major breaking point in compatibility between the iocsh and the vxWorks shell, but it's definitely getting close to that line.
--
https://code.launchpad.net/~epics-core/epics-base/+git/Com/+merge/366876
Your team EPICS Core Developers is subscribed to branch epics-base:7.0.
- References:
- [Merge] ~epics-core/epics-base/+git/Com:iocsherr into epics-base:7.0 mdavidsaver via Core-talk
- Navigate by Date:
- Prev:
Re: [Merge] ~epics-core/epics-base/+git/Com:make-simple into epics-base:7.0 mdavidsaver via Core-talk
- Next:
[Merge] ~anj/epics-base/+git/base-3.15:decimate-filter into epics-base:3.15 Andrew Johnson via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: [Merge] ~epics-core/epics-base/+git/Com:iocsherr into epics-base:7.0 mdavidsaver via Core-talk
- Next:
Re: [Merge] ~epics-core/epics-base/+git/Com:iocsherr into epics-base:7.0 mdavidsaver via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|