mirror of
https://github.com/github/semantic.git
synced 2025-01-02 12:23:08 +03:00
Merge pull request #29 from github/update-stack-docs
Docs: specify we use cabal (and stack internally)
This commit is contained in:
commit
38198bcf1e
@ -4,7 +4,7 @@ Semantic is written in Haskell and we expect newcomers to the code base to have
|
||||
|
||||
# What is Haskell?
|
||||
|
||||
Haskell is a standardized, general-purpose, compiled, purely functional programming language with non-strict semantics and strong static typing[[1][]]. We use the venerable [Glasgow Haskell Compiler][GHC] (GHC) and the build system [Stack][]. That opening sentence is dense enough that you could spend many hours researching the history and merits of things like "purely functional", "non-strict semantics", and "strong static typing". We'll leave that as an exercise to the reader and instead focus on a couple of interesting aspects of the language that we lean on heavily in Semantic.
|
||||
Haskell is a standardized, general-purpose, compiled, purely functional programming language with non-strict semantics and strong static typing[[1][]]. We use the venerable [Glasgow Haskell Compiler][GHC] (GHC) and the build system [cabal][], having also used [Stack][] internally. That opening sentence is dense enough that you could spend many hours researching the history and merits of things like "purely functional", "non-strict semantics", and "strong static typing". We'll leave that as an exercise to the reader and instead focus on a couple of interesting aspects of the language that we lean on heavily in Semantic.
|
||||
|
||||
# Why Haskell?
|
||||
|
||||
@ -49,6 +49,7 @@ Haskell is a pleasure to work in everyday. It's both productive and eye-opening.
|
||||
At this point, we are pretty firmly attached to Haskell's language features to enable many of the objectives of this project: abstract interpretation, graph analysis, effect analysis, code writing, AST matching, etc. Could you implement Semantic in another programming language? Certainly. An early prototype of the semantic diff portion of the project was done in Swift, but it quickly became unwieldy and even the first rough Haskell prototype was considerably more performant. Since adopting Haskell, we've had no trouble plugging into the rest of GitHub's infrastructure: running as a command line tool, a web server (HTTP/JSON), and now a Twirp RPC server. We've been an early adopter of Kubernetes and Moda and now ~~gRPC~~ Twirp at GitHub, often shipping our application on these new infrastructure components well ahead of other teams. We've managed our own build systems, quickly adopted new technologies like Docker, shipped in Enterprise, and much, much more in the short lifespan of the project. We've yet to be constrained by our language choice. If anything, we are amazed daily at Semantic's ability to abstract and represent the syntax and evaluation semantics of half a dozen (and counting) programming languages while keeping all the benefits of a strong static type system. If we'd chosen a more "popular" language it's likely we'd be mired in hundreds of thousands of lines of code and complaining about our tech debt, application performance, and the burden of adding any more languages. As it stands today, we've got 20k lines of Haskell code and some incredible program analysis capabilities at our disposal with little fear of adding more languages or supporting the changing needs of GitHub.
|
||||
|
||||
[1]: https://en.wikipedia.org/wiki/Haskell_(programming_language)
|
||||
[cabal]: https://cabal.readthedocs.io/en/latest/
|
||||
[Stack]: https://docs.haskellstack.org/en/stable/README/
|
||||
[GHC]: https://en.wikipedia.org/wiki/Glasgow_Haskell_Compiler
|
||||
[Facebook]: https://github.com/facebook/Haxl
|
||||
|
Loading…
Reference in New Issue
Block a user