Live data from Hacker News

Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

news.ycombinator.com

51–60 of 60 posts

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#51

Earlier quoted context omitted.

Isn't scheme a subset of common lisp (at least loosely speaking)?

For one thing, scheme has continuations, a powerful construct that Common Lisp lacks. But it's true that Common Lisp is generally more "featureful".

That's a feature that scheme has that common lisp doesn't, but is this supported by a new syntax? I think that it is not clear cut what is a syntactical difference versus a difference in the feature set.

edit: I guess what I'm really asking is there someway in lisp to make a construct that would look just like call/cc? If you could then that's just a feature difference, but if you can't I would agree that's a syntactical difference.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#52
post #26

Earlier quoted context omitted.

I don't mean to be pedantic, but the 'Java is slow' thing simply isn't true anymore. It certainly used to be slow back in the day, but it's actually pretty good these days. From what I've heard, programmers at Google put it in the same ballpark as C++. This brings me to another point.. the choice of programming language often has more to do with image and branding as opposed to actual technical merit. That's why we k…

JIT compiled languages are slow to load, because they have to compile each bit of code the first time they run it. That is why Java is known as a slow language, even though it does fine in benchmarks: because loading is the one operation that's slow enough for the user to notice.

The thing is, even compiled C++ apps are no better when loading a bunch of shared libraries etc.

OpenOffice.. I'm looking at you! ;-)

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#53
post #26

Earlier quoted context omitted.

I don't mean to be pedantic, but the 'Java is slow' thing simply isn't true anymore. It certainly used to be slow back in the day, but it's actually pretty good these days. From what I've heard, programmers at Google put it in the same ballpark as C++. This brings me to another point.. the choice of programming language often has more to do with image and branding as opposed to actual technical merit. That's why we k…

JIT compiled languages are slow to load, because they have to compile each bit of code the first time they run it. That is why Java is known as a slow language, even though it does fine in benchmarks: because loading is the one operation that's slow enough for the user to notice.

Counter-example: LuaJIT (http://luajit.org/luajit_performance.html), largely because the compiler / optimizer themselves are extraordinarily small.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#54

Earlier quoted context omitted.

My theory: people who don't like s-expressions don't get programming; Thus, everyone who gets programming and is exposed to lisp becomes a lisp programmer, and people who suck at programming are left out.

I know many people who are counterexamples to your theory. Languages like Perl and Python have a strong advantage in libraries. If you don't need the things that only Lisp can do, there's not as much of a reason to use it.

I think the parent comment was probably trolling, but as someone who loves Lisp I have to say that some people have deeper reasons for not liking it than "libraries". A few of the best programmers I know just don't like Lisp. They tell me s-expressions don't fit the way their brains work. I'm not inclined to dismiss this as laziness, stupidity, or ignorance - though it's tempting :)

If you don't need the things that only Lisp can do, there's not as much of a reason to use it.

This is not an unreasonable thing to say, yet I'm skeptical. The problem is that a lot of the things that are natural to do in language X just wouldn't occur to you in language Y. I think this is a big problem with the way people compare programming languages. I've been meaning to write a post about it sometime.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#55
post #42

Earlier quoted context omitted.

I know many people who are counterexamples to your theory. Languages like Perl and Python have a strong advantage in libraries. If you don't need the things that only Lisp can do, there's not as much of a reason to use it.

The (derisive) saying used to be "You can write FORTRAN in any language" but you can also write Lisp in any language. Not that I completely agree with the GP's point.

you can also write Lisp in any language

No you can't. In fact, that's precisely what you can't do.

(Unless you're talking about writing a Lisp interpreter... but then your Lisp programs themselves would still be written in Lisp.)

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#56

Earlier quoted context omitted.

We have programming languages because people make them. The only way to have only 3 or 4 is to eradicate all but those and stop people from making more. However if we did that, I have a feeling we would now choose 1 or 2 that wouldn't exist if someone had done the same thing a decade ago.

A professor of mine once quipped: "What's the definition of a 'gentleman computer scientist?' Someone who knows how to make a their own computer language, but doesn't."

What about someone who knows how to get people on eLance to bid to make them for $1,000, no matter how impossible, but doesn't?

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#57

Earlier quoted context omitted.

My theory: people who don't like s-expressions don't get programming; Thus, everyone who gets programming and is exposed to lisp becomes a lisp programmer, and people who suck at programming are left out.

I know many people who are counterexamples to your theory. Languages like Perl and Python have a strong advantage in libraries. If you don't need the things that only Lisp can do, there's not as much of a reason to use it.

If you don't need the things that only Lisp can do, there's not as much of a reason to use it.

True. But the Lisp programmer would reply that you need the things only Lisp can do in most non-trivial programs.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#58

Earlier quoted context omitted.

My theory: people who don't like s-expressions don't get programming; Thus, everyone who gets programming and is exposed to lisp becomes a lisp programmer, and people who suck at programming are left out.

I'm a big fan of Lisp, but this is definitely not true. Do you think the CMUCL (a popular Common Lisp application) team who went on to make non-sexp based Dylan are just people who suck at programming? Or the functional programming community in general? Some of the members of that community who are of a certain age would have cut their teeth on Lisp, but they ended up designing/using *ML and Haskell. Or how about Ale…

Do you think the CMUCL team who went on to make non-sexp based Dylan are just people who suck at programming?

No, but close. They were designing a language for other people who did. The original intention with Dylan was to create a Lisp that was made more accessible for mainstream programmers.

Ditto Guy Steele on Java: "we were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp."

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#59

Earlier quoted context omitted.

A professor of mine once quipped: "What's the definition of a 'gentleman computer scientist?' Someone who knows how to make a their own computer language, but doesn't."

What about someone who knows how to get people on eLance to bid to make them for $1,000, no matter how impossible, but doesn't?

If you strip down a language so far that there's not much to it at all, then $1000 for a new language isn't so far fetched. Just don't ask for support for libraries, a JIT VM, etc. Then again, you could implement it on top of a pre-existing VM, and get access to libraries.

What about a minimalist subset of Python with curly braces instead of indenting? I think I'd actually like that language. Add an easy mapping to Python libraries, and you're done. $1000 is still a bit on the low end for that, but $3000 would seem quite reasonable.

Re: Ask HN: Can someone explain to me why all languages don't try to have the same syntax?

#60
post #58

Earlier quoted context omitted.

I'm a big fan of Lisp, but this is definitely not true. Do you think the CMUCL (a popular Common Lisp application) team who went on to make non-sexp based Dylan are just people who suck at programming? Or the functional programming community in general? Some of the members of that community who are of a certain age would have cut their teeth on Lisp, but they ended up designing/using *ML and Haskell. Or how about Ale…

Do you think the CMUCL team who went on to make non-sexp based Dylan are just people who suck at programming? No, but close. They were designing a language for other people who did. The original intention with Dylan was to create a Lisp that was made more accessible for mainstream programmers. Ditto Guy Steele on Java: "we were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to…

I didn't get to this in a timely manner due to a Christmas vacation, but I'll bite anyway.

I didn't know that Dylan was considered a LFM rather than a LFSP by its creators, but I do know that at least of them gets s-expressions and still thinks they're a bad idea. See Dave Moon's suggestion: http://www.archub.org/arcsug.txt

Post reply on HN