aeveltstra, (edited )
@aeveltstra@mastodon.social avatar

Reflection considered harmful

In the and OOP programming languages, is used to not only review an object’s private fields and methods, but also to access and change them.

This is used for instance by large libraries and frameworks, by preprocessors, and of course by the standard library itself.

It is dangerous because it can break a class’ definition of what should be private and inaccessible.

Every programmer should know.

infosec812,
@infosec812@foojay.social avatar

@aeveltstra
Which is why Java is creating better APIs for managing this in newer versions of the language and compiler.

aeveltstra,
@aeveltstra@mastodon.social avatar

@infosec812 Awesome! Looking forward to it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Java
  • ngwrru68w68
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • kavyap
  • cubers
  • megavids
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • JUstTest
  • lostlight
  • All magazines