4 ms·
While kudos to getting this to work, seems like a huge amount of effort and voodoo when instead one could have used a different language in the first place.
by azinman2 12y ago
While kudos to getting this to work, seems like a huge amount of effort and voodoo when instead one could have used a different language in the first place.
- humanrebar 12y agoI'm not sure why you're getting downvoted. Your opinion seems valid to me. Many of the benefits to writing C go away if you use extensions like this.
- fruneau 12y agoExtensions are how new features come to an established language... C11 standard mostly standardised stuff that was already supported as extension by most compilers. Most of the time, extensions are created because features are missing from the language (alignement requirement for example), compiler could do a better job at optimising the code with better hints (noreturn, restrict, strict-aliasing, ...), or we could simply make the job of the developper a bit simpler/safer (nested functions, _Generic, blocks, ...). IMHO, the main benefit lost by using bleeding-edge extensions is portability, which may or may not be an issue.
- duaneb 12y agoWhat language would you happen that has both ridiculous portability (you can use it from any language) and performance? Sounds like a fairy tale to me.
- fruneau 12y agoLanguages such as Go, Rust or Swift aim to fill that gap, but in 2010 they were either nascent or simply inexistent.
- duaneb 12y agoGo doesn't embed at all, so right there that's out. Rust is still very unstable, and I wouldn't recommend it for production use. I'm not sure why you would use Swift unless you're targeting iOS, it seems like a terrible idea to base your code on proprietary languages without ridiculous, .NET levels of support. I also don't believe swift is easily embedded with its huge runtime ass.
- aikah 12y agoD? why does everybody hate/ignore D?
- Verdex 12y agoInteresting question. I'm not intimately familiar with D, but it does seem like it's designed as a saner alternative to C++. How many C++ alternatives are out there? From my memory D seemed like one of the first major attempts to get away from C++. Maybe they didn't go far enough to meet peoples expectations. Or maybe they were too far ahead of their time. Anyway, when you said that the first thing that popped into my mind was Ewan McGregor going all "you were the chosen one" and actually I think that kind of describes my feeling about D. At first it sounded very exciting, but then it seemed like there really wasn't a payoff and I ended up feeling kind of bleh about it. I wonder how many other people feel similarly. Maybe D's problem is kind of an emotional one?
- coldtea 12y agoYou are overthinking it. D had a "version two" new compiler issue, and a "let's rewrite basic libraries" issue that split the user base. They are also bad at marketing (and no match for Google's visibility -- they don't even have a maskot, IIRC) And they still lack some basic things to this day, including a way to go from download to compiling your code in a minute.
- desdiv 12y agoI'm not sure that Swift belongs on that list. It was announced back in June and there still no compiler for any non-Apple platforms. It's safe to say, at this point, that portability isn't one of Swift's goals.
- coldtea 12y agoGo: not that performant, unless you're writing network code. Rust: not even 1.0 stable. Swift: not cross platform.
- Joky 12y agoC++
- detrino 12y agoC++ has lambda and std::function.
- fruneau 12y agoThanks. That said, I'm not sure the amount of effort is that huge: having a working rewriter was a matter of days, which makes it far less expensive than rewriting a codebase of several hundreds of thousands of C to a new language.