News for hackers. Stuff that matters.

mpajunen

Re:Tricks I wish I knew when I learned TypeScript on Tuesday October 12, 2021 @10:56AM (#28840531)
No need to use null for this, undefined works equally well with noImplicitReturns.

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

Re:Teach Yourself Programming in Ten Years (1998) on Saturday July 27, 2019 @05:36PM (#20544336)
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.

Re:To ORM or Not to ORM on Wednesday May 08, 2019 @01:41AM (#19856142)
Any TypeScript libraries you are using?
Re:Declarative Programming: Is It a Real Thing? (2015) on Thursday February 07, 2019 @10:57AM (#19105976)
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.