3 ms·
It’s true that if your goal is something like Cucumber BDD which can be read by non-programmers, then you would want an abstraction layer over the code that hid
by lstamour 3y ago
It’s true that if your goal is something like Cucumber BDD which can be read by non-programmers, then you would want an abstraction layer over the code that hides some of the syntax. This is also where we could get into Ruby being used as a DSL. The only gotcha is that the reason AppleScript is so hard to write while being so easy to read is basically the same reason we use IDEs to write Python and Ruby and generally prefer TypeScript to JavaScript. Namely, the coding assistance.
And let’s not touch the maintainer nightmare of having to keep method names up to date with a complete description of what the method does. You might end up with twenty words or needing multiple methods that are no-ops if you ever call a shared library with any amount of complicated functionality. Alternatively, your description of what is done is so high level that it doesn’t actually describe what’s done in a detail sufficient for non-programmers to understand.
I guess where I’m going with this is that it’s like comments that describe what the method does. We’ve all been there when the comments don’t accurately reflect reality, because someone, maybe through automation, changed how the system works and didn’t update the comment.
It’s hard for me to see as much value in this presentation over an IDE that could auto-inline the function bodies and leave a comment above each with the method name.