Hacker News new | ask | show | jobs
by krapp 1700 days ago
> Does not have the footguns of C.

> Simple like C.

You have to pick one, or give in on both and find a happy medium between the two. The way you get safety in a language is by abstracting over the simplicity.

I personally would suggest biting the bullet and going with C++, you can stick to a reasonably sane subset of the language but it definitely won't be C.

3 comments

> You have to pick one, or give in on both and find a happy medium between the two.

I'd say Pascal is simple, and has fewer foot guns than C. It might be too simple - but one can do a lot with freepascal/Lazarus.

Or go with Ada. Also somewhat simple, I'd say.

Though a lot of the footguns in C are not due to its lack of safety but rather due to the decades of historical baggage it carries.
> You have to pick one. The way you get safety in a language is by abstracting over the simplicity.

It should be noted that there are languages developed as safe dialects of C, such as Cyclone[1], whose design goal was to have it both ways and enhance C's safety while preserving its simplicity.

[1] https://en.wikipedia.org/wiki/Cyclone_(programming_language)