C vs Hack: What are the differences?
Developers describe C as "One of the most widely used programming languages of all time". . On the other hand, Hack is detailed as "A programming language for HHVM that interoperates seamlessly with PHP". Hack provides instantaneous type checking via a local server that watches the filesystem. It typically runs in less than 200 milliseconds, making it easy to integrate into your development workflow without introducing a noticeable delay.
C and Hack can be categorized as "Languages" tools.
"Performance" is the primary reason why developers consider C over the competitors, whereas "Interoperates seamlessly with php" was stated as the key factor in picking Hack.
According to the StackShare community, C has a broader approval, being mentioned in 64 company stacks & 251 developers stacks; compared to Hack, which is listed in 8 company stacks and 3 developer stacks.
What is C?
What is Hack?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
What are the cons of using Hack?
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
Throughout 2016, Slack began migrating from PHP5 to Hack. They cite several well-known challenges inherent to PHP, including surprise type conversions, inconsistency around reference semantics, inconsistencies in the standard library, and the fact that “PHP tries very, very hard to keep the request running, even if it has done something deeply strange.”
To overcome these challenges while maintaining the unique values of PHP, Slack turned to Hack, a gradual typing system for PHP. Hack runs on the HipHop Virtual Machine, or HHVM, an open source just-in-time (JIT) environment for PHP.
One important decision for delivering a platform independent solution with low memory footprint and minimal dependencies was the choice of the programming language. We considered a few from Python (there was already a reasonably large Python code base at Thumbtack), to Go (we were taking our first steps with it), and even Rust (too immature at the time).
We ended up writing it in C. It was easy to meet all requirements with only one external dependency for implementing the web server, clearly no challenges running it on any of the Linux distributions we were maintaining, and arguably the implementation with the smallest memory footprint given the choices above.
Why Uber developed H3, our open source grid system to make geospatial data visualization and exploration easier and more efficient:
We decided to create H3 to combine the benefits of a hexagonal global grid system with a hierarchical indexing system. A global grid system usually requires at least two things: a map projection and a grid laid on top of the map. For map projection, we chose to use gnomonic projections centered on icosahedron faces. This projects from Earth as a sphere to an icosahedron, a twenty-sided platonic solid. The H3 grid is constructed by laying out 122 base cells over the Earth, with ten cells per face. H3 supports sixteen resolutions: https://eng.uber.com/h3/
Since the beginning, Cal Henderson has been the CTO of Slack. Earlier this year, he commented on a Quora question summarizing their current stack.Apps
- Desktop: And Electron to ship it as a desktop application.
- Android: a mix of Java and Kotlin.
- iOS: written in a mix of Objective C and Swift.
- The core application and the API written in PHP/Hack that runs on HHVM.
- The data is stored in MySQL using Vitess.
- Caching is done using Memcached and MCRouter.
- The search service takes help from SolrCloud, with various Java services.
- The messaging system uses WebSockets with many services in Java and Go.
- Load balancing is done using HAproxy with Consul for configuration.
- Most services talk to each other over gRPC,
- Some Thrift and JSON-over-HTTP
- Voice and video calling service was built in Elixir.
- Built using open source tools including Presto, Spark, Airflow, Hadoop and Kafka.
At FlowStack we write most of our backend in Go. Go is a well thought out language, with all the right compromises for speedy development of speedy and robust software. It's tooling is part of what makes Go such a great language. Testing and benchmarking is built into the language, in a way that makes it easy to ensure correctness and high performance. In most cases you can get more performance out of Rust and C or C++, but getting everything right is more cumbersome.
been programming in c for over a decade, since learning it in college. still use it for various low level projects. used it recently to develop an embedded application for a custom board.
The core of the arcapos applications is written in C, so are most of the Lua modules (bindings to various hardware or protocols).
The Sqreen PHP agent is both a PHP extension, built in C, and a daemon built in Python.