News for hackers. Stuff that matters.
Re:Are dynamic languages going to replace static languages? ... by brightball on Wednesday August 04, 2021 @03:00PM (#28064824)
This is taking it a step further though. Now you're talking about static typing in the client, the server and the database.

I agree that this is a different scenario. If you're able to have the client control the input to ensure only the correct types are passed in there may be some additional value there to keep things more sane.

However, how much of the data that you're dealing with in the client on the server and in the database are you really working with in the server itself? 1% of the variables? 2%?

Generally any heavy work will be handled in either the database itself or a background job just to reduce wait time for the client.

And if that's the case, you're spending the time defining types for the client, server and database, keeping them in sync, having to change them in each place and creating this exercise for the other 98-99% of variables passed in and out of your server just to gain the static benefit for the 1-2% where you're actually working with it in the server on the web request.

It's significantly more work with questionable benefits IMO.

Re:Are dynamic languages going to replace static languages? ... by lolinder on Wednesday August 04, 2021 @07:39PM (#28067860)
I guess that's true if you're dealing with an SPA. If your logic is primarily on the client, then the server doesn't benefit much from types. If your logic is primarily on the server, then your client doesn't. If it's a balance, then both do.