5 ms·
With that argument you could invalidate any high-level language construct. They're all just "specialized syntax" of classic idioms in Assembly.
by bigfoot 15y ago
With that argument you could invalidate any high-level language construct. They're all just "specialized syntax" of classic idioms in Assembly.
- randombit 15y agoExactly. And nobody thinks that for loops are "magic".
- rogerbraun 15y agoNo, but for loops are simple. Classes are not that simple. Of course, no feature really is "magic". But there are a lot of features that may be easy to use but hard to deeply understand. Take for example the attr_accessor method that Ruby uses to make variables pseudo-public. Most beginners coming from Java think that it is a language keyword, similar to "public". In fact, it just writes getters and setters for you. Of course, everyone could just write their getters and setters themselves, but this is just what language is: A way to abstractly tell a machine what to do. And if you don't know how it works (and maybe even don't need to know), you can call it "magic".