HackerTrans
TopNewTrendsCommentsPastAskShowJobs

zaccusl

no profile record

comments

zaccusl
·2 jaar geleden·discuss
I don't know much about coups actually work, but a general does not make an army.

A general that wants to stage a coup seems like they must still require the support of the troops.

Speaking anecdotally, every unit I've been in not a single man would follow the questionably illegal orders of any general unless they had full respect and confidence in that general, and typically the troops only have full respect and confidence in a subset of their immediate leaders (which are not typically generals). I guarantee a LARGE percentage of troops would treat the highest ranking general as an enemy combatant if their direct (low ranking) leaders who they respected convinced them that the general's orders were illegal or against their oaths. Soldiers don't die for generals, they die for each other, and "each other" is usually enlisted or low-ish ranking officers (maybe captain and below in the US). A professional and disciplined soldier will charge a hill risking certain death on the orders of a general, but a professional and disciplined soldier will not stage a coup on the orders of a general alone.
zaccusl
·5 jaar geleden·discuss
TypeScript does have method overloading same as other typed languages (except you have to do runtime checks, but that is a JavaScript limitation).
zaccusl
·5 jaar geleden·discuss
There is why TypeScript IS so great.

In the early days of a new app or feature, you have no idea what the correct data/type shapes are.

In TypeScript you can define the types and then easily do major refactors even if you have 1000's of lines already written.

It becomes so tedious to do the same refactoring in JavaScript.

TypeScript makes it trivial to change an object or function signature when developing new code (or old code).

Refactors that take 3 minutes in TypeScript take 3 days in JavaScript and you better hope you catch all the uses.

The refactor ability that TypeScript gives you makes it so much easier to change data types and function signatures dozens of times until you get things right.
zaccusl
·5 jaar geleden·discuss
I don't understand what the tsconfig has to do with understanding the source? Maybe when using different path resolving or different tsconfigs to compile test files vs. production files?

Many toolings make it so you don't even need to worry about the tsconfig anymore (though in reality it is very helpful to understand it).