2 ms·
The central issue for me is that I don't like getting bogged down in the meta. I hate the idea that a lot of what programmers do is program around programming,
by tolmasky 17y ago
The central issue for me is that I don't like getting bogged down in the meta. I hate the idea that a lot of what programmers do is program around programming, as opposed to actually solving real world problems with their programs. Of course the end goal is solving said problem, but you have to do a lot of meta to get there. Its unfortunate how much of our libraries and so forth are just pure architecture.
I like language features because they provide a clear distinction between the meta (things that I have to do due to the limitations of my execution environment) vs. the actual steps I'm taking to calculate some result or provide some service. When I see a language keyword or operator its clear to me that this is glue/implementation, and when I see a function call its clear to me that this is an actual step related to the algorithm. Classes and modules and templates and all these "objects" ideas have little to nothing to do with algorithms, they are simply the way we choose to implement those algorithms.
This varies language to language of course. Smalltalk has the advantage that I can create library features that "look" like language features. This is a big plus in my book. I think if I were using Smalltalk I would probably not have a problem with this at all. However, taking an example like JavaScript, I very much dislike this style (which many js frameworks currently use):
classCreate("MyClass", mySuperClass, properties);
//...
cosine(angle);
In a cursory view, the actual work (calculating cosine), looks exactly the same as creating a class, there's no visual distinction. Additionally, this encourages every library under the sun to make their own slightly different version of the class create/subclass method which makes it difficult for IDE writers to be able to pick up on these semantic elements of your program, since it really just is a function call and nothing more.
- DougBTX 17y agoThat classCreate syntax looks really bad, I've not seen it used before. A more sane syntax would be... var MyClass = SuperClass.extend({ ... properties ... }); which has been working quite well in my current projects.