TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mistakes in programming language design

39 pointsby SlyShyalmost 15 years ago

4 comments

singularalmost 15 years ago
I totally disagree on the parser-unfriendly syntax point (no. 1). C++ is a particularly bad example in that code cannot be definitely parsed without semantic information, however I think limiting yourself to a language which can be expressed as LALR/LL(1) is pretty brain dead - you limit yourself to what a given algorithm can express clearly rather than what is clearest to the programmer. It's really actually pretty hard to make a language "naturally" LALR anyway, at least without hacks of some kind. C# definitely isn't LALR, there are many features which get in the way of LALR-ness, such as generics which are, however, useful.<p>I do agree on every other point, however!
评论 #1501088 未加载
评论 #1501266 未加载
评论 #1501364 未加载
评论 #1501573 未加载
RodgerTheGreatalmost 15 years ago
It's possible that I'm missing the thrust of #0, but I don't see how an object-oriented language completely without the concept of a "null pointer" could be used to construct elementary data structures like linked-lists and trees without resorting to special classes as terminators. It would be just as clumsy as using null pointers in the first place.<p>If "not-null" references were provided in addition to normal references, the effect would be pretty similar to the common usage of "final" fields in Java- compiler-enforced initialization.
评论 #1501658 未加载
评论 #1501620 未加载
评论 #1501714 未加载
评论 #1501919 未加载
评论 #1501763 未加载
jmillikinalmost 15 years ago
&#62; Dynamic languages are fast enough to implement internet services and outgrow the demeaning term "scripting language".<p>This is never going to happen, because "scripting language" is used as a slur or insult, rather than a term with any usefully defined meaning. It's not possible for Python to "outgrow" being a scripting language as long as that's used as a condescending shorthand for "doesn't look like C++".<p>Consider Ruby. How many applications do you know of which use Ruby for scripting? Or Python -- I think my system has two applications which can be scripted in Python (Gimp and Blender), but many dozens of applications <i>written in</i> Python. If Ruby and Python are scripting languages, then so are Smalltalk, Haskell, Boo, or dozens of other high-level languages. And yet, you'll never hear of these being called "scripting languages" because nobody has an axe to grind against them.<p>------------<p>Unrelated to that, Haskell does have pointers (including null pointers) -- you can use them just like pointers in C/C++.
评论 #1501272 未加载
j_bakeralmost 15 years ago
I don't necessarily agree with #2. Yeah, SML has formalized syntax, but it's also a frozen language. It simply isn't practical to have completely formalized semantics for a language like Python or Ruby that are still actively being changed. Nor is it necessarily always possible to eliminate all implementation-specific quirks.<p>In short, it's a good thing to have a language have few quirks, but there is such thing as overspecifying.
评论 #1501317 未加载