Better HN
topnewbestaskshowjobs
Log inSign up

mpajunen

6 karma · joined Apr 26, 2016 (10y ago) · 4 submissions

Submissions

comment 5y ago · link · parent

No need to use null for this, undefined works equally well with noImplicitReturns.

For example: https://www.typescriptlang.org/play?#code/LAKAZgrgdgxgLgSwPZ...

comment 7y ago · link · parent

I've only been doing this for a little over ten years, not 25. Still, I find that though most problems are indeed quite boring, the solutions don't have to be.

It seems there are always new ways to write solutions, and I don't just mean picking a new language or trying to optimize performance. Some challenges seem impossible to ever fully solve: Making the code more robust, easier to read, or just to communicate the intent of every line is clearly. (At least for now my solutions tend towards making the code as declarative as possible.)

I get that this may not interest everyone as much and I wouldn't mind a genuinely new or hard problem to solve every now and then, but still something to consider.

comment 7y ago · link · parent

Any TypeScript libraries you are using?

comment 7y ago · link · parent

The article makes a valid argument against bad DSLs. But the dsDSL is also declarative so it's not really an argument against declarative programming. Similarly using a native data structure for a SQL query doesn't make the query any less declarative (and can have a lot of advantages).

The dsDSL is actually pretty close to how React or some functional languages work with HTML.