←back to thread

Go is still not good

(blog.habets.se)
644 points ustad | 7 comments | | HN request time: 0.34s | source | bottom
Show context
pjmlp ◴[] No.44983556[source]
As usual, lets revisit something that Pascal could do in 1976,

    type

    StatusCodes = (Success, Ongoing, Done)
Go in 2025,

    type StatusCodes int

    const (
        Success StatusCodes = iota
        Ongoing
        Done
    )
replies(4): >>44983559 #>>44983614 #>>44983648 #>>44986881 #
1. thiht ◴[] No.44983559[source]
Where's Pascal today?
replies(5): >>44983595 #>>44983604 #>>44983630 #>>44983657 #>>44989310 #
2. terminalbraid ◴[] No.44983595[source]
Just below Go with Perl in between. All above Fortran, all below Visual Basic.

https://www.tiobe.com/tiobe-index/

3. ofrzeta ◴[] No.44983604[source]
It's alive and kicking, right? :) https://www.freepascal.org They even have a game engine that can compile to a WASM target: https://castle-engine.io/web
4. dardeaup ◴[] No.44983630[source]
Ouch!! Pascal's lack of popularity certainly isn't due to the fact that it supports such nice enumerated types (or sets for that matter). I think he was just pointing out that such nice things have existed (and been known to exist) for a long time and that it's odd that a new language couldn't have borrowed the feature.
5. pjmlp ◴[] No.44983657[source]
Being used by these folks, https://www.embarcadero.com/

If you prefer, I can provide the same example in C, C++, D, Java, C#, Scala, Kotlin, Swift, Rust, Nim, Zig, Odin.

replies(1): >>44988665 #
6. fuzztester ◴[] No.44988665[source]
Please do. Would be interesting to read.
7. kragen ◴[] No.44989310[source]
Pascal evolved into Modula-2, which Wirth then simplified into Oberon. His student Griesemer did his dissertation on extending Oberon for parallel programming on supercomputers. Concurrently, Pike found Modula-2 an inspiration for some languages he wrote in the 80s and 90s. He got together with Griesemer and Ken Thompson to rework one of those languages, Newsqueak, into Golang. So that's where Pascal is today.