Re:Of Lisp Macros and Washing Machines (2011)
by hp50g on Saturday March 30, 2013 @02:32PM
(#5466240)
This sort of stuff works until you need to poke some registers in a graphics card or the language's MM has a bug or you need C's dynamic nature.
Re:Of Lisp Macros and Washing Machines (2011)
by pjmlp on Saturday March 30, 2013 @06:37PM
(#5466907)
What dynamic nature does C have that every other systems programming language in the world lacks?
dynamic loading, arbitrary casts (it is what I tell you it is) etc etc.
I can do that in Ada, Turbo Pascal, Delphi, Modula-2, Oberon, Oberon-2, Component Pascal, Active Oberon, Modula-3, Cyclon and many others, what is so special about C?
It's not Ada or Pascal-like :)
It depends what you mean by totally safe, but Cyclone (http://cyclone.thelanguage.org/) is a type and memory safe dialect of C. It works by adding additional information to the type of every pointer, e.g. if it can be NULL, if it's NUL terminated, if you know the length, the scope it was allocated in, the location on the stack it's from, etc...
This all happens at compile time, and it runs about the same speed as C, so I think it qualifies.
From what I've read, this has had more of an influence on programming language designers/implementers (rust, possibly c++11, probably more), than on anybody else, though.
edit: NULL -> NUL