|
|
|
|
|
by FreezerburnV
3455 days ago
|
|
This sentiment is actually very interesting to me. I had (/have?) the same kind of sentiment toward Go, but when I spent time playing with it recently I realized just how close to C it actually is. Enough so that when someone says it's a C replacement, I can actually see where they're coming from/somewhat agree with them. And the reason for that is that Go actually seems to follow a lot of C conventions pretty darn closely, and not provide as high level of an interface as Java does. You're much more likely to work in raw "arrays" (aka: slices) in Go than you are in Java, it doesn't have generics, "classes" are structs that are defined very similarly to structs in C, error codes as return values, etc. The main differences that are adding to C as far as I'm currently aware are interfaces, the ability to add a "method" to a type (which is effectively the same as calling a function with a type as the first argument, except in the case of interfaces), and the garbage collector. All of which, to me, feel like a kind of evolution on C. A different path instead of C++ in a way. While people would argue that having a GC ruins what C is good at, it can also be viewed as a version of C that's much more memory safe, while still allowing you to dip into very low level if you need to. ...there's probably some other stuff I could say, and probably more coherently, but it's early (for me) and I kind of just wanted to get that thought out there. I hope it's at least a bit thought-provoking, or something. If not, well, my apologies for rambling at you ;) |
|
The Wirth languages were categorized by a focus on absolute simplicity and safety with just enough complexity to make building large programs easier. They constantly added or removed features in various language revisions in a search of balance. His main metric was compile time: anything that took too long was kicked out. The result was these languages were easy to learn, compiled fast (100kloc a sec on good machine), rarely crashed, and ran reasonable speed. They had GC's but also allowed manual management. They were objectively better than C language because people could produce correct programs more quickly with same effort put in due to design.
http://www.projectoberon.com/
Modula-3, designed at DEC, was probably the best of that line given it's like a safer, simpler C++ with a subset closer to C. Here it is:
https://en.wikipedia.org/wiki/Modula-3
Used in SPIN operating system that let you live-load code into the kernel for acceleration safely due to type-safe linking on top of memory-safe interfaces. Quite a few commercial deployments. Didn't take off since C was too popular & programmers only went with C-like alternatives. Lots of vulnerabilities and crashes happened.
Another alternative was Delphi, which succeeded for a while. Way more productive and crash-resilient than using VC++. It fell away due to C/C++ popularity but Free Pascal community still maintains a variant of it. Their compiler targets a ton of platforms which was common for Pascal.
http://www.freepascal.org/