4 ms·
Depends on what you consider obfuscation. Consider the following python code: a.b = c In isolation, there is really no way to tell what that line of code wi
by echlebek 11y ago
Depends on what you consider obfuscation. Consider the following python code:
a.b = c
In isolation, there is really no way to tell what that line of code will do. Maybe it will simply assign c to a.b. But because Python has property setters, it might also update some rows in a database[1], write a file, or make an HTTP request.
One might call that abstraction, but I think it qualifies as obfuscation. A single line can invoke arbitrary behaviour.
[1] This is how SQLAlchemy's models work. As I write this, the library is nearing it's 10,000th commit. A serious piece of software!
- wtetzner 11y ago> A single line can invoke arbitrary behaviour. Isn't that true of any language with even the simplest mechanism for abstraction? How about this go code? doStuff(1, 2) It could "update some rows in a database, write a file, or make an HTTP request."
- nickysielicki 11y agoI think that's fundementally different, you know you're calling a function there. An example in golang would be something like: type foo struct { a string b int c *someOtherStruct } var blah = foo{"example", 42, nil} blah.b = someMagicVariable
- meowface 11y agoSounds like your issue is with operator overloading. The same can be done in C++ and any other language with operator overloading.