-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abuse with statement for Konira-inspired DSL #101
Comments
Let's shamelessly summon @alfredodeza to hear if he has any specific reasons for not going with this originally for Konira. |
(Not suggesting you should, rather, curious if you thought of it and dismissed it and why.) |
There are a couple of things to cover here, starting with the use of This was coincidentally the first approach to make Konira work, take a look at https://gist.github.com/828739 which describes a bit what I was trying to do. I got it to a working state and started using it a bit. So what happened? When a file had a few tests, it looked weird. When I was showcasing the prototype to my coworkers and friends they all were quick to say "this looks good but all these Secondly, and this is were I have to disagree with you, is that it was not readable at all. The current approach is way more readable, albeit at the expense of having a DSL structure to support it. But any newcomer to testing, can read and understand better what is going on compared to the I don't see Konira as it is now as less BDD because of it, but rather, the other way around. It is funny how you thought about it, as like I mentioned before, it was the first try at getting it to work. Hope you find my input valuable enough. I would be willing to discuss it further though. I try to avoid closing possible |
Thanks for responding!
I think people could learn and get used to 'with'. We're programmers, eh. The question is whether it makes semantic sense to use context managers here; I think it might but not sure. It does feel abusive but not "wrong". Did you reject it on any technical grounds as well? |
I quite like I'm sure it is not a learning curve to avoid, but rather how does And yes, I had to reject it on technical grounds at the end because I had a lot of difficulty trying to get the flexibility the current Konira implementation offers. I wouldn't be able to pin-point to it exactly since it has been a few months since I tried it and it was a temporary "let's try this" situation and not a long-term commitment. It may have been something to do with nested |
Konira:
I think something similar could be achieved in Python by abusing the with statement:
It's probably a bad idea but it is an idea so I'm saving it here.
Implications:
Benefits?
The text was updated successfully, but these errors were encountered: