Dcoder
الذهاب إلى القناة على Telegram
Software developer
إظهار المزيدلم يتم تحديد البلدالفئة غير محددة
475
المشتركون
+124 ساعات
+307 أيام
+4230 أيام
أرشيف المشاركات
476
Repost from Mo' tries
Aight aight, there is this lil thing I made that am proud of lowkey.
It's a react router style routing lib for kotlin. Written in pure kotlin so you can use it anywhere.
It uses the builder pattern, you basically add your routes and the final .build() function makes a readonly prefix tree.
The reason we have a prefix tree (or Trie) is because we want a data structure that can look at a route like
/home/apps/me and select from the routes under each one (home, apps and me) the correct one.
Generally, when you see tree data structures in the wild, they usually solve a multiplexing problem (choosing one option out of many).
It's pretty neat, I used TDD for it.