Live data from Hacker News

Ask HN: what language should I learn next?

news.ycombinator.com

11–20 of 63 posts

Re: Ask HN: what language should I learn next?

#12

OCaml. If you've been working with languages dynamically typed at runtime, using something statically typed at compile time will be very informative. Unlike most other statically typed languages, OCaml's type inference turns the type system from a thing that needs to be constantly appeased to a free reality check when you need it. OCaml will also teach you functional programming tricks usable in Ruby, or several othe…

Thanks - OCaml looks interesting, and would be a little further from Ruby than Lisp because of its static typing, right?

Any frameworks (or good libraries) for web apps? I enjoy digging into languages on their own, but I also want to get things done, which is usually easier with decent libraries for data persistence and user interface.

Re: Ask HN: what language should I learn next?

#13
post #6
post #5

Hindi! Everything will eventually be outsourced to india, anyway. Seriously though... Python is probably the best option, followed closely by Java.

Hindi! Everything will eventually be outsourced to india, anyway. Please keep this kind of thing off HN.

The funny thing is that once I considered learning Chinese because, at the time, I was in the middle of a hardware project where we had to deal with motherboard and other component suppliers located in China and our communications were constantly breaking down because we couldn't agree on a common subset of English.

So, if you really have to spend time with people who don't speak your first (or second, or third) language, it's always a good idea to invest some time learning their first one.

And it also shows you care.

Re: Ask HN: what language should I learn next?

#14

OCaml. If you've been working with languages dynamically typed at runtime, using something statically typed at compile time will be very informative. Unlike most other statically typed languages, OCaml's type inference turns the type system from a thing that needs to be constantly appeased to a free reality check when you need it. OCaml will also teach you functional programming tricks usable in Ruby, or several othe…

Thanks - OCaml looks interesting, and would be a little further from Ruby than Lisp because of its static typing, right? Any frameworks (or good libraries) for web apps? I enjoy digging into languages on their own, but I also want to get things done, which is usually easier with decent libraries for data persistence and user interface.

Some type terminology:

Statically typed: This variable will always hold a 16-bit int. vs. Dynamically typed: The value in this variable happens to be a 16-bit int right now.

Strongly typed: This is a 16-bit int, nothing else. vs. Weakly typed: This is bits in memory, we could try using it as a number. (Things like: "the" * 3 probably result in "thethethe" or a crash, rather than a warning or error from the compiler/interpreter.)

(Warning -- there are disagreements about subtleties in these definitions, much like what "Object-Oriented" actually means. I'm trying to summarize things enough to be useful here.)

Lisp is strongly, dynamically typed by default, e.g., the value in a variable is definitely a specific type, but could be replaced with a completely different thing. The type is associated with the value, not its container. (You can declare something to be only a specific type for optimization, though, and some of the better compilers also try to infer types, I think.)

C is strongly, statically typed, but the type system is full of holes, since you can recast anything as a void ptr and then something else. The type system is there for efficiency's sake, but it's easy to lie to, and it crashes hard if you aren't careful.

OCaml doesn't let you do this; it also automatically infers the types of things based on their usage, and gives you an error when it's ambiguous. If you want to do something that could take an int or a string, you would use a union type, e.g. " type int_or_string = I of int | S of string " and handle either possibility.

As for web apps, I don't have much experience there yet, sorry.

Re: Ask HN: what language should I learn next?

#16
post #6
post #5

Hindi! Everything will eventually be outsourced to india, anyway. Seriously though... Python is probably the best option, followed closely by Java.

Hindi! Everything will eventually be outsourced to india, anyway. Please keep this kind of thing off HN.

It was a joke. Soon after followed by a serious comment.

I would agree with what you said, had the comment been completely devoid of content, but as it is, I think you're being way too harsh.

Re: Ask HN: what language should I learn next?

#17
Perhaps you are asking the wrong question here. Instead of learning a new programming language for web apps, maybe you ought to try programming a type of application that is new for you. I think that taking a go at something like a client-server, embedded, mobile, or desktop application would help broaden your perspective and abilities more than simply learning a new language would.

Re: Ask HN: what language should I learn next?

#18
If you want to stay on the OO path, I would suggest Smalltalk (Squeak), or the simple but powerful Io programming language (http://iolanguage.com/).

C is also an important language to learn if you don't know it already. You could use it to implement a simple database for a very specific task (http://cr.yp.to/cdb.html)

Re: Ask HN: what language should I learn next?

#20

OCaml. If you've been working with languages dynamically typed at runtime, using something statically typed at compile time will be very informative. Unlike most other statically typed languages, OCaml's type inference turns the type system from a thing that needs to be constantly appeased to a free reality check when you need it. OCaml will also teach you functional programming tricks usable in Ruby, or several othe…

Thanks - OCaml looks interesting, and would be a little further from Ruby than Lisp because of its static typing, right? Any frameworks (or good libraries) for web apps? I enjoy digging into languages on their own, but I also want to get things done, which is usually easier with decent libraries for data persistence and user interface.

If you want to learn a new language and a new framework, you should try Seaside. It is a very interesting approach to web development.
Post reply on HN