Skip to content

Instantly share code, notes, and snippets.

@bmaupin
Last active June 20, 2022 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmaupin/6a2b9924c15a3dab74068e4552efdd92 to your computer and use it in GitHub Desktop.
Save bmaupin/6a2b9924c15a3dab74068e4552efdd92 to your computer and use it in GitHub Desktop.
Thoughts on programming languages

β“˜ This list is more-or-less limited to languages I have personal experience with

C#

  • Recommended?: πŸ‘Ž
  • Pros
    • Like a more modern Java without a lot of Java's problems
  • Cons

Go

  • Recommended?: πŸ‘Ž
    • Life is too short to use programming languages that aren't fun to write πŸ™ƒ
  • Pros
    • Very fast
    • Great concurrency support
    • Great tools
    • Spec is consise and simple enough you can hold most of the language in your head
    • Cross-compiling is super simple
    • Compiles to a native executable
  • Cons
    • Not fun to write
      • Very pedantic; compiles will fail with unused libraries, variables, etc
      • No exceptions, only error codes, which must all be handled explictly which is annoying to do and the code ends up littered with error code handling
    • No REPL for quick hacking
    • Language authors encourage overly terse usage (single character variable names, etc)
    • Tabs instead of spaces; can be mostly ignored thanks to gofmt but still eww

Groovy

  • Recommended?: πŸ‘Ž
    • Groovy's not a bad language but now that Kotlin is here I don't see much future for it
  • Pros
    • Modern language with a lot of nice features
  • Cons
    • Never really gained traction, overshadowed by Kotlin

Java

  • Recommended?: πŸ‘Ž
    • You can get the benefits of Java without the downsides by using a modern JDK language like Kotlin
  • Pros
    • Well-established language with lots of commercial and library support
  • Cons
    • Verbose
    • Has a lot of baggage due to it being an old language that maintains backward compatibility

JavaScript

  • Recommended?: πŸ‘
  • Pros
    • Due to it being included in browsers, it's everywhere
    • Can be used for browser applications, server applications (via Node.js and others), mobile applications (React Native, etc), desktop applications (Electron, etc)
    • The most popular programming language since the last decade, which means massive communmity and library support
  • Cons
    • Has some baggage due to it being an old language that maintains backward compatibility
    • No static types (yet)
    • Can be compiled to static binaries using tools like pkg, but the resulting binaries are huge (hello world is ~40 MB)

Kotlin

  • Recommended?: πŸ‘
  • Pros
    • Modern language
    • Seems to be the first real JVM language other than Java to gain traction, likely due to backing by JetBrains (who created it) and Google (who added official support to Android)

Perl

  • Recommended?: πŸ‘ŽπŸ‘ŽπŸ‘Ž
    • This is valid Perl; I rest my case:

      $_=q(s%(.*)%$_=qq(\$_=q($1),$1),print%e),s%(.*)%$_=qq(\$_=q($1),$1),print%e 

Python

  • Recommended?: πŸ€·β€β™‚οΈ
  • Pros
    • Easy to learn and pretty human-readable, e.g.

      for item in list:
        do_something(item)
    • Built-in support for static types

  • Cons

Swift

TypeScript

  • Recommended?: πŸ‘πŸ‘
  • Pros
    • All of the advantages of JavaScript, plus static types and a few other minor features (like enums)
  • Cons
@willsheppard
Copy link

willsheppard commented May 25, 2022

How about a more balanced review of Perl?
You can write bad code in any language.
The flexibility of Perl could also be considered a benefit.

  • Pros
    • It comes pre-installed on almost every server
    • Mature language, under active development, dedicated community
    • Extensive module archive (CPAN)
    • Flexibility allows you to write code in the way you want
  • Cons
    • Not strongly typed
    • Syntax can be confusing with many different symbols used
    • So much flexibility it can be hard to keep code neat and tidy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment