News for hackers. Stuff that matters.
Re:The cost of forsaking C by Tomte on Wednesday October 05, 2016 @04:11AM (#12642234)
But C doesn't give you "exact control of memory layout". Bit-fields, structs, virtually everything except arrays has implementation-defined or unspecified memory layout.

If you look at another old language, Ada, you'll find much more precise control.

Re:The cost of forsaking C by rubber_duck on Wednesday October 05, 2016 @04:43AM (#12642393)
>implementation-defined

In theory that's important, in practice you rely on implementation-defined behavior and put it behind a layer of macros. It's not perfect but it works - low level capabilities are not the problem in C.

Lack of high level abstractions make scaling it up and maintaining a PITA.

Re:The cost of forsaking C by bluetomcat on Wednesday October 05, 2016 @04:23AM (#12642301)
C11 has `_Alignas(...)`, which works both with a size or a type. Before that, compiler-specific alignment attributes could be used, for example, GCC's `__attribute__((aligned(...)))`.
Re:The cost of forsaking C by planteen on Wednesday October 05, 2016 @08:27AM (#12643183)
That's true but at the end of the day it's fine as long as you aren't using those constructs for serialization/deserialization of data between machines. Rob Pike has a very good post about how Plan 9 needed no endian specific #defines:

https://commandcenter.blogspot.com/2012/04/byte-order-fallac...