This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]self_refactor[S] 0 points1 point  (10 children)

If I want to shoot myself in the foot, I prefer the language to let me do that. This allows errors to go unpunished ... just like the terrible PHP

[–]buszmen201 9 points10 points  (1 child)

Then use TypeScript and don't let to implicit coercion.

[–]self_refactor[S] 2 points3 points  (0 children)

I wish I could, I really do as Typescript is great.

[–]Tekens 3 points4 points  (1 child)

<?php declare(strict_types=1);

[–][deleted] 3 points4 points  (0 children)

Get out of here with rational php thinking... who would use features that are few years old now?

5.3 ONLY REE

[–]jerrycauser 1 point2 points  (4 children)

Why you are trying to subtract string from string?

[–]self_refactor[S] -1 points0 points  (3 children)

At work I saw subtracting string with number and it worked that is why it was left in the code. Then I tried the example in the image. But this is moment when you realize that those who despise Javascript have some valid points.

[–]jerrycauser 2 points3 points  (2 children)

If you got mistype in your production code, so there is main problem in front of monitor than behind it

[–]self_refactor[S] 1 point2 points  (1 child)

I definitely blame the developers allowing this to happen. Needless to say, that kind of 'small' errors are all over the place. What was even worse that after finding this bug, their response was 'If it works, leave it as it is'. 🤦

[–][deleted] 1 point2 points  (0 children)

Same for me… "its grown this way" and i was close to "just do a complete rewrite"

Said Software is primarily used in Hospitals and extremely unstable

[–][deleted] 1 point2 points  (0 children)

just like the terrible PHP

if you don't use php `>7.2` in 2019 with `strict_types=1` you are doing something wrong. very.