Hacker Newsnew | past | comments | ask | show | jobs | submit | 9diov's commentslogin

There are cases when the OOP way clearly has the disadvantage. That's why you need visitor pattern (https://en.wikipedia.org/wiki/Visitor_pattern?useskin=vector). The ADT approach is superior in those cases, as stated in the link above.


There are cases when the FP way clearly has the disadvantage. That's why you need the "record-of-function-pointers" pattern. The interface-and-implementations approach is superior in those cases.


Haha lovely, clearly we are in agreement here. You even put that in your book isn't it?

> The Visitor pattern is really about approximating the functional style within an OOP language (source: https://craftinginterpreters.com/representing-code.html)

The expression problem is one of those "mathematical duality" or yin-yang thing in software design that are less well-known for some reason. People keep pointlessly arguing in favor of one or another without knowing this duality.

Another favorite of mine is SQL vs NoSQL which Erik Meijer mathematically proved to be dual of each other using category theory (https://queue.acm.org/detail.cfm?id=1961297).


Are you talking about the specific case in the expression problem article? It seems to mainly be a problem when an object's behavior can't be modified, either through the language faculties or through other means like a module system. I don't disagree with its conclusions but I believe it to be a problem of language capabilities.


Maybe we'd all be happier with multi-methods

https://nice.sourceforge.net/visitor.html


The paper "Out of the tar pit" (https://github.com/papers-we-love/papers-we-love/blob/master...) discusses this in more details. Basically it argues that one needs to separate the complexity into essential complexity (complexity inherent to the problem) and accidental complexity (complexity due to the way the solution is designed). The idea is to reduce accidental complexity as much as possible while making the essential complexity more managegable.

The paper also discusses that you can separate a program into

1. state (data that changes over time)

2. behavior (computational logic)

In order to reduce the accidental complexity, you can use functional programming (which is purely behavior, devoid of complexity due to state mutation) for the behavior part. For the state part, you can use a relational database to manage it in a more systematic manner. They call it functional-relational approach to software design.

If you do game development, you likely heard of ECS (entity-component-system) and data oriented programming which in a way promotes this approach to software design.


Looks like you discovered Taoism on you own


Such is the way... universally apparent, yet difficult to see.


For anyone who is not familiar with Looker, I wrote a write-up and review about it here https://www.holistics.io/blog/looker-review-and-breakdown/. Here are the key points:

- Its use of LookML provides a steep learning curve, yet provides a maintainable and reusable data modeling

- Looker's drill-down ability is decently powerful and easy to use once you are familiar with LookML.

- Looker does not have its own storage layer but instead relies on customer's data warehouses

- Looker, in essence, is a SQL query builder engine that converts business users' drag-and-drop inputs into SQL queries.

- Looker provides highly flexible and sophisticated access control and permission management, sacrificing simplicity for power.

- Looker has limited data preparation capabilities compared to other tools, delegating this task to its partners to provide these capabilities.


It is good and all that they provide more services but why can't they provide the bread and butter of IAAS: virtual networking (aka VPC) - the ability to set up a virtual router and other nodes inside a private network. We are DO customer currently and need to hack around this limitation for quite a while now and it is the main reason we want to switch away.



DO's "private" networking was not even truly "private" previously as it was shared among its customers. Only recently did it get to the point that the "private" network is separated from the rest. Anyway, even the new "private" network does not allow for something like installing a custom DHCP server and configuring custom subnet for the nodes inside. One of the most common use cases is to route outbound traffic from all the nodes inside a private network through a public gateway and DO's current configuration does not allow that.


You can use Ranger (https://github.com/ranger/ranger) which is available on most Linux distros nowadays. It is fully hackable (written in Python). You can change the file association (which command to open which file) by editing ~/.config/ranger/rifle.conf. More details here: https://wiki.archlinux.org/index.php/ranger#File_association


Thanks, I was hoping someone would be able to point me towards a similar file manager!


I think the problem is that the definition of goals is too vague and narrow causing the problem with using SMART system. I believe you need a hierarchy of goals, like so:

- Mission: This could be specific like "bring humans to Mars" or it could be vague like "accelerate space exploration".

- Strategy: This should be the principles and methods used to implement the mission. Example: "Starting up a private company that works on rocket technology. Sell electric cars on the side to make money."

- Roadmap: This should be actionable, measurable and time-based such as "build a reusable rocket by 2016"


Eh, Vue support the same thing too with render function. Under the hood, the template is compiled to a single render function too.


You should try ripgrep (https://github.com/BurntSushi/ripgrep) which has the same functionality but with 2 orders of magnitude faster.


I used to use grep and ag quite often until I found ripgrep. It's really an incredible piece of software.


  Any extraneous cognitive load just takes focus away from what I'm actually meant to be doing.
And Vim is the tool to do just that. It saves your cognitive load spent to edit text so you have more for thinking.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: