7 ms·
object oriented JS, gross
by torkable 12y ago
object oriented JS, gross
- Impossible 12y agoIt's not js, it's Processing, which is a simplified version of Java with an elegant, simple API for doing graphics and visual art. It compiles to Javascript via Processing.js.
- shangxiao 12y agoBetter not define any functions or arrays then, they're objects and that would be "gross"
- jackmaney 12y agoBetter abandon any front-end JS, too...
- krick 12y agoActually functions or array being objects internally has nothing to do with "object-oriented" as style of writing code. Here it is about style, which is obviously dictated by Processing (and thus Proseccing.js) being ideologically object-oriented. So, well, yeah, it is quite more object-oriented than "proper" code in js, although I don't see why it is such a problem for the person you relply to.
- deleted 12y ago[deleted]
- shangxiao 12y agoWell actually it does. Every time you do an someArray.push(val), that's "object oriented as a style of writing code". If you're referring to the style in the article (ie the Java code), well that's classical object oriented.
- rco8786 12y agoIt's Java...
- TheRealPomax 12y agowell, close to. Processing is based on Java, but has a simplified syntax, different visibility model, and different scoping rules. Primarily due to how pde source code gets aggregated into a single class which can be compiled to run in the JVM, but because it's not actually Java any non-JVM implementation of a Procesing runner can pretty much ignore Java entirely and simply implement the much simpler Processing interpretation.
- lotsofmangos 12y agodon't be daft, OO is far more classy...