fsprojects / Canopy.Mobile

Canopy testing framework for mobile apps
https://fsprojects.github.io/Canopy.Mobile/
MIT License
14 stars 12 forks source link

Design discussion: API #4

Closed lefthandedgoat closed 7 years ago

lefthandedgoat commented 7 years ago

canopy was the first major piece of code that I wrote in F#. At the time I was not aware that you were supposed to shy away from infix operators. I used them for a reason though. After contributing to a different 'English style' DSL for web testing, and working with the less technical QA folks, I realized that English didn't make the code easier for them to write, it made it harder. They wanted to phrase sentences in the way they want to, and not what was legit code.

I chose to use infix operators because they would be foreign to the QA people and I could simply tell them to memorize these few funky characters to do specific operations. No confusion with English terms anymore.

I also provide equals a b as an alternative to a == b for those that prefer it, but I don't think many use them.

I guess the question is, should you keep the infix operators, move away from them, or support both.

forki commented 7 years ago

I'd like to keep it as close as possible to the original canopy style. I personally think it works well in practice.

Am 17.12.2016 6:21 nachm. schrieb "Chris Holt" notifications@github.com:

canopy was the first major piece of code that I wrote in F#. At the time I was not aware that you were supposed to shy away from infix operators. I used them for a reason though. After contributing to a different 'English style' DSL for web testing, and working with the less technical QA folks, I realized that English didn't make the code easier for them to write, it made it harder. They wanted to phrase sentences in the way they want to, and not what was legit code.

I chose to use infix operators because they would be foreign to the QA people and I could simply tell them to memorize these few funky characters to do specific operations. No confusion with English terms anymore.

I also provide equals a b as an alternative to a == b for those that prefer it, but I don't think many use them.

I guess the question is, should you keep the infix operators, move away from them, or support both.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Canopy.Mobile/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNJkkBu_lkoox5ARb0zkQWqk3GZA7ks5rJBoAgaJpZM4LP713 .