4 ms·
It’s hard to argue with c# as a pragmatic choice today: The language itself has adopted just about everything interesting from contemporary languages, from pat
by CraigJPerry 5y ago
It’s hard to argue with c# as a pragmatic choice today:
The language itself has adopted just about everything interesting from contemporary languages, from pattern matching to top level statements allowing you to write a hello world or simple scripts that rival python for simplicity.
It’s performant, asp.net is at the top of the tech empower benchmarks, c# is only just behind c++ on the compiler benchamrks game leaderboards (although if you actually read the code i question the value of the deceptive impls there, e.g. the regex redux example is just calling a c library rather than using native c# facilities).
It’s not as memory efficient as go, by about 5x-10x worse but it’s comparable to java. The clr has a much faster allocator than go (although go developers just pre-allocate up front as an idiomatic optimisation).
Since dotnet 5.0 the developer experience is very decent across all platforms. 6.0 with its further enhanced hot reload etc looks even better.
It’s cross platform - apple tv apps or apple watch, ios, android, windows, linux, macos, they’re all first class citizens.
Whether you want to write 3d games (ubiquity), machine learning, web apps, desktop apps, mobile apps, wasm / blazor, it has 1st class support for them all.
And yet, i can’t help but feel common lisp is probably a better language.
The developer experience in CL is superior - repl driven development combined with structural editing and easily accessible ast manipulation just put CL (and other lisps) beyond what more static languages can ever hope to offer in terms of developer ergonomics.
- cutler 5y agoAll available with Clojure plus you get the JVM.
- CraigJPerry 5y agoAnd very slightly nicer syntax in clojure, at least to my eye (i'm talking about the vector arg list vs list, and i believe the use of a keyword as a function to pull a value from a map is a clojure-ism too. Both could be added to common lisp though - the vector arg list would be a short reader-macro and my lisp-foo isn't yet strong enough to say how to implement the keyword as a function thing but i'm 100% confident it can be done...)
- adamc 5y agoYou have to like the JVM, though, because all the errors are pretty much straight Java stacktraces -- very little encapsulation of any of that. So Clojure effectively means you have to know Java/JVM and Clojure.
- cutler 5y agoYou only need enough Java to read the stacktraces and that's being worked on by the Clojure core team.
- Zababa 5y ago"It’s performant, asp.net is at the top of the tech empower benchmarks, c# is only just behind c++ on the compiler benchamrks game leaderboards". That part isn't available with Clojure.
- mbrodersen 5y agoClojure is a thin layer on top of Java. So you have to constantly deal with both languages and how to map between them. So much for “simplicity”.
- cutler 5y agoNot so. Most Clojure code doesn't access Java at all. So long as you can read a stacktrace that's all the Java you need.
- smackeyacky 5y agoLisp probably is a better language, the pragmatism is what keeps me on C# for server systems. Ironically, now that the desktop gui trend is over, there is no better time for Lisp to make a comeback.
- igouy 5y ago> i question the value of the deceptive impls there, e.g. the regex redux example is just calling a c library rather than using native c# facilities). You'll find 2 C# regex redux programs when you look at all the regex redux programs — https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/regexredux.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... — or look at all the C# programs — https://benchmarksgame-team.pages.debian.net/benchmarksgame/measurements/csharpcore.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... One uses "native c# facilities" — https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/regexredux-csharpcore-5.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... — and the other uses PCRE2 — https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/regexredux-csharpcore-8.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... There's nothing "deceptive". You are explicitly told to look at the other programs.