thtroyer

joined 1 year ago
MODERATOR OF
[–] thtroyer 2 points 1 year ago (1 children)

I'd like to be added to c/pico8 as well.

[–] thtroyer 1 points 1 year ago

I would avoid using it that way too. Seems like it could be a source of confusion in the future (another dev may assume it offers protection it doesn't), and I would guess most IDEs would flag it as unnecessary.

I do my best to avoid huge if blocks, but when they do happen, I prefer a small, simple comment noting the purpose.

[–] thtroyer 2 points 1 year ago (1 children)

Ah, that makes sense!

I guess I haven't really run into many examples like this. The times I've run into code where the former developers clearly struggled with handling types correctly has nearly always been their own fault (bad interface, bad organization of data, etc)

[–] thtroyer 3 points 1 year ago (1 children)

I'd be happy to help with c/java

[–] thtroyer 3 points 1 year ago (3 children)

Does anyone have any good examples where type erasure is actually a problem?

[–] thtroyer 2 points 1 year ago (2 children)

I was excited to use assert when I learned about it. I thought it would be ideal for short, clean guard clauses at the top of methods, to fail early on invalid data.

Once I realized that they're configurable and generally seemed to be off by default, they seem completely useless for that scenario. Doubly so when you're working in an environment where you don't control the server environment.

view more: ‹ prev next ›