Hacker News new | ask | show | jobs
by tylerflick 2514 days ago
This. If I really need generics I'll use a different language.
3 comments

This reminds me the discussion about first version of iPhone how so many people were advocating why adding copy&paste functionality was a bad idea.
More like people were advocating against the shitty Copy&Paste phones used to have.

When it came out, it was possible to C&P pictures to emails and other fancy stuff that wasn't possible before.

I'm quite sure that was possible on android from the beginning.
Agreed. There are good objections to generics; this is not one of them.

EDIT: If any Apple employees are reading this, I really wish autocorrect would stop confusing generics and generics. :)

Must every popular language evolve into C++ or Common Lisp?
I wonder if there's room for a language that is small, allows for nearly limitless abstraction, and still has great tooling. Go is (or, you could argue, was) small, and now has better tooling, but is just beginning to increase its ability to create abstractions. Common Lisp is large (only 200 pages fewer in its spec than C++, if I remember correctly), has unparalleled tooling (like the don't-unwind-the-stack debugging and SLIME), and really good abstraction power. Scheme is small and consistent (unlike CL), and also can create similarly advanced abstractions, but is missing some of the tooling that CL has enjoyed for eons.

I'll be really cool to see a language that feels consistent, tight, well-engineered, and small; can create powerful abstractions similar to what can be achieved using CL macros and CLOS; and has an awesome debugger, editor interop, interactive programming with a REPL, build tools, etc.

Scheme?
I fleshed my comment out into a blog post yesterday, which got some interest[0] on Lobsters. It appears that modern Scheme is easier to write portably and an even nicer compromise than I had originally thought.

[0]: https://lobste.rs/s/ytuyya/perfect_language_why_go_still_isn...

Scheme is possibly the best designed language I've ever seen. Which may be why no one uses it.

(Note: Macros, even Scheme's hygenic ones, can produce horrible monstrosities. Like loop. And the urge towards object systems gives Scheme a horde of them, mostly bad. This may be a lesson in getting what you ask for.)

It's called Smalltalk.
That's great if you get to pick the language you use for every project. Not all of us get that luxury.
And also only works if your project requirements are entirely foreseeable from day 0.