4 ms·
I'd remove the % sign from the syntax for ingredients.
by omaranto 5y ago
I'd remove the % sign from the syntax for ingredients.
- arjvik 5y agoAgreed, splitting on " " isn't that difficult
- est 5y agoAnd how does the ingredients scale? Surely cooking for 1 person vs 4 person requires different amount of ingredients.
- omaranto 5y agoThe % in this syntax is not to indicate information about scaling, it is just a meaningless separator: "3%tsp". I'd say both "3tsp" or "3 tsp" look better.
- mkdirp 5y agoThe author didn't go with a space because[0] some things have spaces in them, which would be harder to figure out. [0] https://news.ycombinator.com/item?id=28999634 https://news.ycombinator.com/item?id=28999634
- omaranto 5y agoThat is highly unconvincing! Isn't the quantity a number? Have the syntax be @<ingredient>{<number> <units>}, where the units may contain spaces but not braces. You can even make the space between quantity and units optional.