Which programming language has the prettiest syntax?
Meghan (she/her)

Meghan (she/her) @nektro

About: 24. Local trans witch who prefers to do magic with a keyboard. she/her. Currently hacking away at making the Web less centralized.

Location:
Massachusetts, USA
Joined:
Mar 13, 2017

Which programming language has the prettiest syntax?

Publish Date: Mar 7 '18
12 14

Which programming languages do you never get tired of reading? Which designers nailed the readability factor?

Comments 14 total

  • Valentin Baca
    Valentin BacaMar 7, 2018

    Python, Ruby, Go, and well-written C and SQL.

    I like terse syntax, lots of syntactic sugar, and languages that just say what they're doing

    I love love love that go has One Format Style. Done. I care about code style so much that I just don't want to deal with it anymore, if that makes any sense?

  • eronaeon
    eronaeonMar 7, 2018

    Javascript ES6+/Typescript

    • Ben Halpern
      Ben HalpernMar 7, 2018

      I haven't found Typescript very pleasant to look at—though I haven't given it a lot of time.

      • Isaac Lyman
        Isaac LymanMar 7, 2018

        TypeScript struck me as pretty ugly at first, like a pile of metadata stapled onto JavaScript. But I've come around to it. And it offers a couple of features that really do make ES more readable and expressive, like enums and interfaces.

        More generally, I think any language that you can express yourself in and have experience with will become "pretty" to you, as long as it doesn't actively frustrate you.

        • gengns
          gengnsMar 26, 2019

          You can use the standard, JSDocs and type inference with your IDE to archive the same goal without compiling and adding extra code.

  • Sergey Kislyakov
    Sergey KislyakovMar 7, 2018

    I find myself liking every language that's being used properly and well-written (formatting, etc.). Though my favorite is Ruby because of its syntax sugar things.

  • Donald Merand
    Donald MerandMar 7, 2018

    Elixir! It has a lot of the syntactical sugar from Ruby, which is very nice, but mainly I just love reading functions that look like:

    def the_main_workflow(data, other_data) do
      data
      |> first_transformation
      |> now_spice_it_up_with(other_data)
      |> one_last_transformation
    end
    
  • Ben Halpern
    Ben HalpernMar 7, 2018

    I most appreciate Ruby when I have to spend large amounts of time reading basically any other language.

    I like the Erlang thing where . ends the routine as if it were ending a sentence. Of course, dot-notation being so pervasive makes it kind of impractical. But if I were making a language from scratch I might consider that as a way to be more language-like.

    Example:

    f({connect,_,To,_,_} = Signal, To) ->
        ...;
    f(Signal, To) ->
        ignore.
    
  • Kasey Speakman
    Kasey SpeakmanMar 7, 2018

    Piet

    This is a Piet program that prints "Piet".

    piet source image

  • Meghan (she/her)
    Meghan (she/her)May 11, 2019

    functional programming languages are very pretty. more recently I've been using Go a lot, which is very nice also

  • Umair Ali ✳️
    Umair Ali ✳️May 14, 2019

    Given below is for loop syntax to ‘print 1 to 10 numbers’ in 4 different Programming languages:

    1

    JAVA for(int i=1;i<11;i++){ System.out.println(i);
    }

    2

    Python for x in range(1,11):
    print(x)

    3

    Kotlin for (i in 1..10) {
    println(i)
    }

    4

    Swift for i in 1...10 {
    print(i)
    }

    You are required to calculate points of each language on the basis of the following aspects:

    1. Readability
    2. Reliability
    3. Cost/Programming effort You have total of 30 points for each language.10 points for each aspect based on your opinion. Scale: 1 point lowest and 10 highest
  • Dimer1275
    Dimer1275Sep 18, 2020

    C#

Add comment