Live data from Hacker News

Because It's Not Fun Enough: why languages fail

bytecode.news

61–70 of 146 posts

Re: Because It's Not Fun Enough: why languages fail

#61
post #17

Yes to all that but still, my pet theory is that languages rise on one or two "killer features" that move the entire industry forward, and not the overall cuteness or lovability. I can suggest a list of one killer feature per each popular language, i.e. things that these languages were the first to introduce and influence many successors: C: extreme conciseness C++: implicit destructors / RAII Python: removed curly b…

C is not "extremely concise". Lisp, and especially APL both predate C and are more concise. To me, the "killer feature" of C is UNIX, we can't really separate them, C won because UNIX won and vice versa. Other than that it is reasonably concise, reasonably portable and reasonably low level. The language itself doesn't have any "killer feature".

For Python, I think its killer feature, related to the removal of curly braces is that it is a dynamic language (like Perl) that forces you to write somewhat readable code. You have no choice but to indent correctly, and there is a strong "pythonic" ideal way of coding, the complete opposite of Perl's "more than one way to do it".

JavaScript killer feature is obviously its integration in browsers but it is also well designed for this task, with pretty good support for asynchronous programming.

Still, I don't think any of these languages were successful for their "killer features", more because of a combinations of many things. In many cases, they weren't even the first. For example, there are several langages that use indentation as syntax that predate Python. ( https://en.wikipedia.org/wiki/Off-side_rule )

Re: Because It's Not Fun Enough: why languages fail

#62
post #20

I was hoping it would address Lisp. Lisp is fun. The interactivity and instant turnaround of a Lisp REPL is still rarely matched in other languages. Common Lisp also solved a significant issue other languages didn't address well until much later: the ability to write high-level code that was fast on cheap hardware around the turn of the millennium. Lisp didn't get popular around the turn of the millennium. Success st…

I really enjoy writing lisp but the ecosystem of libraries is a barren wasteland.

Try to find a TLS library for Common Lisp that doesn't rely on openssl, for example. Last time I looked the most mature library was marked 'experimental'.

Re: Because It's Not Fun Enough: why languages fail

#63
post #3

> For the person who only wants the notes, the sampler wins the job outright, completely. It will never play the wrong thing or at the wrong moment. For the person playing, it fails, because driving it costs more than playing, and it never touches the art at all. This entire essay could be about AI adoption as well. Some programmers love to program, and while AI is great at producing the code, it doesn’t really visce…

> AI is great at producing the code

It's not. The latest-and-greatest models on $200/mo subscriptions routinely produce bloated code full of boilerplate. They are incapable of producing elegant, concise, readable, correct-by-design code - they literally can't do it, even with the smallest samples, and it gets much worse as the scale of the implementation increases. You can't will the capability into them through prompts. You probably could do so with fine-tuning or other techniques, but I suspect that would just make the variance higher - and the average code quality would be much lower than it already is.

The code generated by LLMs is passable, but never truly good. The same is true for LLM-generated designs and architectures, just even more so. They are trained on all the code out there, and the percentage of really good code is so vanishingly small that it's incredibly hard to replicate even for humans after a lifetime of learning. LLMs would need to reach a next level of capability to consistently recognize good code. Generating it consistently is out of the question for at least the next few generations of the AI.

Not all code has to, or needs to, be good. LLM-generated code is useful and helpful. It's an incredible time-saver for one-off scripts, and you can make an LLM implement and maintain parts of the program you need, but don't care to make good at the moment. LLMs are very efficient (if we ignore externalities) and easy-to-use code generators, which is huge in itself. However, they are not great or even good at generating code.

Last weekend, there was a post showcasing a Rust library with utility functions for writing parsers. It featured a simple line-by-line INI file parser. I decided to rewrite it in Python with PyParsing, a library I happen to know well. GPT-5.6-Sol High wrote the grammar that worked. It was tragically bloated, poorly factored, and multiple grammar problems were masked by parse actions. It worked, but it was decidedly bad code. I then rewrote the grammar by hand, getting it down to 1/3 of the length, eliminating all parse actions, and improving error messages in the process. I then spent 2 hours trying to convince the model to perform the same refactorings I did, but had to give up: no matter what I tried, the model couldn't get all the needed changes to coexist at the same time. When it got the terseness right, it inevitably ruined error handling. When it got the grammar right, it ruined the factoring. And so on.

Later on, I decided to make the model rewrite the PyParsing grammar in Smalltalk's PetitParser - a pretty close match in terms of capabilities. I gave the model my version of the grammar. I told it to translate that Python code. It still butchered more than half of it, doing "optimizations" (the model's words) that replaced a cached production with a literal + 3 message sends in 8 places in the (trivial!) grammar. I explained what I value in the original code, why those are important features to keep, and tried again. It still couldn't give me an idiomatic Smalltalk translation, though it did get significantly closer. I concluded that the model has a very limited understanding of how concepts I wanted can manifest in actual code and called it a day.

To give you an idea of the scale: excluding blank lines and imports, the grammar is exactly 10 lines of Python...

So no - LLMs are not good at generating code. They are just fast and convenient, and again - that's huge. But it's nowhere near a level where it can be steered to produce good code - much less being able to generate good code by default.

(I realize this post is a bit off topic and it's just an anecdote - but I've experienced this daily for the past half a year; I'm not basing my opinion on just that last attempt.)

Re: Because It's Not Fun Enough: why languages fail

#64
post #41
post #30

Earlier quoted context omitted.

C++ succeeded because it was Object Oriented, people didn't start talking about RAII as C++ killer feature until years later python succeeded because it wasn't Perl's TMTOWTDI, everyone expected ruby to overtake python, but .. for some reason that never happened swift succeeded because apple pushed it to replace objective c, that if you consider swift succeeded anyway, i agree with your premise, languages need one ke…

I don't think C++ succeeded because it was object-oriented. I think C++ was object-oriented because classes were an abstraction that could layer on top of C with fairly low overhead, giving it more expressive power without much mandatory cost to size or speed. In other words, object-orientation was the means, not the end.

Back then OOP was all the hype and inheritance was cool.

Re: Because It's Not Fun Enough: why languages fail

#65
post #45
post #20

I was hoping it would address Lisp. Lisp is fun. The interactivity and instant turnaround of a Lisp REPL is still rarely matched in other languages. Common Lisp also solved a significant issue other languages didn't address well until much later: the ability to write high-level code that was fast on cheap hardware around the turn of the millennium. Lisp didn't get popular around the turn of the millennium. Success st…

I often hear about lisp but never actually figured out what tooling you need Is it interpreted or compiled language? Why should I use it instead of any other languages?

"Lisp" refers to several different languages in the same family, which contributes to the confusion.

Perhaps the default choice is Common Lisp which itself is specified in an ANSI standard and has several competing implementations. Some are compiled, some are interpreted.

Arguably the best is SBCL, which has a mature compiler and garbage collection. If you lean on implementation-specific features you can produce extremely fast code that approaches the performance of C in some benchmarks, but idiomatic and portable lisp is slower in practice.

>Why should I use it instead of any other languages?

The killer feature used to be the REPL. You can write the application function by function, and test the functions, data structures, or classes you write in the REPL as you're actively building the app.

Nowadays with LLMs writing all the code, I honestly don't see much reason to reach for lisp. Agents don't require a REPL, and other languages have vastly superior library support.

Re: Because It's Not Fun Enough: why languages fail

#66

I'm calling bull on this. Learning languages, at certain points, is always tedious. Whether that language is a computer language, or something like Greek, there comes a moment where "trudging" begins. The reason a person "trudges" is that they have a goal in mind that makes the trudging something to endure until that goal is achieved. Fun comes from not having to solve the same problem sixty times, or having to sort…

Hmm. I find learning fun, no matter what the scope is - even Greek, which remains obscure to me. (Quick, ask me something about Greek! I'll nod wisely and stroke my chin in deep thought and then get distracted and wander elsewhere.) But you're not wrong: there's a fun discovery phase, then a "hey, does this actually work" phase, and then a "crap, I need to figure out how to MAKE it work" phase, all of which are decision points where one might choose to not bother.

Re: Because It's Not Fun Enough: why languages fail

#67
post #17

Yes to all that but still, my pet theory is that languages rise on one or two "killer features" that move the entire industry forward, and not the overall cuteness or lovability. I can suggest a list of one killer feature per each popular language, i.e. things that these languages were the first to introduce and influence many successors: C: extreme conciseness C++: implicit destructors / RAII Python: removed curly b…

C came with an OS. C++ came with compatibility with C and at the peak or near peak of OO hype. Javascript came with the browser making it probably the most widely available language platform. Swift came with Objective-C compatibility, an OS, and money (iOS app store customers spend more on apps than their Android counterparts). Coming with a platform that is widely available or compatibility with an existing language…

Yeah, this is a more honest assessment than the others I've read here.

Of course them being ISO(like) standards with competing implementations/tools was also important for C, C++ and Java as the cost to use and learn them was higher in the days before free open source languages, free tutorials and help forums became so wide spread.

But yeah official platform support and big company backing are a big part of why these languages have stuck around compared to others.

Re: Because It's Not Fun Enough: why languages fail

#68
post #31

Earlier quoted context omitted.

> That's the three axis thing again: vocation, art, job. Swift and .Net both got a huge kick from the "job" department. Granted, Swift got a huge kick from the job department, but what you wrote said a lot more than that: > A language that makes life hard will not survive past the moment it can be replaced. > Objective-C was awkward as both art and job, and it thrived for fifteen years because it was the only door in…

I wrote that it was awkward because IMO it was. That is indeed "my opinion" - I found the language it used to express concepts far more useful than the language itself, and found myself writing C++ far more often than ever wanting to write ObjC.

It's unclear whether your last comment is talking about the art or the job axis, the latter of which I just asked about.

I certainly don't see how using C++ would be less awkward on the job for developers than ObjC when the job was primarily calling ObjC system API.

Re: Because It's Not Fun Enough: why languages fail

#69
post #34
post #25

I tried to read this with an open mind but the premise of the article is so reductive I gave up quickly. There’s a whole plethora of reasons a language might fall in or out of favour. From ecosystem lock in (eg Objective-C was mandatory for Apple development prior to swift and Visual Basic was ostensibly killed by Microsoft during the dot net upsell) to fragmentation in the community (eg Perl vs Raku). These don’t me…

Perl is still in every Linux. I just checked one of my Oracle installs and there are 725 .pl files. So it seems that is it still relevant.

exiftool is still best in class in its arena.

Re: Because It's Not Fun Enough: why languages fail

#70
post #3

> For the person who only wants the notes, the sampler wins the job outright, completely. It will never play the wrong thing or at the wrong moment. For the person playing, it fails, because driving it costs more than playing, and it never touches the art at all. This entire essay could be about AI adoption as well. Some programmers love to program, and while AI is great at producing the code, it doesn’t really visce…

> AI is great at producing the code It's not. The latest-and-greatest models on $200/mo subscriptions routinely produce bloated code full of boilerplate. They are incapable of producing elegant, concise, readable, correct-by-design code - they literally can't do it, even with the smallest samples, and it gets much worse as the scale of the implementation increases. You can't will the capability into them through prom…

Yeah, definitely on point. I use AI for code generation, but I ride herd on it quite a lot and I limit scope viciously and with hard rules about what the models are even allowed to generate. It's worked out pretty well, but it's hardly the "oh send a question get a full system back" that people try to pretend it is.
Post reply on HN