4 ms·
Only the first two of these are available in C. Computed gotos and local labels are gcc extensions; and the dynamic linker is POSIX but not C. (Incidentally,
by cperciva 9y ago
Only the first two of these are available in C. Computed gotos and local labels are gcc extensions; and the dynamic linker is POSIX but not C.
(Incidentally, the dynamic linker hack is precisely how both FreeBSD and Linux perform all their kernel initialization: Individual modules define symbols with a particular naming pattern, and then the kernel linker enumerates those symbols.)
- mort96 9y agoThe second sentence in the article: > I wanted to see how close I could come to making a DSL (domain specific language) with its own syntax and features, using only the C preprocessor and more obscure C features and GNU extensions.
- cperciva 9y agoI was objecting to the misleading title (which is currently "Some obscure C features"), not to the content of the article.
- loeg 9y agoI think you're missing the point of the article. The author isn't limited to standard C, and neither is anyone with a unix and GCC. Are you just nitpicking the author's description of extensions as "C?"
- sammoorhouse 9y agoI find that some HN people read articles with the express intention of picking nits. Like the dwarf with learning difficulties, it’s not big and it’s not clever.
- kbenson 9y agoIt was a clarifying comment, didn't denigrate anyone, and added a useful and interesting tidbit of information. I see nothing wrong with this. Perhaps the comment author should receive some benefit of a doubt as to his intentions?
- loeg 9y agoSorry, you're just incorrect about both the content of Colin's comment and authorial intent. Colin clarifies he is expressing an objection, not a clarification, and that it is in fact the nitpick I guessed it was: https://news.ycombinator.com/item?id=16236015 https://news.ycombinator.com/item?id=16236015 Yes, it doesn't denigrate anyone, but that's a really low bar. I do give authors the benefit of the doubt when something isn't clear. That's why I couched my message in "I think" and asked a question instead of just asserting facts.
- kbenson 9y ago> Sorry, you're just incorrect about both the content of Colin's comment You seem to have misinterpreted me. I wasn't saying Colin was attempting to clarify (I didn't know his intent), I was saying that is his comment was factually clarifying. I didn't have any evidence as to his intent at the time, but I didn't see a reason to assume anything other than he was being helpful. > Yes, it doesn't denigrate anyone, but that's a really low bar. That's not even half of the criteria I listed, so it's not really the bar I set at all, is it? The comment contributed by clarifying the submission name for those that had not yet read the article. It additionally contributed by adding some factual information about some of the referenced features and how they are used in the kernel. I don't think anything he said takes away from the article, so I don't think he's necessarily missing the point. > I do give authors the benefit of the doubt when something isn't clear. That's why I couched my message in "I think" and asked a question instead of just asserting facts. I think you also misunderstood what I was trying to accomplish, how much of my statement was meant to be a condemnation and correction, and how much was leveled at you instead of the general readership. The only existing reply to you at the time I posted was referencing people on HN that like to nitpick. It was meant as a "this isn't necessarily negative, so let's just take it for what it provides, and it provides some usefulness" and not as "shame on you for assuming the worst". Edit: Blah, there was some weird wording in that last paragraph
- kazinator 9y agoThe dynamic linker is also Win32. You can wrap things to either call dlopen or LoadLibrary. In Cygwin, you have dlopen and friends which work with DLLs.