4 ms·
I understand that, but as I said I don't like that at all. It binds methods to low-level adhoc features and not to class based domain ontologies. There are othe
by lispm 9y ago
I understand that, but as I said I don't like that at all. It binds methods to low-level adhoc features and not to class based domain ontologies. There are other pattern directed invocation systems, which also support that, but I usually prefer the more systematic approach of CLOS. In the tradition of symbolic programming I want to have symbolic classes as my anchors for functionality, not adhoc patterns.
- weavejester 9y agoYou can still create class-like ontologies with Clojure specs, but usually you don't need to. Clojure's specs, adhoc or otherwise, certainly might not be your cup of tea. Clojure really pushes the idea of separation and isolation, and in my view you need to buy into that philosophy to be at all comfortable with the language. Where I disagree with you is your assertion that maps in Clojure are always less structured than objects. I'd claim that (at least when properly spec'ed out) they provide far more structure than objects.
- lispm 9y agoI'm not talking about what is possible or what can be done. I'm talking about what is natural and promoted. See the message the article communicates: > It promotes combinations of built-in data structures (lists, maps, vectors) over objects I would say that this is actually the case and this article is not the only one to say that.
- weavejester 9y agoYes, but as I said, using data structures over objects doesn't mean the data is unstructured. You can use lists, maps and vectors and still have a well defined and validated structure.