Hacker News new | ask | show | jobs
by yebyen 1201 days ago
> One of the bigger problems I have with it is that discovering existing cucumber steps is hard.

When I was using Cucumber, we almost picked up Turnip to solve that one.

For anyone that doesn't know Cucumber, you have one global context for all expressive sentences. So if you say "I click on the big red button" then there has to be one reliable way to detect the big red button on whatever page you're on, and it has to be the same way in every context.

In Turnip, you can declare contexts (like namespaces or modules) that allow you to have the same expression mean different things in each context. Only problem is, Turnip is even more obscure than Cucumber, and even fewer people know what it is, let alone having used Cucumber well enough to understand what all that means and what Turnip is for.

The other problem being, having a single global context for understanding the meaning of words arranged into sentences was a very powerful tool for promoting reuse and expressive clarity: if you found yourself using the same utterance in two different contexts, it was expected that you'd clarify so they could be distinguished and understood separately in a context-free grammar.

Not needed anymore in Turnip, unless you're diligent about reaching for the existing modules that you've created. (On the other hand, having your test utterances sorted into modules makes it a lot easier to reach for them, among related utterances...)