TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

When FP? And when OOP?

2 pointsby tuanabout 9 years ago

1 comment

CyberFonicabout 9 years ago
Great post!<p>In Abadi &amp; Cardelli&#x27;s &quot;A Theory of Objects&quot; they show that you can implement FP using OOP environment, but you can&#x27;t implement OOP using FP. Of course, the both Common Lisp and Scheme have created OOP frameworks - maybe they didn&#x27;t read that book :-)<p>As for PL&#x2F;SQL: I&#x27;ve found that &quot;transactions&quot; are best implemented using PL&#x2F;SQL stored procedures, so that the business logic is encapsulated and thus becomes an OO API. However, queries for reports, analyses are best implemented directly in SQL. Of course, writing good reports requires a strong understanding of the underlying tables, their relationships and the available indices.