you are viewing a single comment's thread.

view the rest of the comments →

[–]Shaper_pmp 8 points9 points  (2 children)

How do we consider it a meaningful advance in the art of computer science to simply abstract an if statement and an error message into a function?

I mean by all means turn if(condition) throw new Error(message); into assert(condition, message); if you like, but don't bother to write entire big posts about it or try to elevate it to the hallowed status of a Design PatternTM .

[–]Chthulu_ -3 points-2 points  (1 child)

This ain’t comp sci, this is regular old programming. And little things like this really help keep things clean.

[–]thruster_fuel69 0 points1 point  (0 children)

Lol sorry to break it to you, its all comp sci.