Better HN
topnewbestaskshowjobs
Log inSign up

randomvariable

6 karma · joined Oct 10, 2013 (13y ago) · 2 submissions

Submissions

comment 1y ago · link · parent

How long until laptops are able to run high end models? What's the use case that requires a server farm for end user's?

comment 10y ago · link · parent

I've written a lot of Angular code with Typescript and although you're right in saying functional code is preferrable I've found that a little bit OO when used correctly makes your code DRYer.

For example, if you have a lot of paginated lists you can write an abstract class that handles all the "get the results", "put them on a list", "display pagination", "on click display the next/previous page" trivia and then inherit from that to add the UI/presentation and any specific logic. It's absolutely possible in plain javascript but I shudder at the thought of writing something like that and even worse, refactor it. Typescript with OO and generics simplifies the task considerably.

As in everything in life: "dogma is bad", "παν μέτρον άριστον", "use the best tool for the job" etc. Words to live by.