mirror of
https://github.com/twirl/The-API-Book.git
synced 2025-05-31 22:09:37 +02:00
#43 typo fixed
This commit is contained in:
parent
b58721d84d
commit
546ecf11f3
@ -66,8 +66,8 @@ let matchingCoffeeMachines =
|
||||
parameters,
|
||||
{ "sort_by": "distance" }
|
||||
);
|
||||
// Finally, show offers to user
|
||||
app.display(coffeeMachines);
|
||||
// Finally, show offers to the user
|
||||
app.display(matchingCoffeeMachines);
|
||||
```
|
||||
|
||||
As you see, developers are to write a lot of redundant code (to say nothing about the difficulties of implementing spatial indexes). Besides, if we take into consideration our Napoleonic plans to cover all coffee machines in the world with our API, then we need to admit that this algorithm is just a waste of resources on retrieving lists and indexing them.
|
||||
|
@ -66,7 +66,7 @@ let matchingCoffeeMachines =
|
||||
);
|
||||
// Наконец, показать
|
||||
// предложения пользователю
|
||||
app.display(coffeeMachines);
|
||||
app.display(matchingCoffeeMachines);
|
||||
```
|
||||
|
||||
Как видите, разработчику придётся написать немало лишнего кода (это не упоминая о сложности имплементации геопространственных индексов!). Притом, учитывая наши наполеоновские планы по покрытию нашим API всех кофемашин мира, такой алгоритм выглядит заведомо бессмысленной тратой ресурсов на получение списков и поиск по ним.
|
||||
|
Loading…
x
Reference in New Issue
Block a user