News for hackers. Stuff that matters.
Re:What languages changed the way you think about programming? by AnimalMuppet on Friday April 24, 2015 @01:03PM (#9434580)
Perl. No, really. Hear me out.

"Read in a line. If it ends in a newline, remove it." We (humans) talk to each other that way. We use words like "it". But we can't talk to the computer like that. "Read in a line from where? Put it where? If it ends in a newline? If what ends in a newline?"

But in Perl, you can say "read in a line", and it means "read it from the standard place, since I didn't specify, and put it in the default variable, since I didn't specify that either". And "if it ends in a newline"? Well, since I didn't specify, that means "if the default variable ends in a newline".

This "natural language-like" approach to Perl is, I think, one of the really interesting ideas in programming. It shows that Larry Wall came from a linguistic background. (Note well: When I say "natural language-like", I am not referring to Perl's syntax!)

Other things I find really interesting:

C++: RAII.

Java: reflection.

Lisp: macros.

Haskell: the type system.

There are no comments on this comment yet.