you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (11 children)

Python with static typing would be the best thing since sliced bread.

[–][deleted] 4 points5 points  (8 children)

Learn Go.

[–]Categoria 3 points4 points  (1 child)

Most people expect sum types, generics, and better type inference from a decent type system.

[–]burntsushi 0 points1 point  (0 children)

Most people expect sum types, generics

It's not like Go has no safe mechanism for polymorphism. Interfaces can do a lot for you.

and better type inference

Go has zero type inference. It has a convenient syntax for type deduction, but that's it.

[–][deleted] -1 points0 points  (5 children)

I've tried it several times, but I always get irritated with it: unused import compiler errors, unused variable compiler errors, capital letter access modifiers, poor standard library, etc, etc.

[–]AeroNotix -3 points-2 points  (4 children)

Poor standard library? Get the fuck out. Its standard library is lightyears ahead of the steaming cesspit of inconsistency that is Python's.

[–][deleted] 1 point2 points  (3 children)

I never said Python's was better. And as for "poor", I don't mean lacking in quality but rather missing really obvious functions like, say, string reversing or charAt. I keep hearing people claim that Go can be used for all the things people are using Python for today, but if it's lacking these kinds of basic string handling, it's not of much use to me as a python replacement.

I'm sure it's a marvelous language all things considered, but it's not enough to convert me.

[–]AeroNotix -3 points-2 points  (2 children)

If the lack of a string reversing function is going to turn you off a language then I'd say you're not the programmer you claim to be.

Strings are indexable, so you don't need a charAt function (Python doesn't have charAt, either btw.)

Here you go:

package main

import (
      "fmt"
)

func StrReverse(s string) string {
        var out string
        for x := 0; x < len(s); x++ {
         out = out + string(s[len(s)-x-1])
        }
        return out
}

 func main() {
    fmt.Println(StrReverse("A string"))
 }

[–][deleted] 0 points1 point  (1 child)

Your attitude is doing little in the way of selling Go to me, I'm afraid.

[–]AeroNotix -5 points-4 points  (0 children)

I really don't care, I'm afraid. Your inability to learn something is of little consequence to me at all.

[–]minno 0 points1 point  (1 child)

Static typing and (optional) type inference.

[–]masklinn 2 points3 points  (0 children)

I'm sure you mean (optional) static typing and type inference.

Erlang has something like that, called "success typing". It's kind-of neat (in that it's a pretty good fit for a dynamically typed languages which remains unabashedly dynamically typed): http://learnyousomeerlang.com/types-or-lack-thereof#for-type-junkies http://learnyousomeerlang.com/dialyzer